⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 picshow.asp

📁 研究生会网站,,适合大中专门院校学生组织使用
💻 ASP
字号:
<!--#include file="Gaobei_head.asp" -->




<%
    sub navigation()
    response.write " &gt;&gt; "
    response.write "图片展示"
    end sub
%>
<div align="center">
	<table border="0" cellpadding="0" cellspacing="0" width="778" height="50" bgcolor="#EFEFE7">
		<tr>
			<td width="218" valign="top">
<% call Gaobei_userlogin() %>
<% Call Gaobei_Marquee() %>
<% Call Gaobei_picsort() %>
<% call Gaobei_Search() %>
<% 'call Gaobei_vote() %>
</td>
			<td width="560" valign="top">
<div align="center">
				<table border="0" cellpadding="0" cellspacing="0" width="550" height="20" background="images/gaobei_skin/public_dh.gif">
					<tr>

						<td style='FILTER: DropShadow(Color=#ffffff, OffX=1, OffY=1, Positive=1); PADDING-TOP: 2px'>&nbsp;&nbsp;&nbsp;&nbsp;<span style="letter-spacing: 3px">图片浏览</span></td>
					</tr>
				</table>
</div>

<div align="center">
	<table border="0" cellpadding="0" cellspacing="0" width="550" height="5">
		<tr>
			<td></td>
		</tr>
	</table>
</div>

<div align="center">
	<table border="0" cellpadding="0" cellspacing="0" width="550" height="160" style="border: 1px solid #CECFCE">
		<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%>&nbsp;

<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")%>&#13&#10点击次数:<%=rs("pic_count")%>&#13&#10文件大小:<%=rs("pic_url")%>&#13&#10上传时间:<%=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="550" height="5">
		<tr>
			<td></td>
		</tr>
	</table>
</div>




			</td>
		</tr>
	</table>
</div>
<!--#include file="Gaobei_foot.asp" -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -