📄 admingbookedit.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/sessionadmin.asp"-->
<%
ID=Request("ID")
IF Request.Form.Count<>0 Then
Suc=True
Sex=Request.Form("Sex")
Email=Trim(Request.Form("Email"))
Homepage=Trim(Request.Form("Homepage"))
Title=Trim(Request.Form("Title"))
Content=Trim(Request.Form("Content"))
OICQ=Trim(Request.Form("OICQ"))
FormWhere=Request.Form("FormWhere")
IF Title="" Then
ErrInfo=ErrInfo & "·请填写留言主题<BR>"
Suc=False
End IF
IF Content="" Then
ErrInfo=ErrInfo & "·请填写留言内容<BR>"
Suc=False
End IF
IF OICQ="" Then
OICQ=0
Else
IF Not IsNumeric(OICQ) Then
ErrInfo=ErrInfo & "·请填写正确的OICQ<BR>"
Suc=False
End IF
End IF
IF Email="" Then
Email="no"
Else
IF Instr(Email,"@")=0 Then
ErrInfo=ErrInfo & "·请填写正确的Email<BR>"
Suc=False
End IF
End IF
IF Homepage="" Then
Homepage="no"
End IF
IF LEN(Title)>25 Then
ErrInfo=ErrInfo & "·标题的长度不能超过25个字符<BR>"
Suc=False
End IF
IF Suc Then
SQL="Select * From 留言信息 Where ID=" & Int(ID)
Set RS=Server.CreateObject("ADODB.Recordset")
RS.Open SQL,Connstr,3,2
RS("性别")=Sex
RS("OICQ")=OICQ
RS("电子邮箱")=Email
RS("主题")=Title
RS("来自")=FormWhere
RS("主页")=Homepage
RS("内容")=Content
RS.Update
End IF
End IF
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<%IF Request.Form.Count<>0 And Suc=True Then%>
<meta http-equiv="refresh" content="3;url=admingbook.asp">
<%End IF%>
<!--#include file="inc/css.asp"-->
<title><%=WebsiteName%></title>
</head>
<body topmargin="0" background="images/bg.gif">
<!--#include file="admintop.asp"-->
<div align="center">
<center>
<table border="0" width="755" cellspacing="0" cellpadding="0">
<tr>
<td width="189" style="background-color: #FFFFFF; border-left: 1 solid #000000; border-top: 1 solid #000000; border-bottom: 1 solid #000000" valign="top">
<!--#include file="aleft.asp"-->
</td>
<td width="562" style="background-color: #FFFFFF; border: 1 solid #000000" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="25" bgcolor="#EDEDED" style="border-bottom: 1 solid #000000;">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<p align="center">留言信息管理</td>
</tr>
</table>
</td>
</tr>
<%IF Request.Form.Count=0 Then%>
<form action="" method="post">
<tr>
<td width="100%" valign="top" height="8"></td>
</tr>
<tr>
<td width="100%" valign="top" height="10"><div align="center">
<center>
<table border="0" width="90%" cellspacing="0" cellpadding="0" style="border: 1 solid #000000" height="136">
<tr>
<td width="500" background="images/bg2.gif" height="22" colspan="2">
<p align="center"><b>编 辑 留 言</b></td>
</tr>
</center>
<%
SQL="Select * From 留言信息 Where ID=" & Int(ID)
Set RS=Server.CreateObject("ADODB.Recordset")
RS.Open SQL,COnnstr,1,1
IF RS.EOF Then
Response.Redirect "error.asp"
End IF
%>
<tr>
<td width="125" height="22" bgcolor="#F6F6F6" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<p align="center">性 别
</td>
<td width="377" height="22" bgcolor="#F6F6F6" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<select size="1" name="Sex" style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 23; width: 109; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%">
<option value="男">我是男生</option>
<option value="女">我是女生</option>
</select>
</td>
</tr>
<tr>
<td width="125" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<p align="center">来 自
</td>
<td width="377" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<select size="1" name="FormWhere" style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 23; width: 109; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%">
<option value=广东省>广东省</option>
<option value=北京市>北京市</option>
<option value=上海市>上海市</option>
<option value=天津市>天津市</option>
<option value=重庆市>重庆市</option>
<option value=香港特别行政区>香港特别行政区</option>
<option value=澳门特别行政区>澳门特别行政区</option>
<option value=中国台湾>中国台湾</option>
<option value=安徽省>安徽省</option>
<option value=福建省>福建省</option>
<option value=海南省>海南省</option>
<option value=浙江省>浙江省</option>
<option value=江苏省>江苏省</option>
<option value=江西省>江西省</option>
<option value=山东省>山东省</option>
<option value=山西省>山西省</option>
<option value=四川省>四川省</option>
<option value=湖北省>湖北省</option>
<option value=湖南省>湖南省</option>
<option value=河北省>河北省</option>
<option value=河南省>河南省</option>
<option value=黑龙江省>黑龙江省</option>
<option value=吉林省>吉林省</option>
<option value=辽宁省>辽宁省</option>
<option value=云南省>云南省</option>
<option value=贵州省>贵州省</option>
<option value=青海省>青海省</option>
<option value=陕西省>陕西省</option>
<option value=甘肃省>甘肃省</option>
<option value=广西自治区>广西自治区</option>
<option value=内蒙古自治区>内蒙古自治区</option>
<option value=宁夏自治区>宁夏自治区</option>
<option value=西藏自治区>西藏自治区</option>
<option value=新疆自治区>新疆自治区</option>
</select>
</td>
</tr>
<tr>
<td width="125" height="25" bgcolor="#F6F6F6" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<p align="center">腾讯QQ
</td>
<td width="377" height="25" bgcolor="#F6F6F6" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<input type=text name="OICQ" size=12 maxlength=12 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 108; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%" value="<%=RS("OICQ")%>">
</td>
</tr>
<tr>
<td width="125" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<p align="center">邮 件
</td>
<td width="377" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<input type=text name="Email" size=12 maxlength=30 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 218; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%" value="<%=RS("电子邮箱")%>">
</td>
</tr>
<tr>
<td width="125" height="25" bgcolor="#F6F6F6" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<p align="center">主 页
</td>
<td width="377" height="25" bgcolor="#F6F6F6" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<input type=text name="Homepage" size=12 maxlength=50 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 218; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%" value="<%=RS("主页")%>">
</td>
</tr>
<tr>
<td width="125" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<p align="center">主 题
</td>
<td width="377" height="25" bgcolor="#EDEDED" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<p>
<input type=text name="Title" size=12 maxlength=30 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 218; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%" value="<%=RS("主题")%>">
</p>
</td>
</tr>
<tr>
<td width="125" height="22" bgcolor="#F6F6F6" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<p align="center">内 容
</td>
<td width="377" height="22" bgcolor="#F6F6F6" style="border-right: 1 solid #cccccc; border-bottom: 1 solid #cccccc">
<p style="margin-left: 5; margin-top: 3; margin-bottom: 3"><textarea rows="5" name="Content" cols="40"><%=RS("内容")%></textarea></p>
</td>
</tr>
<tr>
<td colspan="2" width="500" bgcolor="#EDEDED">
<p align="center" style="margin-top: 5; margin-bottom: 5"> <input type="submit" name="submit" value=" 提 交 " style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 75; border: 1px groove #000000; background-position: 0% 50%">
<input type="reset" name="Reset" value=" 重 置 " style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 75; border: 1px groove #000000; background-position: 0% 50%">
</td>
</tr>
</table>
</div></td>
</tr>
</form>
<%Else%>
<%IF Suc=False Then%>
<tr>
<td width="100%" valign="top"><div align="center">
<center>
<table border="0" width="90%" cellspacing="0" cellpadding="0" style="border: 1 solid #000000">
<tr>
<td width="100%" background="images/bg2.gif" height="22" colspan="2">
<p align="center"><b><font color="#FF0000">编辑留言出错</font></b></td>
</tr>
<tr>
<td width="100%" colspan="2">
<p style="line-height: 150%; margin-left: 50; margin-top: 2; margin-bottom: 2"><font color=red><%=ErrInfo%></font></td>
</tr>
</center>
<tr>
<td width="40%" height="22" background="images/bg3.GIF" valign="bottom">
<p align="right"><img border="0" src="images/go.gif" width="15" height="15"></td>
<center>
<td width="60%" height="22" background="images/bg3.GIF" valign="bottom"><a href="javascript:history.back()">返回上一页重新填写</a></td>
</tr>
</table>
</center>
</div></td>
</tr>
<%Else%>
<tr>
<td width="100%" valign="top"><div align="center">
<center>
<table border="0" width="90%" cellspacing="0" cellpadding="0" style="border: 1 solid #000000">
<tr>
<td width="100%" background="images/bg2.gif" height="22">
<p align="center"><b><font color="#FF0000">签写留言成功</font></b></td>
</tr>
<tr>
<td width="100%">
<p style="line-height: 150%; margin-top: 20; margin-bottom: 20" align="center"><font color="#FF0000">恭喜您,您已经成功的编辑留言,三秒钟后系统自动返回!</font><br>
[<a href="admingbook.asp">返回访客留言管理首页</a>]</td>
</tr>
</center>
<center>
</table>
</center>
</div></td>
</tr>
<%End IF%>
<%End IF%>
<tr>
<td width="100%" valign="top">
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!--#include file="bottom.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -