📄 pinglun.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="adminset.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.href='login.asp';</script>"
response.End
end if
if session("flag")>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限!</b></font></div>"
response.End
end if
if qx1<>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限!</b></font></div>"
response.End
end if
%>
<html>
<head>
<title><%=webname%>--用户评论</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
color: #000000;
font-weight: bold;
}
-->
</style>
</head>
<body leftmargin="3" topmargin="4" marginwidth="00">
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/right_top2.gif">
<tr>
<td width="1%"> </td>
<td width="99%"><table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="30%" style="font-size:14px;color:#ffffff"> <span class="style1">发表评论</span></td>
<td width="70%" align="right"> </td>
</tr>
</table></td>
</tr>
</table>
<%dim shopid,action
pinglunid=request.QueryString("id")
action=request.QueryString("action")
if action="save" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_pinglun where pinglunid="&pinglunid,conn,1,3
rs("huifu")=HTMLEncode2(trim(request("huifu")))
rs("huifudate")=now()
rs.update
rs.close
set rs=nothing
response.write "<br><br><table width=96% border=0 align=center cellpadding=0 cellspacing=0><tr><td height=86 bgcolor=#F5F5F5><div align=center>"
response.write "您的回复已成功提交!<br><br><a href=javascript:window.close()>关闭窗口</a></div></td></tr></table>"
response.End
end if
%>
<br>
<%set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_pinglun where pinglunid="&pinglunid,conn,1,3
%>
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#9DB2D4">
<form name="pinglunform" method="post" action="pinglun.asp?action=save&id=<%=pinglunid%>"><tr bgcolor="#C7D3E6">
<td colspan="4"><div align="center"><strong>评论标题:</strong>
<input name="pingluntitle" class="wenbenkuang" type="text" id="pingluntitle" size="26" value="<%=rs("pingluntitle")%>" readonly>
<strong>IP:</strong><%=trim(rs("ip"))%><strong> 姓名:</strong>
<input name="pinglunname" class="wenbenkuang" type="text" id="pinglunname2" size="12" value="<%=rs("pinglunname")%>" readonly>
<strong>评级:</strong><img src="../images/pingji/<%=rs("pingji")%>.gif"></div></td>
</tr>
<tr bgcolor="#F0F3F8">
<td width="14%" valign="top"><div align="center"><strong>评论正文:</strong></div></td>
<td colspan="3">
<textarea name="pingluncontent" class="wenbenkuang" cols="80" rows="5" id="pingluncontent" readonly><%=rs("pingluncontent")%></textarea>
</td>
</tr>
<tr bgcolor="#F0F3F8">
<td valign="top"><div align="center"><font color="#FF0000">管理回复:</font></div></td>
<td colspan="3">
<textarea name="huifu" cols="80" rows="5" id="huifu"><%=rs("huifu")%></textarea>
</td>
</tr>
<tr bgcolor="#F0F3F8">
<td colspan="4">
<div align="center">
<input name="Submit" type="submit" class="go-wenbenkuang" value="提交回复" onClick="return check();">
</div></td>
</tr></form>
</table>
<%rs.close
set rs=nothing%>
</body>
</html>
<%function HTMLEncode2(fString)
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
fString = Replace(fString, CHR(10), "<BR>")
HTMLEncode2 = fString
end function%>
<script LANGUAGE="javascript">
<!--
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
function check()
{
if(checkspace(document.pinglunform.pinglunname.value)) {
document.pinglunform.pinglunname.focus();
alert("请填写您的姓名!");
return false;
}
if(checkspace(document.pinglunform.pingluntitle.value)) {
document.pinglunform.pingluntitle.focus();
alert("请填写评论标题!");
return false;
}
if(checkspace(document.pinglunform.pingluncontent.value)) {
document.pinglunform.pingluncontent.focus();
alert("请填写评论正文!");
return false;
}
}
//-->
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -