viewfk.asp
来自「创建和运行动态、交互的Web服务器应用程序」· ASP 代码 · 共 151 行
ASP
151 行
<!--#include file="conn.asp"-->
<%
dim lx,Page,i_k
if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.reload('login.asp')</script>"
response.End
end if
%>
<html>
<head>
<title>读者留言</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css2.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="90%" height="450" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#ece9d8"><br><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td>
<table width=77 border="0" cellpadding="0" cellspacing="0">
<tr valign=bottom>
<td background=images/get_img.gif width=77 height=26><P style='PADDING-LEFT: 7px'><div align="center"><font color=#ffffff>读者留言</font></div></td>
</tr>
</table>
<td><div align="right">选择查看类型
<select name="select" onchange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}" >
<option selected >选择类型</option>
<option value="viewfk.asp?lx=0" >所有留言</option>
<option value="viewfk.asp?lx=1" >简单留言</option>
<option value="viewfk.asp?lx=2" >网站意见</option>
<option value="viewfk.asp?lx=3" >公司建议</option>
<option value="viewfk.asp?lx=4" >合作意向</option>
<option value="viewfk.asp?lx=5" >产品投诉</option>
<option value="viewfk.asp?lx=6" >服务投诉</option>
</select>
</div></td>
</tr>
</table>
<%
lx=request.QueryString("lx")
set rs=server.CreateObject("adodb.recordset")
if lx="" or lx=0 then
rs.open "select * from shop_fk order by fkdate desc",conn,1,1
else
rs.open "select * from shop_fk where fkleixing="&lx&" order by fkdate desc",conn,1,1
end if
if rs.eof And rs.bof then%>
<table width="98%" border="1" align=center cellspacing="0" cellpadding="3" bordercolordark="#FFFFFF" bordercolorlight="#666666">
<tr>
<td bgcolor="#ece9d8"><div align="center"><font color=red>对不起,暂时还没有任何信息!</font></div></td>
</tr>
</table>
<%else
//初值
Page = rs.AbsolutePage
rs.PageSize=3
//变化值
if Not IsEmpty(Request("Page")) then
Page = CInt(Request("Page"))
'//变化值情况分析
if Page > rs.PageCount then
rs.AbsolutePage = rs.PageCount
elseif Page <= 0 then
Page = 1
else
rs.AbsolutePage = Page
end if
else
Page = 1
end if%>
<table width="98%" border="1" align=center cellspacing="0" cellpadding="0" bordercolordark="#ffffff" bordercolorlight="#666666">
<%do while not rs.eof
if i_k>= rs.PageSize then Exit do%>
<tr>
<td height="25" bgcolor="#cccccc" style="padding-left: 8px">
<%
response.write "发表类型:"
select case rs("fkleixing")
case "1"
response.write "简单留言"
case "2"
response.write "网站意见"
case "3"
response.write "公司建议"
case "4"
response.write "合作意向"
case "5"
response.write "产品投诉"
case "6"
response.write "服务投诉"
end select
response.write " 用户:<a href=mailto:"&trim(rs("fkemail"))&" title=此用户访问IP地址是:"&trim(rs("fkip"))&">"&trim(rs("fkusername"))&"</a> 所在地:"&trim(rs("fklaizi"))%></td>
<td width="49" bgcolor="#cccccc" style="padding-left: 8px"><p align="center"><font color="#0000FF"><a href="fkreply.asp?id=<%=rs("fkid")%>" target='mainFrame'>回 复</font></td>
<td width="62" bgcolor="#cccccc"><div align="center"><a href="delfk.asp?id=<%=rs("fkid")%>" onClick="return confirm('您确定删除吗?')">删 除</a></div></td>
</tr>
<tr><% if trim(rs("fkreply"))<>"" then%>
<td colspan="3" bgcolor="#eeeeee"><div align="center">
<% else %>
<td colspan="3" bgcolor="#FAEAF1"><div align="center">
<%end if%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align=center><b><%=trim(rs("fksubject"))%></b></div>
<div STYLE='PADDING-LEFT: 30px'><%=trim(rs("fkcontent"))%></div>
<div align=right><%="发表时间:"&rs("fkdate")%> </div></td>
</tr>
<tr>
<td STYLE='PADDING-LEFT: 8px' bgcolor="#ffffff" height="25"><font color=blue>版主回复:</font><%=trim(rs("fkreply"))%></td>
</tr>
</table>
<%
rs.movenext
i_k=i_k+1
loop
end if
%>
<tr>
<td colspan=3 height=40><div align="center">共<font color=blue><%=rs.recordcount%></font>条<font color=blue><%=rs.pagecount%></font>页
<%if request("page")>1 then%>
<a Href="viewfk.asp?Page=<%=1%>">首页</a> <a Href="viewfk.asp?Page=<%=page-1%>">上一页</a>
<%end if %>
<%if request("page")<>rs.pagecount and page<rs.pagecount then %>
<a Href="viewfk.asp?Page=<% =page + 1%>">下一页</a> <a Href="viewfk.asp?Page=<%=rs.PageCount%>">尾页</a>
<%end if
if rs.pagecount>0 then %>
第<font color="#FF3300"><%=page%></font>页
<%end if%></font></div></td>
</tr>
</table>
<br>
</tr>
</table>
<%rs.close
set rs=nothing%>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?