28,390
社区成员
发帖
与我相关
我的任务
分享
<!首页:jingcai.asp-->
<!--#include file="conn.asp"-->
<!--#include file="inc.asp"-->
<%call head()%>
<link rel="stylesheet" href="3.css" type="text/css">
<title><%=netName%>---<%=lanmu3%></title>
<BASE onmouseover="window.status='<%=netName%>---<%=lanmu3%>';return true">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="760" height="540">
<tr>
<td class=hang width="760" colspan="2" height="7">
<table border="0" width="758">
<tr>
<td class=hang width="187">
<marquee behavior="alternate" scrollamount="2" direction="right">
<%
Response.Write "<SCRIPT language=JavaScript> " & vbCrLf
Response.Write "today=new Date();function initArray(){this.length=initArray.arguments.length " & vbCrLf
Response.Write "for(var i=0;i<this.length;i++) " & vbCrLf
Response.Write "this[i]=initArray.arguments[i]}var d=new initArray( " & vbCrLf
Response.Write " ""星期日"", " & vbCrLf
Response.Write " ""星期一"", " & vbCrLf
Response.Write " ""星期二"", " & vbCrLf
Response.Write " ""星期三"", " & vbCrLf
Response.Write " ""星期四"", " & vbCrLf
Response.Write " ""星期五"", " & vbCrLf
Response.Write " ""星期六"");document.write( " & vbCrLf
Response.Write " today.getYear(),""年"", " & vbCrLf
Response.Write " today.getMonth()+1,""月"", " & vbCrLf
Response.Write " today.getDate(),""日"", " & vbCrLf
Response.Write " d[today.getDay()], " & vbCrLf
Response.Write " ""</font>""); " & vbCrLf
Response.Write " </SCRIPT> " & vbCrLf
%></marquee></td>
<td class=hang width="62"></td>
<form method="POST" action="jingcai.asp"><td class=hang width="487" ><p align="right">
——>搜索引擎</font> <input type="text" name="keyword" size="20" ><select name="where" size="1">
<option value="1" selected>标题</option>
<option value="2">内容</option>
</select> <input type="submit" value="搜索" name="B1"></p>
</td> </form>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" width="196" height="504">
</td>
<td valign="top" width="564" height="504">
<%
sql="SELECT * FROM jcsj order by d_id DESC"
if request("1") <> "" Then
sql="SELECT * FROM jcsj where jcsjleft = "&request("1")&" order by d_id DESC"
elseif request("keyword") <> "" Then
if Request("where") = "1" then
where="jcsjbt"
else
where="jcsjjj"
end if
keyword = Trim(Request("keyword"))
sql = "Select d_id,jcsjname,jcsjjj,jcsjleft,jcsjbt,date,count from jcsj where "&where&" like '%"& keyword &"%' order by d_id desc"
end if
Dim fileName,postion
fileName = Request.ServerVariables("script_name")
postion = InstrRev(fileName,"/")+1
fileName = Mid(fileName,postion)
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
const MaxPerPage=12
rs.PageSize=12
dim totalPut
dim CurrentPage
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<div align="left">
<table border="1" cellpadding="0" cellspacing="0" width="564" bordercolor="#f0f0f0">
<tr><td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="25" background="img/b2.gif" height="35"></td>
<td width="531" background="img/b4.GIF">分类图片共<%=rs.recordcount%>幅</td>
</tr>
</table></td></tr>
<tr>
<td valign="top" width="556" height="484" >
<%
sub xianshi %>
<!-- 新闻展示表格 -->
<table width="556" height="600" border="0" align="center">
<tr>
<%do while not rs.eof and pages>0 %>
<td width="166" height="222" valign="top" align="left">
<%
Response.Write "<td class=tl align=""center"" valign=""top"">" & vbCrLf
Response.Write "<table border='0' cellpadding='1' cellspacing='1'><tr><td align='center' width='120'><table border='0' cellspacing='0' cellpadding='0' align='center'><tr><td height='10'><img src='img/bg_0ltop.gif' width='10' height='10'></td><td height='10' background='img/bg_01.gif'></td><td height='10'><img src='img/bg_0rtop.gif' width='10' height='10'></td></tr><tr><td width=10 background=img/bg_03.gif> </td><td align='top' valign='middle' bgcolor='#FFFFFF'>" & vbCrLf
Response.Write "<p align=""center"">" & vbCrLf
Response.Write "<a href=""show.asp?d_id="&rs("d_id")&"&1=jcsj""><img src="&rs("jcsjname")&" width=""72"" height=""86"" border=""0""></a></td>" & vbCrLf
Response.Write "</td><td width='5' background='img/bg_04.gif'> </td></tr><tr><td height='10'><img src='img/bg_0lbottom.gif' width='10' height='10'></td><td height='10' background='img/bg_02.gif'></td><td height='10'><img src='img/bg_0rbottom.gif' width='10' height='10'></td></tr></table>" & vbCrLf
Response.Write "<p align=""center"" style=""text-decoration: blink"">"&rs("jcsjbt")&" " & vbCrLf
Response.Write "</td></tr></table>" & vbCrLf
%>
</td>
<%
'分栏主要由下面这个判断来执行的,本例是每行显示两栏
if (i mod 4) =0 then
%>
</tr><tr>
<%end if%>
<%
pages = pages - 1
rs.movenext
i=i+1
loop
Response.Write "</td></tr></table>" & vbCrLf
end sub
%>
<%
if rs.eof and rs.bof then
Response.Write "<center><font color=red>还没有添加图片。</font></center>"
else
pages=12
rs.pagesize=pages
if not isempty(Request.QueryString("page")) then
thispage=clng(Request.QueryString("page"))
else
thispage=1
end if
rscount=rs.recordcount
if thispage="" then thispage=1
if thispage<1 then thispage=1
if (thispage-1)*pages>rscount then
if (rscount mod pages)=0 then
thispage=rscount\pages
else
thispage=rscount\pages+1
end if
end if
if(rscount mod pages)=0 then
allpages=rscount\pages
else
allpages=rscount\pages+1
end if
rs.absolutepage=thispage
i=1
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
xianshi
%><tr>
<td valign="top" width="560" colspan="5" height="20">
<%showpage totalput,MaxPerPage,"jingcai.asp"%>
</td></tr>
<%
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
xianshi
%><tr>
<td valign="top" width="560" colspan="5" height="20">
<%showpage totalput,MaxPerPage,"jingcai.asp"%>
</td></tr>
<%
else
currentPage=1
xianshi
%><tr>
<td valign="top" width="560" colspan="5" height="20">
<%showpage totalput,MaxPerPage,"jingcai.asp"%>
</td></tr>
<%
end if
end if
end if
rs.close
%>
</td></tr></table></td></tr></table> </div></td> </tr> </table> </center> </div>
<%call copying()%>
<!config.asp-->
<%
Const NetName="测试" '站点名称
Const iejieshao="测试" '版权
Const email="" 'email
Const qq="" 'email
Const wangzhi="" '网址
Const logo="" 'logo
Const lanmu1="测试" '一级栏目1
Const lanmu2="测试" '一级栏目2
Const lanmu3="测试" '一级栏目3
Const lanmu4="测试" '一级栏目4
Const lanmu5="测试" '一级栏目5
Const lanmu6="测试" '一级栏目6
Const lanmu7="测试" '一级栏目7
Const lanmu8="测试" '一级栏目8
%>
response.write "<a href='" & filename & "?page=" & (CurrentPage+1) & "&keyword=" & keyword & "&ClassNo=" & ClassNo & "'>"