📄 guestedit.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="ConnUser.asp"-->
<!--#include file="config.asp"-->
<!--#include file="Char.inc"-->
<%
reviewid=ChkRequest(request("reviewid"),1) '防注入
if reviewid="" then
Show_Err("未指定参数<br><br><a href='javascript:history.back()'>返回</a>")
response.end
else
if not IsNumeric(reviewid) then
Show_Err("非法参数<br><br><a href='javascript:history.back()'>返回</a>")
response.end
else
if request.cookies(Forcast_SN)("key")="super" then
aaas=1
set urs=server.createobject("adodb.recordset")
sql="select * from "& db_User_Table &" where "& db_User_Name &"='"& ChkRequest(Request.cookies(Forcast_SN)("name"), 0) &"'"
urs.open sql,ConnUser,1,3
if urs.bof or urs.eof then
aaas=0
else
if Request.cookies(Forcast_SN)("password")<>urs(db_User_Password) then
aaas=0
end if
end if
urs.close
set urs=nothing
set rs=server.createobject("adodb.recordset")
sql="select * from "& db_Review_Table &" where reviewid="&reviewid
rs.open sql,conn,1,3
if not rs.eof then
if request.cookies(Forcast_SN)("name")=rs("author") or aaas=1 then
dim qqhflag
qqhflag=rs("NewsID")
%>
<html>
<head>
<title>编辑留言__<%=jjgn%>完美设计网络科技有限公司 完美政府网站管理系统 http://www.wmgov.cn</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="news.css" rel=stylesheet type=text/css>
<script language="JavaScript">
<!--
function na_select_form (fname, type_name)
{
document.forms[fname].elements[type_name].select()
document.forms[fname].elements[type_name].focus()
}
// -->
</script>
<script language="javascript">
<!--
function checkdata()
{
if (document.form1.guestname.value=="")
{
alert("对不起,请输入您的大名!")
document.form1.guestname.focus()
return false
}
if (document.form1.verifycode9.value=="")
{
alert("对不起,请输入验证码!")
document.form1.verifycode9.focus()
return false
}
if (document.form1.content.value=="")
{
alert("对不起,请输入留言内容!")
return false
}
}
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]+"'");
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
<script language="JavaScript">
<!-- Hide from older browsers...
//Function to format text in the text box
function FormatText(command, option){
frames.message.document.execCommand(command, true, option);
frames.message.focus();
}
//Function to clear form
function ResetForm(){
if (window.confirm('确认要清空对话框内容?')){
frames.message.document.body.innerHTML = '';
return true;
}
return false;
}
//Function to open pop up window
function openWin(theURL,winName,features) {
window.open(theURL,winName,features);
}
function setMode(newMode)
{
bTextMode = newMode;
var cont;
if (bTextMode) {
cleanHtml();
cleanHtml();
cont=message.document.body.innerHTML;
message.document.body.innerText=cont;
} else {
cont=message.document.body.innerText;
message.document.body.innerHTML=cont;
}
message.focus();
}
function cleanHtml()
{
var fonts = message.document.body.all.tags("FONT");
var curr;
for (var i = fonts.length - 1; i >= 0; i--) {
curr = fonts[i];
if (curr.style.backgroundColor == "#ffffff") curr.outerHTML = curr.innerHTML;
}
}
// -->
</script>
<script language="JavaScript">
function about()
{
window.showModalDialog("about.htm","","dialogWidth:420px;dialogHeight:240px;scroll:no;status:no;help:no");
}
function help()
{
var helpmess;
helpmess="---------------填写帮助---------------\r\n\r\n"+
"1.请不要发表有危险性的脚本。\r\n\r\n"+
"2.如果要书写源代码,请选中\r\n\r\n"+
" 查看HTML源代码书写.\r\n\r\n"+
"3.需要你自己运行,才能看效果.\r\n\r\n"+
"4.如果书写js,尽量不要在这儿书写.\r\n\r\n";
alert(helpmess);
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0">
<!--#include file="top.asp"-->
<table width="1002" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr valign="top">
<td width="180" bordercolor="#FDFCF8" bgcolor="#FDFCF8" style="border-left: 1px solid #cccccc ; border-top: 1px solid #cccccc ; border-bottom: 1px solid #cccccc ; border-right: 1px solid #cccccc ">
<!--#include file="WmCms_Linterflow.asp"-->
</td>
<td width="6"></td>
<td style="border-left: 1px solid #cccccc ; border-top: 0px solid #cccccc ; border-bottom: 1px solid #cccccc ; border-right: 1px solid #cccccc ">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<form action="guestsave.asp?reviewid=<%=request("reviewid")%>" method=post name=form1 OnSubmit="return checkdata()" onReset="return ResetForm();">
<tr valign="top">
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table width="102%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="CDCCCC">
<td height="3" bgcolor="#FFFFFF" ><img src="images/kb.gif" width="9" height="3"></td>
</tr>
<tr bgcolor="CDCCCC">
<td width="100%" height="25" background="images/WmCms_Result.gif"> <a class=daohang href="./" >网站首页</a>><a href="GuestBook.asp" class="daohang">公众留言</a>><strong>编辑留言</strong></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<div align="center">
<table cellpadding=3 cellspacing=1 border=0 width=95%>
<tr>
<td width="15%" height="22" align="right"> 用户名:</td>
<td width="70%" height="22">
<input type="text" name="guestname" maxlength="10" size="10" style="font-family: 宋体; font-size: 9pt;" value="<%=rs("author")%>">
</td>
</tr>
<tr>
<td width="15%" height="22" align="right"> 密码:</td>
<td width="70%" height="22">
<input type="password" name="password" maxlength="10" size="10" style="font-family: 宋体; font-size: 9pt;">如果您是本站注册会员,请输入您的密码
</td>
</tr>
<tr>
<td width="15%" height="22" align="right"> <font color="#FF0000">*</font> 验证码:</td>
<td width="70%" height="22">
<%
dim num1,rndnum
Randomize
Do While Len(rndnum)<4
num1=CStr(Chr((57-48)*rnd+48))
rndnum=rndnum&num1
loop
session("verifycode9")=rndnum
%>
<input type="text" name="verifycode9" size="8" font face="宋体" style="font-size: 9pt">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -