📄 contact_us.asp
字号:
</table>
<p>
<%
else
%>
<!--回复留言-->
<%
if request.querystring("action")="addreply"then
if session("admin")="admin"then
replyid=request.querystring("id")
set rs=server.createobject("adodb.recordset")
sql="select reply From gbook where id= "+CStr(replyid)
rs.open sql,conn1,1,3
reply=request.form("reply")
rs("reply")=deal(reply)
rs.update
rs.close
set rs=nothing
conn1.close
response.redirect"contact_us.asp"
else
response.redirect"contact_us.asp?action=admin"
end if
%>
<%else%>
<!--删除留言-->
<%
if request.querystring("action")="del"then
if session("admin")="admin"then
delid=request.querystring("id")
set rs=server.createobject("adodb.recordset")
sql="delete * From gbook where id= "+CStr(delid)
rs.open sql,conn1,1,3
rs.close
set rs=nothing
conn1.close
response.redirect"contact_us.asp"
else
response.redirect"contact_us.asp?action=admin"
end if
%>
<a href=contact_us.asp class="cm">返回</a>
<%
else
%>
<!--添加新留言-->
<%
if request.querystring("action")="new"then
tit=request.form("tit")
com=request.form("com")
name=request.form("name")
from=request.form("from")
tel=request.form("tel")
mobile=request.form("mobile")
mail=request.form("mail")
set rs=server.createobject("adodb.recordset")
sql="select * from gbook where (id is null)"
rs.open sql,conn1,1,3
rs.addnew
rs("tit")=deal(tit)
rs("com")=deal(com)
rs("name")=deal(name)
rs("from")=deal(from)
rs("tel")=deal(tel)
rs("mail")=deal(mail)
rs("mobile")=deal(mobile)
if request.form("r1")=0 then
rs("sex")=0
else
rs("sex")=1
end if
rs("ip")=Request("REMOTE_ADDR")
rs("date")=now
rs.update
rs.close
set rs=nothing
conn1.close
response.redirect "contact_us.asp"%>
<%
else
if request.querystring("action")=""or request.querystring("action")="view"then
page=request.querystring("page")
set rs=server.createobject("adodb.recordset")
sql="select * from gbook order by id desc"
rs.open sql,conn1,1,3
maxjilu=rs.recordcount
t=page*6
rs.absoluteposition=t+1
f=t+6
for i=t+1 to f
idd=rs("id")
%>
</p>
<div align="center">
<center>
<table width="98%" height="129" border="0" cellpadding="0" cellspacing="4" bordercolor="#111111" id="AutoNumber5" style="border-collapse: collapse">
<tr>
<td height="18" colspan="2"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#CC0000">
<tr>
<td height="24" bgcolor="#DB8400"> <font color="#FFFFFF">主题:<%=rs("tit")%></font> <font color="#FFFFFF"><strong>
</strong>来自:</font> <font color="#FFFFFF"><%=rs("from")%></font>
<font color="#FFFFFF"> 时间:<%=rs("date")%></font></td>
</tr>
</table></td>
</tr>
<tr>
<td height="41"><div align="center"><font color="#006699" face="Verdana, Arial, Helvetica, sans-serif">昵称:</font><font color="#006600" face="Verdana, Arial, Helvetica, sans-serif"><%=rs("name")%>
</font> </div>
<center>
<% if rs("sex")=0 then
response.write("<img src=gbook/image/boy.gif>")
else
response.write("<img src=gbook/image/girl.gif>")
end if
%>
<br>
</center></td>
<td>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="8">
<tr>
<td height="40" bgcolor="#FFB442"><%=rs("com")%></td>
</tr>
</table></td>
</tr>
</table>
<%
if rs("reply")<>""then
%>
<table width="98%" border="0" align="center" cellpadding="8" cellspacing="0" bgcolor="#CCCCCC">
<tr>
<td height="28" bgcolor="#FFB442">
<p> <span class="cm"><font color="#FF0000"><strong><font color="#330000">回复:</font></strong>
</font></span><font color="#FF0000"><%=rs("reply")%></font><br>
</td>
</tr>
</table>
<%end if%>
</td>
</tr>
<tr>
<td height="3"><div align="center"><a href="contact_us.asp?action=reply&id=<%=rs("id")%>"><font color="#00CC00">回复</font></a></div></td>
<td height="3" style="font-family: Arial" > <div align="right">联系人:<font color="#006600"><%=rs("name")%></font>
联系电话:<b><font color="#FF0000"><%=rs("mobile")%></font></b>
QQ:<font color="#993300"><%=rs("tel")%></font> E-mail:<%=rs("mail")%></div></td>
</tr>
<tr>
<td height="2" colspan="2" background="images/line.gif">
</td>
</tr>
</table>
</center>
</div>
<%
rs.movenext
if rs.eof then
exit for
rs.close
conn1.close
end if
next
tt=page*6
if page<0 then
page=0
end if
if tt>=maxjilu then
ttt=page-1
end if
if maxjilu-tt<6 then
ttt=page-1
else
ttt=page
end if
u=1
do while u*6<maxjilu
u=u+1
loop
session("page")=ttt
%>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="96%" id="AutoNumber5">
<tr>
<td height="56"> <p align="right"><font color="#663300">总共
<font color="#ff0000"><%=u%></font><font color="#663300"><span class="cm">
页 第</span></font> <font color="#FF0000"><%=(page+1)%>
</font>页| <span class="cm"><font color="#003366"><a href="contact_us.asp?page=0">首页</a></font></span>-<span class="cm"><a href="contact_us.asp?page=<%=(ttt-1)%>">前一页</a>-<a href="contact_us.asp?page=<%=(ttt+1)%>">下一页</a>-<a href="contact_us.asp?page=<%=(u-1)%>">尾页</a>
<%
if ttt<=6 then
uu=0
while uu<u
%>
<a href=contact_us.asp?page=<%=(uu)%>>[<%=(uu+1)%>]</a>
<%uu=uu+1
wend
else%>
<a href=contact_us.asp?page=<%=(ttt-2)%>>[<%=(ttt-3)%>]</a>
<a href=contact_us.asp?page=<%=(ttt-1)%>>[<%=(ttt-2)%>]</a>
<a href=contact_us.asp?page=<%=(ttt)%>>[<%=(ttt-1)%>]</a>
<a href=contact_us.asp?page=<%=(ttt+1)%>>[<%=(ttt)%>]</a>
<a href=contact_us.asp?page=<%=(ttt+2)%>>[<%=(ttt+1)%>]</a></span></font>
<%end if%>
<%
end if
end if
end if
end if
end if
end if
end if
%>
<br>
</td>
</tr>
</table>
</center>
</div></td>
</tr>
</table>
<div align="center">
<center>
</center>
</div></td>
</tr>
</table></td>
</tr>
</table><!-- #include file="foot.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -