📄 tongxunlu.asp
字号:
<!-- #include file="include/adovbs.inc" -->
<!-- #include file="include/dataconn.asp" -->
<!-- #include file="include/checkHy.asp" -->
<!-- #include file="common.asp" -->
<style type="text/css">
<!--
.style1 {font-size: 16px}
.style2 {
color: #7BD7FF;
font-weight: bold;
}
body,td,th {
font-size: 12px;
}
a:link {
color: #000000;
}
a:visited {
color: #000000;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<div align="center" class="style1">
<p><strong>我的通讯录
</strong></p>
</div>
<table width="93%" border="1" align="center" cellPadding="0" cellSpacing="0" bordercolor="#1008ECD" style="border-collapse: collapse">
<tbody>
<tr>
<td bgColor="#01438b" height="3"></td></tr>
<tr>
<td height="25" bgColor="#008ECD" class="style2"> <a href="addtongxunlu.asp" target="_self">添加新纪录</a></td>
</tr>
</tbody></table>
<table width="93%" border="1" align="center" cellPadding="0" cellSpacing="0" bordercolor="#00B1FF" style="border-collapse: collapse">
<tr>
<td width="8%" height="25" align="center">姓名</td>
<td width="50%" height="25" align="center">公司</td>
<td width="10%" height="25" align="center">手机</td>
<td width="10%" height="25" align="center">住宅电话</td>
<td width="10%" height="25" align="center">单位电话</td>
<td width="12%" height="25" align="center">操 作</td>
</tr>
<%
const MaxPerPage=15
dim sql,rs,totalput,CurrentPage,TotalPages,i
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<%
userid=session("HyID")
set rs=server.createobject("adodb.recordset")
sql="select * from tongxunlu where uid="&userid&" order by id desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<tr><td align='center' colspan=6 height=25> 还 没 有 任 何 记 录<td><tr>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpages
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpages
else
currentPage=1
showContent
end if
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
%>
</table>
<%
sub showContent
i=0
do while not (rs.eof or err) %>
<tr>
<td width="8%" height="25" align="center"><a href=# onClick="window.open('showtongxue.asp?id=<%=rs("id")%>','showtxl','resizable=yes,width=400,height=300,top=200,left=300')"'><%=rs("fname")%></a></td>
<td width="50%" align="center"><%=rs("company")%></td>
<td width="10%" align="center"><%=rs("mobile")%></td>
<td width="10%" align="center"><%=rs("hometell")%></td>
<td width="10%" align="center"><%=rs("comtell")%></td>
<td width="12%" align="center"><a href="modtongxuelu.asp?id=<%=rs("id")%>" target="_self">修改</a>--<a href="delongxuelu.asp?id=<%=rs("id")%>" target="_self">删除</a></td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
end sub
sub showpages()
dim n
if (totalPut mod MaxPerPage)=0 then
n= totalPut \ MaxPerPage
else
n= totalPut \ MaxPerPage + 1
end if
if n=0 then
response.write "<p align='right'><a href=addjilu.asp>请添加新记录!</a></p>"
exit sub
end if
dim k
response.write "<tr><td align='right' height=25 colspan=6>分页 >> "
for k=1 to n
if k=currentPage then
response.write"["+Cstr(k)+"]"
else
response.write"<a href='tongxunlu.asp?page="+cstr(k)+"'>[ "+Cstr(k)+" ]</a> </td></tr>"
end if
next
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -