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

📄 address.asp

📁 基于asp的 班级同学录主页源代码
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<% if session("user")="" then
response.redirect "err.asp"
else
user=session("user")%>
<!--#include file="top.asp"-->
<table width=100% class=bk border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="165" background="address/image/gif/001.gif" valign="top">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="98%">
<tr>

<td width="6%" height="2" align="right"><img src="address/image/Misc1.gif" width="39" height="18"></td>

<td width="55%" background="address/image/bg1.gif" align="center" height="2" valign="middle">班级通讯录</td>

<td width="4%" background="address/image/bg1.gif" align="right" height="2"><img src="address/image/Misc2.gif" width="4" height="18"></td>
</tr>
<tr>

<td style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" colspan="3">
<br>
<table border="0"  cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="91%" cellpadding="0">

<tr><td>说明:为了让同学得知你的最新近况,请你及时更新你的个人资料,谢谢合作!<br>
另:如果你认为还应该增加什么更为贴心的功能,请与人心(webdj@163.com)联系.
</td>
</tr>
</table></td></tr></table>
<br>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="98%">
<tr>

<td width="19%" height="2" align="right"><img src="address/image/Misc1.gif" width="39" height="18"></td>
<td width="64%" background="address/image/bg1.gif" align="center" height="2" valign="middle">查找朋友</td>
<td width="17%" background="address/image/bg1.gif" align="right" height="2"><img src="address/image/Misc2.gif" width="4" height="18"></td>
</tr>
<tr>
<td style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1" colspan="3">
<div align="center">
<center><br>
功能开发中……
<br><br></center>
</div>
</td>
</tr>
</table>
</center>
</div><br>
</td>
<td valign="top" width="596" class=z bgcolor=#ffffff>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="100%" bgcolor="#FFFFFF"> &gt;&gt;&gt; 你好,<%=session("user")%>,你当前所在的位置是班级同学录
</td>
</tr><tr>
<td width="100%" height="96" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align=right width=23><img src="address/image/Misc8.gif" width="4" height="20"></td>
<td background=address/image/Bg5.gif valign="middle" height="20" width=569>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11%">姓名</td>
<td width="18%" align="center">OICQ</td>
<td width="22%" align="center">电子邮箱</td>
<td width="18%" align="center">工作地点</td>
<td width="21%" align="center">联系电话</td>
<td width="10%">详细信息</td>
</tr>
</table>
</td>
<td valign="bottom" height="20" width=19><img src="address/image/Misc22.gif"></td>
</tr>
</table>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=100%>
<TBODY>
<!--通讯录Content显示开始-->
<TR>
<TD class=p1 colSpan=15 align="center">
<%
Set rs1= Server.CreateObject("ADODB.Recordset")
if request("by")="" then
sql1="select * from user order by id desc"
elseif request("by")="oicq" and request("mode")="asc" then
sql1="select * from user order by oicq asc"
elseif request("by")="oicq" and request("mode")="desc" then
sql1="select * from user order by oicq desc"
elseif request("by")="sex" and request("mode")="asc" then
sql1="select * from user order by sex asc"
elseif request("by")="sex" and request("mode")="desc" then
sql1="select * from user order by sex desc"
end if
rs1.open sql1,conn,1,1
if not rs1.eof then
totalcount=rs1.recordcount
maxpage=15
page=request("page")
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
rs1.movefirst
showContent
showpage totalcount,maxpage,"address.asp"
elseif (page-1)*maxpage<totalcount then
rs1.move  (page-1)*maxpage
showContent
showpage totalcount,maxpage,"address.asp"
else
page=1
showContent
showpage totalcount,maxpage,"address.asp"
end if
rs1.close
	
set rs1=nothing
sub showContent
dim i
i=1
%>
<table width=95% cellpadding="1" cellspacing="1" border="0">
<%do while not rs1.eof%>
<% if (i mod 2)=0 then%>
<tr width=100%  bgcolor="#FFECEC">
<%else%>
<tr width=95%><%end if%>
<td align=center width="12%"><%=rs1("realname")%></td>
<td width=17% align="center"><%=rs1("qq")%></td>
<td width="20%" align="center"><%=rs1("email")%></td>
<td width="17%" align="center"><%=rs1("workshop")%></td>
<td width="20%" align="center"><%=rs1("telephone")%></td>
<td width="9%" align="center"><a href="userinfo.asp?user=<%=rs1("user")%>" target="_blank">查看</a></td>
</tr>
<% i=i+1
if i>maxpage then exit do
rs1.movenext
loop
%></table>
<% end sub%>
<%else%>
<table width="100%">
<tr width=100%>
<td align="center">没有记录</td>
</tr> </table>
<% end if%>
<%
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 class=s width=95%'><tr><td><form method=Post action="&filename&">"
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>首页</a>&nbsp;"
response.write "<a href="&filename&"?page="&(Page-1)&">上一页</a>&nbsp;"
end if
if n-page<1 then
response.write "<font color='#000080'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="&(Page+1)&">"
response.write "下一页</a> <a href="&filename&"?page="&n&">尾页</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>&nbsp"&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
%>
</td>
</TR>
<!--通讯录Content显示结束 -->
</TBODY>
</TABLE>
</td>
</tr>
<tr>
<td width="100%" height="16" bgcolor="#FFFFFF">&nbsp; </td>
</tr>
</table>
</td>
</tr>
</table>
<% end if
conn.close
set conn=nothing%>
<!--#include file="end.asp"-->

⌨️ 快捷键说明

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