?? viewalluser.asp
字號:
<!-- #include file="conn.asp" -->
<%
'畢業設計:林林在線網絡招聘系統
'畢業設計:林林在線網絡招聘系統
if session("user")="" then
Response.write("<center>使用錯誤,請先登陸")
Response.End
end if
%>
<style type="text/css">
<!--
.style1 {font-size: 14px}
-->
</style>
<%
'ShowPage子程序負責設置表格顏色及插圖,然后顯示PageNo參數所指定的頁次的所有記錄
Sub ShowPage(RS, PageNo)
'設置表格背景顏色及插圖文件,同時加上Randomize使每次產生不同順序的圖形文件
ReDim Fig(RS.PageSize - 1 ), BG(RS.PageSize - 1 )
Randomize
For I = 0 to RS.PageSize - 1
Fig(I) = INT(RND * 9) + 1 & ".gif"
Next
BG(0) = "#D9D9FF"
BG(1) = "#FFCAEE"
BG(2) = "#FFFFCC"
BG(3) = "#B9EEB9"
BG(4) = "#B9E9FF"
Response.Write "<table width='100%' border='0' cellpadding='1' cellspacing='1'>"
Response.Write "<tr>"
Response.Write "<td><font color='#DB7093' size='4' face='幼圓'></font></td>"
Response.Write "<td><font color='#DB7093' size='4' face='幼圓'><font>姓名</font></font></td>"
Response.Write "<td><font color='#DB7093' size='4' face='幼圓'><font>性別</font></font></td>"
Response.Write "<td><font color='#DB7093' size='4' face='幼圓'><font>年齡</font></font></td>"
Response.Write "<td><font color='#DB7093' size='4' face='幼圓'><font>學歷</font></font></td>"
Response.Write "<td><font color='#DB7093' size='4' face='幼圓'><font>專業</font></font></td>"
Response.Write "<td><font color='#DB7093' size='4' face='幼圓'><font>工作意向</font></font></td>"
'顯示留言并加以格式化
RS.AbsolutePage = PageNo
For I = 1 To RS.PageSize
Response.Write "<TR BGCOLOR=" & BG(I - 1) & ">"
Response.Write "<TD><IMG SRC=" & Fig(I - 1) & "><br><span class='style1'><A HREF=viewuser.asp?user="&rs("user")&">[查看此人信息]</a></TD>"
Response.Write "<TD><span class='style1'> "&rs("username")&"</td>"
Response.Write "<TD><span class='style1'> "&rs("usersex")&"</td>"
Response.Write "<TD><span class='style1'> "&rs("userage")&"</td>"
Response.Write "<TD><span class='style1'> "&rs("userlevel")&"</td>"
Response.Write "<TD><span class='style1'> "&rs("usermajor")&"</td>"
Response.Write "<TD><span class='style1'> 1."&rs("job1")&"<br>2."&rs("job2")&"</td>"
RS.MoveNext
If RS.EOF Then Exit For '若到記錄結尾就結束For循環
Next
Response.Write "</TABLE>"
End Sub
%>
<HTML>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<BODY>
<CENTER>
</CENTER>
<%
set RS=server.CreateObject("adodb.recordset")
'讀取數據表的所有記錄
sql="select * from userinfo order by userID desc"
RS.open sql,conn,1,3
If RS.EOF Then
Response.Write "<CENTER><P>目前還沒有任何用戶!</P>" & _
"<P><A HREF='../main.asp'>返回系統首頁</A></P></CENTER>"
Else
RS.PageSize = 6
'顯示頁次超鏈接
PageNo = Request("PageNo") '讀取瀏覽者所點取的頁次超鏈接
Response.Write "<span class='style1'>[頁數 "
For I = 1 To RS.PageCount
If I = CInt(PageNo) Then '若到瀏覽者所點取的頁次超鏈接,便不再當成超鏈接
Response.Write I & " | "
Else
Response.Write "<A HREF='viewalluser.asp?PageNo=" & I & "'>" & _
I & "</A>" & " | " '超鏈接到viewalluser.asp并將頁次當成參數傳送
End If
Next
Response.Write "]</span><HR>"
%>
<%
'根據頁次調用ShowPage子程序來顯示留言,若沒有指定頁次,就顯示第1頁
If PageNo <> "" Then
ShowPage RS, PageNo
Else
ShowPage RS, 1
End If
'關閉數據庫連接并釋放對象
RS.Close
Set RS = Nothing
Conn.Close
Set Conn = Nothing
%>
<%end if%>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -