⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comment.asp

📁 时代购物系统 4.0功能升级说明 <1>完善了3.0的VIP
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<title><%=webname%>--用户评论</title>
<%
dim id,action
id=request.QueryString("id")
action=request.QueryString("action")
if action="save" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from review",conn,1,3
rs.addnew
rs("id")=id
rs("title")=HTMLEncode2(trim(request.form("title")))
rs("reviewcontent")=HTMLEncode2(trim(request.form("reviewcontent")))
rs("reviewdtm")=now()
rs("audit")=0
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><br><a href=javascript:window.close()>关闭窗口</a></div></td></tr></table>"
response.End
end if
%> <table width="98%" border="1" cellspacing="0" cellpadding="1" bordercolor=<%=bgclr1%> align="center"> 
<tr> <td> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> 
<td rowspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="12v"> 
<tr> <td class="12v" > <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber3" height="0" width="100%"> 
<tr> <td> <table width="100%" border="0" cellspacing="1" cellpadding="2"> <tr> 
<td BGCOLOR=<%=bgclr1%>><DIV ALIGN="CENTER"><FONT COLOR="#FFFFFF" SIZE="4"><B>发表评论</B></FONT></DIV></td></tr> 
<tr> <form name="reviewform" method="post" action="comment.asp?action=save&id=<%=id%>"> 
<td> <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor=<%=bgclr4%>> 
<tr bgcolor=<%=bgclr3%>> <td width="23%">您的姓名:</td><td width="77%"> <input name="title" type="text" id="title" size="12"> 
</td></tr> <tr bgcolor=<%=bgclr3%>> <td valign="top">评论正文:</td><td BGCOLOR=<%=bgclr3%>> 
<textarea name="reviewcontent" cols="26" rows="5" id="reviewcontent"></textarea> 
</td></tr> <tr bgcolor=<%=bgclr3%>> <td colspan="2"> <div align="center"> <input type="submit" name="Submit"style="height:20; font:9pt; BORDER-BOTTOM: #cccccc 1px groove; BORDER-RIGHT: #cccccc 1px groove; BACKGROUND-COLOR: #eeeeee" value="提 交" onClick="return check();"> 
&nbsp; <input type="reset" name="Submit2" style="height:20; font:9pt; BORDER-BOTTOM: #cccccc 1px groove; BORDER-RIGHT: #cccccc 1px groove; BACKGROUND-COLOR: #eeeeee" value="清 除"> 
</div></td></tr> </table></td></form></tr> </table></td></tr> </table></td></tr> 
</table></td></tr> </table></td></tr> </table>
</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.reviewform.title.value)) {
	document.reviewform.title.focus();
    alert("请填写您的姓名!");
	return false;
  }
  if(checkspace(document.reviewform.reviewcontent.value)) {
	document.reviewform.reviewcontent.focus();
    alert("请填写评论正文!");
	return false;
  }
	  }
	  //-->
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -