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

📄 alumni.asp

📁 基于asp的 班级同学录主页源代码
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="../const.asp"-->
<%if session("user")="" then
response.redirect "../err.asp"
end if%>
<%
dim rs_lar,usersql
Set rs_lar = Server.CreateObject("ADODB.Recordset")
usersql="select * from user where user='"& session("user")&"'"
rs_lar.open usersql,conn,1,1
if rs_lar.eof and rs_lar.bof then
response.redirect "../err.asp"
response.end
end if
rs_lar.close
%>
<!--#include file="connpic.asp"-->
<!--#include file="top.asp"-->
<TABLE border=0 cellPadding=0 cellSpacing=0 width=100% class=zy>
<TBODY>
<TR>
<TD background="image/bg1.gif" height="100%" vAlign=top
width=24><BR><BR><BR><BR><BR><BR><IMG
src="image/alumni1.gif"><IMG
src="image/corner1.gif"> </TD>
<TD align=middle background="image/bg2.gif" height="100%"
vAlign=top width=66><IMG src="image/class_album1.gif"> <IMG
border=0 src="image/album_idxbtn.gif" vspace=6><BR><a href="index.asp"><FONT
color=#cccccc>相册首页</FONT></a><BR><IMG border=0 height=31
src="image/modrec_btn.gif" vspace=6 width=31><BR><a href="update.asp"><FONT
color=#cccccc>更新记录</FONT></a><BR><IMG border=0
src="image/addpic_btn.gif" vspace=5><BR><a href="sendphoto.asp"><FONT
color=#cccccc>添加图片</FONT></a><BR><IMG border=0
src="image/addfile_btn.gif" vspace=5><BR><a href="addfile.asp"><FONT
color=#cccccc>添加文件</FONT></a><BR><IMG height=31
src="image/album_manbtn.gif" width=31> <BR><a href="user.asp"><FONT
color=#cccccc>相册管理</FONT></a><BR><IMG border=0 height=31
src="image/back_btn.gif" vspace=5 width=31><BR><a href="../main.asp"><FONT
color=#cccccc>返回班级</FONT></a><BR></TD>
<TD vAlign=top width=680 bgcolor=#ffffff>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD bgColor=#b23f3c height=2></TD></TR></TBODY></TABLE><br><br><img src="../image/bz01.gif"><a href="../main.asp">班级首页</a>>><a href="index.asp">班级相册</a>><%=request("classid")%><br>
<table border=0 cellpadding=0 cellspacing=0 width="100%" height="1100%">
<tbody>
<tr>
<td align=center valign=top height="453"><br>
<br>
<%
dim rs,sql,totalcount,maxpage,page,pagecount,typeid
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from images where classid='"&trim(request("classid"))&"' and deleted=1 order by id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>对不起,在该分类没有找到任何图片</p>"
else
totalcount=rs.recordcount
maxpage=16
page=request("page")
classid=request("classid")
if page="" or page<1 then
page=1
end if
if (totalcount mod maxpage)=0 then
pagecount=totalcount\maxpage
else
pagecount=totalcount\maxpage+1
end if
if Page=1 then
showContent
showpage totalcount,maxpage,"alumni.asp"
elseif (page-1)*maxpage<totalcount then
rs.move  (page-1)*maxpage
showContent
showpage totalcount,maxpage,"alumni.asp"
else
page=1
showContent
showpage totalcount,maxpage,"alumni.asp"
end if
rs.close
	
set rs=nothing
sub showContent
dim i
i=1
%><table border="0" cellspacing="0" width="80%" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0"><tr align=center>
<%do while not rs.eof
altstr="&#13&#10  〓〓  "&rs("user")&"上传  〓〓  "
altstr=altstr&"&#13&#10"
altstr=altstr&"&#13&#10  图片标题:"&rs("title")
altstr=altstr&"&#13&#10  上传日期:"&rs("regtime")
altstr=altstr&"&#13&#10  详细说明:"&rs("addinfo")
altstr=altstr&"&#13&#10"
%>
<td  width=20% align=center>
<a href="openimg.asp?id=<%=rs("id")%>" title="sada" target="_blank">
<img src="show.asp?id=<%=rs("id")%>" width="95" height="70" border=0 alt="<%=altstr%>"></a><br><br><font color="#cccccc">说明</font>:<%=rs("title")%><br><br>
</td>
<% if (i mod 4)=0 then
response.write "</tr><tr>"
end if%>
<% i=i+1
if i>=maxpage then exit do
rs.movenext
loop
%>
<%if (i mod 4)=1 then
response.write "<td></td><td></td><td></td>"
elseif (i mod 4)=2 then
response.write "<td></td><td></td>"
elseif (i mod 4)=3 then
response.write "<td></td>"
end if%>
</tr>
</table>
<% end sub%>
<%
function showpage(totalcount,maxpage,filename)
dim n
if totalcount mod maxpage=0 then
n= totalcount \ maxpage
else
n= totalcount \ maxpage+1
end if
response.write "<table><tr><td><form method=Post action="&filename&"?classid="&classid&">"
response.write "<p align='center'><font color='red'></font>&nbsp;"
if Page<2 then
response.write "<font color='#000080'>首页 上一页</font>&nbsp;"
else
response.write "<a href="&filename&"?page=1&classid="&classid&">首页</a>&nbsp;"
response.write "<a href="&filename&"?page="&Page-1&"&classid="&classid&">上一页</a>&nbsp;"
end if
if n-page<1 then
response.write "<font color='#000080'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="&(Page+1)&"&classid="&classid&">"
response.write "下一页</a> <a href="&filename&"?page="&n&"&classid="&classid&">尾页</a>"
end if
response.write "<font color='#000080'>&nbsp;页次:</font><strong><font color=red>"&Page&"</font><font color='#000080'>/"&n&"</strong>页</font> "
response.write "<font color='#000080'>&nbsp;共<b>"&totalcount&"</b>张图片 <b>"&maxpage&"</b>张图片/页</font> "
response.write " <font color='#000080'>转到:</font></td><td><input type='text' name='page' value="&page&" size='2' class=buttonface>"

response.write "</td><td valign=buttom><input type='image'  src='../image/alumni_search.gif'></td></form></tr></table>"
end function
%><% end if%></td>
</tr>
</tbody>
</table>
</TD>
</TR></TBODY></TABLE>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=100% class=xzy>
<TBODY>
<TR>
<TD background="image/bg1.gif" width=24></TD>
<TD width=67><IMG src="image/corner2.gif"></TD>
<TD background="image/bg6_a.gif" width=293></TD>
<TD background="image/bg6_a.gif" width=3></TD>
<TD background="image/bg6_a.gif" width=374></TD>
</TR></TBODY></TABLE>
<!--#include file="../end.asp"-->

⌨️ 快捷键说明

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