?? show.asp
字號:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="dbconn.inc"-->
<%if session("pass")="" then
response.Write("請輸入密碼!")
response.redirect"pass.asp"
end if
%>
<style type="text/css">
<!--
td,textarea, input, i, body, select { font-size: 9pt; text-decoration: blink}
input, textarea, select{border-left:1px solid #000000;border-right:1px solid #000000;border-top:1px solid #000000;border-bottom:1px solid #000000;background-color:#ffffff}
a:active { font-size: 9pt; color: #FF0000; text-decoration: none}
a:link { font-size: 9pt; color: #0080C0; text-decoration: none}
a:visited { color: #0080C0; text-decoration: none}
a:hover { font-size: 9pt; color: #FF0000; text-decoration: underline blink}
-->
</style>
<% if request("del")<>"" then
conn.Execute("delete * from liuyan where id="&request("del"))
end if %>
<SCRIPT language=JavaScript1.2>
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</SCRIPT>
<%
if Request.QueryString("PageNumber").count > 0 then '如果指定頁號,則以指定頁號為依據
PageNumber = Request.QueryString("PageNumber")(1)
else
PageNumber = 1 '沒有指定頁號,缺省頁號為1
end if
RecordNumberPerPage = 20 '每頁顯示5條記錄
set rs=server.createobject("adodb.recordset")
sql="select * from liuyan order by id desc"
rs.open sql,conn,3
if rs.eof then
response.write"<center><font color=red><b>對不起,還沒有相應的主題!</b></font></center><br>"
else
rs.PageSize = RecordNumberPerPage '指定每頁的記錄數目
rs.AbsolutePage = PageNumber '指定當前的頁號
%>
<title>西湖電子通訊系統設備部-在線留言管理</title>
</head>
<table width="95%" border="1"BORDERCOLORLIGHT="#000000" BORDERCOLORDARK="#FFFFFF" cellpadding="4" cellspacing="0" align="center">
<tr bgcolor="#8BA7C0">
<td colspan="7"><b><font color="#FFFFFF">::留言管理::</font></b></td>
</tr>
<% do while not rs.eof %>
<tr>
<td width="14%"> </td>
<td width="24%"><font color="#000099">公司名稱</font></td>
<td width="11%"><font color="#000099">聯系人</font></td>
<td width="11%"><font color="#000099">電話</font></td>
<td width="11%"><font color="#000099">傳真</font></td>
<td width="17%"><font color="#000099">電子郵件</font></td>
<td width="12%"><font color="#000099">登錄時間</font></td>
</tr>
<tr bgcolor="#F4FAFF" valign="middle">
<td rowspan="3" height="102" align="center"><a href="#"onclick="javascript:if (confirm('是否確定刪除?')) href='show.asp?del=<%=rs("id")%>';
else return;">刪除</a></td>
<td width="24%" bgcolor="#F4FAFF" height="34"><%=rs("companyname")%> <br>
</td>
<td width="11%" height="34"> <%=rs("Name")%></td>
<td width="11%" height="34"><%=rs("tel")%> </td>
<td width="11%" height="34"><%=rs("fax")%> </td>
<td width="17%" height="34"><%=rs("email")%> </td>
<td width="12%" height="34"><%=rs("Idate")%> </td>
</tr>
<tr bgcolor="#F4FAFF" valign="middle">
<td colspan="6" bgcolor="#F4FAFF" height="34"><font color="#000099">反饋信息類型: </font><%=rs("feedbacktype")%></td>
</tr>
<tr bgcolor="#F4FAFF" valign="middle">
<td colspan="6" bgcolor="#F4FAFF" height="34"><font color="#000099">反饋信息內容:</font><br>
<%=rs("feedbackcontent")%> </td>
</tr>
<% c=c+1
rs.movenext
if c>=RecordNumberPerPage then exit do
loop
%>
</table>
<table border="0" cellspacing="2" cellpadding="5" width="95%" align="center">
<tr>
<td class=td1 align="center" width="39" height= 32>總頁數</td>
<td class=td1 align="center" width="45" height= 32>總數</td>
<td class=td1 align="center" width="69" height= 32>每頁顯示數</td>
<td class=td1 align="center" width="53" height= 32>當前頁數</td>
<td class=td1 align="center" width="80" height= 32>頁數</td>
<td class=td1 align="center" width="48" height= 32>首頁</td>
<td class=td1 align="center" width="36" height= 32>末頁</td>
<td class=td1 align="center" width="41" height= 32>上一頁</td>
<td class=td1 align="center" width="49" height= 32>下一頁</td>
</tr>
<tr align="center">
<td width="39"><%=rs.PageCount%></td>
<td width="45"><%=rs.recordcount%></td>
<td width="69"><%=rs.PageSize%></td>
<td width="53"><%=PageNumber%></td>
<td width="80" valign="middle" class=td>
<select size="1" name="D1" onChange="MM_goToURL('parent','../chinese/this.value');return document.MM_returnValue">
<option>跳轉頁數</option>
<%
aaa=0
DO WHILE NOT aaa = rs.PageCount %>
<option value="show.asp?PageNumber=<% =aaa+1 %>">
<% =aaa+1 %>
</option>
<% aaa=aaa+1
loop
%>
</select>
</td>
<td width="48"><a href="show.asp">首頁</a></td>
<td width="36"><a href="show.asp?PageNumber=<%=rs.PageCount%>">末頁</a></td>
<td width="41">
<%
if PageNumber > 1 then '如果不是第一頁,則提示上一頁
Response.Write "<p><A href = show.asp?PageNumber="&(PageNumber-1)&">上一頁</a></p>"
end if
if pagenumber =1 then
response.write "<p>上一頁</p>"
end if
%>
</td>
<td width="49">
<%
if not rs.eof then '如果還有記錄沒有顯示,則提示下一頁
PageNumber = PageNumber + 1
Response.Write "<p><A href = show.asp?PageNumber="&PageNumber&">下一頁</a></p>"
end if
if rs.eof then '如果還有記錄沒有顯示,則提示下一頁
PageNumber = PageNumber + 1
Response.Write "<p>下一頁</p>"
end if
%>
</td>
</tr>
</table>
<%end if
rs.close
set rs=nothing%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -