?? picshow.asp
字號:
<!--#include file="ku_top.asp" -->
<%
sub navigation()
response.write " >> "
response.write "圖片展示"
end sub
%>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="800" height="50" bgcolor="#ffffff">
<tr>
<td width="218" valign="top">
<div align="center">
<table border="0" width="208" id="table2" bgcolor="#ebebeb" cellpadding="0" cellspacing="0">
<tr>
<td height="30" background="xbqq_img/gonggao.gif">
<p align="center"><b>圖 片 分 類</b></td>
</tr>
<tr>
<td><% xbqq_picsort() %></td>
</tr>
<tr>
<td height="0"><hr></td>
</tr>
<tr>
<td height="30" background="xbqq_img/gonggao.gif">
<p align="center"><b>信 息 搜 索</b></td>
</tr>
<tr>
<td height="23"><% xbqq_Search %></td>
</tr>
<tr>
<td height="0"><hr></td>
</tr>
<tr>
<td height="30" background="xbqq_img/gonggao.gif">
<p align="center"><b>站 內 投 票</b></td>
</tr>
<tr>
<td><% xbqq_vote %></td>
</tr>
<tr>
<td height="0"><br></td>
</tr>
</table>
</div>
</td>
<td width="560" valign="top">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="580" height="30" background="xbqq_img/kind1.gif">
<tr>
<td style='FILTER: PADDING-TOP: 2px'> <img border="0" src="xbqq_img/ico1.gif" width="11" height="9"> <font color="#FFFFFF"><span style="letter-spacing: 3px">圖片瀏覽</span></font></td>
</tr>
</table>
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="580" height="5">
<tr>
<td></td>
</tr>
</table>
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="580" height="160" style="border: 1px solid #2C87E9">
<tr>
<td bgcolor="#FFFFFF" width="548">
<!--主要內容開始-->
<%
dim founderr
founderr=false
if request.querystring("piccat_id")<>"" then
if not isInteger(request.querystring("piccat_id")) then
founderr=true
Response.Write "<script language=javascript>alert('參數非法');javascript:history.back();</script>"
end if
end if
if request("page")<>"" then
if not isInteger(request("page")) then
founderr=true
Response.Write "<script language=javascript>alert('參數非法');javascript:history.back();</script>"
end if
end if
if request("keyword")<>"" then
if instr(request("keyword"),"'")>0 then
founderr=true
Response.Write "<script language=javascript>alert('搜索參數非法');javascript:history.back();</script>"
end if
end if
dim totalpic,Currentpage,totalpages,i
sql="select pic_id,pic_name,pic_spic,pic_count,pic_url,pic_date,pic_desc from pic order by pic_id DESC"
if request.querystring("piccat_id")<>"" then
sql="select pic_id,pic_name,pic_spic,pic_count,pic_url,pic_date,pic_desc from pic where piccat_id="&request.querystring("piccat_id")&" order by pic_id DESC"
elseif request("keyword")<>"" then
sql="select pic_id,pic_name,pic_spic,pic_count,pic_url,pic_date,pic_desc from pic where "&request("select")&" like '%"&request("keyword")&"%'order by pic_id DESC"
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
totalcs=rs.recordcount%>
<TABLE id=middle cellSpacing=0 cellPadding=0 align=center boder="0">
<TBODY>
<TR vAlign=top align=left>
<TD>
<table width="100%" border="1" align="center" cellspacing="0" cellpadding="3" bgcolor="#FFFFFF" bordercolor="#f0f0f0" style="border-collapse: collapse"><tr bgcolor="#FFFFFF">
<%
dim picperpage
picperpage = 12
if not rs.eof then
rs.movefirst
rs.pagesize=picperpage
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
if currentpage>rs.pagecount then
currentpage=rs.pagecount
end if
else
currentpage=1
end if
if currentpage<>1 then
if (currentpage-1)*picperpage<totalcs then
rs.move(currentpage-1)*picperpage
dim bookmark
bookmark=rs.bookmark
end if
end if
if (totalcs mod picperpage)=0 then
totalpages=totalcs\picperpage
else
totalpages=totalcs\picperpage+1
end if
i=0
do while not rs.eof and i<picperpage
%>
<TD style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; PADDING-TOP: 5px" align=middle><SCRIPT type=text/javascript>GaobeiPic("<%=rs("pic_spic")%>","showpic.asp?pic_id=<%=rs("pic_id")%>","圖片名稱:<%=rs("pic_name")%>
點擊次數:<%=rs("pic_count")%>
文件大小:<%=rs("pic_url")%>
上傳時間:<%=rs("pic_date")%>");</SCRIPT></TD>
<%
i=i+1
if i mod 3 = 0 then%>
</tr><tr bgcolor="#FFFFFF">
<%
end if
rs.movenext
loop
else
if rs.eof and rs.bof then
%>
<td align=middle height="60" colSpan=3><%if request("piccat_id")<> "" then%>該分類暫時沒有圖片<%elseif request("keyword")<>"" then%>沒有找到包含[<b><font color=red><%=request("keyword")%></font></b>]的圖片!<%else%>沒有任何圖片,請管理員到后臺添加!<%end if%></td>
<%end if
end if%>
</tr><tr bgcolor="#ffffff"><td height="10" colspan="3"></td></tr><tr bgcolor="#FFFFFF"><TD colspan="3">
<form name="form1" method="post" action="picshow.asp?select=<%=request("select")%>&keyword=<%=request("keyword")%>&piccat_id=<%=request.querystring("piccat_id")%>">
<TABLE align=center border=0>
<TBODY>
<TR>
<TD align=middle width="35%" height=25> 共[<font color="#FF6666"><%=totalcs%></font>]個作品 分[<font color="#FF6666"><%=totalpages%></font>]頁</TD>
<TD width="40%" align=middle>
<%
if CurrentPage<2 then
response.write "<font color='999966'>首頁 上一頁</font> "
else
response.write "<a href=picshow.asp?select="&request("select")&"&keyword="&request("keyword")&"&page=1&piccat_id="&request.querystring("piccat_id")&">首頁</a> "
response.write "<a href=picshow.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&CurrentPage-1&"&piccat_id="&request.querystring("piccat_id")&">上一頁</a> "
end if
if totalpages-currentpage<1 then
response.write "<font color='999966'>下一頁 尾頁</font>"
else
response.write "<a href=picshow.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&CurrentPage+1&"&piccat_id="&request.querystring("piccat_id")
response.write ">下一頁</a> <a href=picshow.asp?select="&request("select")&"&keyword="&request("keyword")&"&page="&totalpages&"&piccat_id="&request.querystring("piccat_id")&">尾頁</a>"
end if
%>
</TD>
<TD align=middle width="25%">
<select name="page">
<%
i=1
for i=1 to totalpages
if i=currentpage then
%>
<option value=<%=i%> selected>第<%=i%>頁</option>
<%else%>
<option value=<%=i%>>第<%=i%>頁</option>
<%end if
next%>
</select><input type="submit" name="Submit2" value="轉 向"> </TD>
</TR>
</FORM>
</TABLE>
</TD>
</TR>
<tr align="center"><td height="1" colspan="3"></td></tr></table><br>
</td>
</TBODY></TABLE>
<%
rs.close
set rs=nothing
%>
<!--主要內容結束-->
</td>
</tr>
</table>
</div>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="580" height="5">
<tr>
<td></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</div>
<!--#include file="xbqq_foot.asp" -->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -