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

📄 bjphoto.asp

📁 进入后台
💻 ASP
字号:
<!--#include file="config.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!--#include file="head.asp"-->
<%bid=clng(request("bid"))
if bid="" or bid<1 then ShowError("访问的班级不存在")
rs.open "select * from bj where id="&bid&"",conn,1,1
	If Rs.eof Then ShowError("访问的班级不存在")
	if rs("isopen")=1 and session("xyluserid")="" then ShowError("你访问的班级禁止游客访问")
	if rs("isopen")=2 then
	if session("xyluserid")="" then ShowError("你访问的班级禁止非班级成员访问")
	if obj.inbj(session("xyluserid"),bid,SiteDatabase)<>1 then ShowError("你访问的班级禁止非班级成员访问")
	end if
	bjname=rs("bjname")
	rs.close%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Sitename%>-<%=bjname%>-相册</title>
<LINK href="css.css" type=text/css rel=stylesheet>
</head>
<body>
<%call bjhead(bid,bjname)
piclb=clng(request("piclb"))%>
<table width="760"  border="0" align="center" cellpadding="0" cellspacing="0" class="border">
        <tr>
          <td height="291" valign="top">
            <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" class="border">
        <tr>
          <td width="86%" height="25">  <img src="skins/1/xb3.gif">&nbsp;当前位置:<a href="bjindex.asp?bid=<%=bid%>">班级首页</a> &gt;&gt; <a href="bjphoto.asp?bid=<%=bid%>">班级相册</a>
		  <%if piclb>1 then
		  rs.open "select * from piclb where id="&piclb&"",conn,1,1
		  Response.Write(" &gt;&gt; "&rs(1)&"")
		  rs.close
		  end if%></td>
          <td width="14%"><%if session("xyluser")<>"" then%><a href="bjphotoadd.asp?bid=<%=bid%>">添加照片</a><%end if%></td>
        </tr>
      </table>
            <table width="100%"  border="0" cellpadding="0" cellspacing="0" class="border">
              <tr>
                <td height="20"> 
                  <div align="right">相册分类:
                    <%rs.open "select * from piclb order by id",conn,1,1
	If Rs.eof and Rs.bof Then
	Response.Write("暂无分类")
	else
	do while not rs.eof
	Response.Write("<a href='?bid="&bid&"&piclb="&rs(0)&"'>"&rs(1)&"</a> <img src='skins/1/navspacer.gif' width='7' height='18' align='absmiddle'> ")
	rs.movenext
	loop
	end if
	rs.close%>
                  </div></td>
              </tr>
            </table><br>
            <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr height="150"><%if piclb<1 then
			   rs.open "select id,pic,title from photo where bjid="&bid&" order by lastupdatetime desc,id desc",conn,1,1
			   else
			  rs.open "select id,pic,title from photo where type1="&piclb&" and  bjid="&bid&" order by lastupdatetime desc,id desc",conn,1,1
			  end if
	If Rs.eof Then
	Response.Write("<tr><td height=20>暂无照片</td></tr>")
	else
	dim strFileName,i,j,totalPut,CurrentPage,TotalPages
					totalPut=rs.recordcount
					const MaxPerPage=20
					strFileName="?bid="&bid&"&piclb="&piclb&""
					if request("page")<>"" then
						currentPage=cint(request("page"))
					else
						currentPage=1
					end if
					if currentPage<>1 and (currentPage-1)*MaxPerPage<totalPut then
					rs.move (currentPage-1)*MaxPerPage
					else
					currentPage=1
					end if
					i=0
	do while not rs.eof%>
				<td><table width="160" height="120"  border="0" align="center" cellpadding="0" cellspacing="0" class="border">
                    <tr>
                      <td><div align="center"><a href='bjphotoview.asp?bid=<%=bid%>&id=<%=rs(0)%>'><img src="upphoto/<%=rs(1)%>" width="150" height="110" border="0"></a></div></td>
                    </tr>
                </table>
			    <table width="100%" height="30"  border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td><div align="center"><a href='photoview.asp?id=<%=rs(0)%>'><%=left(rs(2),12)%></a></div></td>
  </tr>
</table></td>
               <%i=i+1
if i>=MaxPerPage then exit do
			   if i mod 4=0 then response.write "</tr><tr height=150>"
rs.movenext
			loop
			end if%></tr>
            </table>
			<table width="100%" align="center" cellpadding="1" cellspacing="1" bordercolor="#CCCCCC" class="border">
  <tr>
    <td height="25" bgcolor="#f9f8f2"><div align="center"><%=obj.showpage(strFileName,totalput,MaxPerPage,true,true,"条",currentPage)%></div></td>
  </tr>
</table>
<%rs.close
set rs=nothing%><br>
</td>
        </tr>
</table>
<%sitebottom%>
</body>
</html>

⌨️ 快捷键说明

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