www.gusucode.com > 掌柜网店购物系统 4.0码程序 > admin/pinglun.asp
<!--#include file="conn.asp"--> <html><head><title><%=webname%>--用户评论</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link href="../img/css.css" rel="stylesheet" type="text/css"> <style> BODY { SCROLLBAR-FACE-COLOR: #e7e7e7; SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; SCROLLBAR-SHADOW-COLOR: #d4d0c8; SCROLLBAR-3DLIGHT-COLOR: #FFFFFF; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-TRACK-COLOR: #f7f7f7; SCROLLBAR-DARKSHADOW-COLOR: #e7e7e7; } .style3 {color: #FF6600} </style> </head> <body leftmargin="0" topmargin="5" marginwidth="0" bgcolor="#f2f2f2"> <%dim bookid,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 "<script language=javascript>alert('您的回复已成功提交!!');history.go(-1);</script>" response.End end if %> <table class="tableBorder" width="96%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td align="center" bgcolor="#dfdfdf"><b>发表评论</font></b></td> </tr> <tr> <form name="pinglunform" method="post" action="pinglun.asp?action=save&id=<%=pinglunid%>"> <td bgcolor="#f2f2f2"> <%set rs=server.CreateObject("adodb.recordset") rs.open "select * from shop_pinglun where pinglunid="&pinglunid,conn,1,3 %> <table width="100%" align="center" border="0" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF"> <tr bgcolor="#f2f2f2"> <td width="40%" align="right">姓 名:</td> <td width="60%"> <input name="pinglunname" type="text" id="pinglunname" size="30" value="<%=rs("pinglunname")%>" readonly> </td> </tr> <tr bgcolor="#f2f2f2"> <td align="right">评 级:</td> <td><img src="../img/level<%=rs("pingji")%>.gif"> </td> </tr> <tr bgcolor="#f2f2f2"> <td align="right">评论标题:</td> <td><input name="pingluntitle" type="text" id="pingluntitle" size="30" value="<%=rs("pingluntitle")%>" readonly></td> </tr> <tr bgcolor="#f2f2f2"> <td align="right" valign="top">评论正文:</td> <td><textarea name="pingluncontent" cols="30" rows="3" id="pingluncontent" readonly><%=rs("pingluncontent")%></textarea></td> </tr> <tr bgcolor="#f2f2f2"> <td align="right" valign="top"><font color="#FF0000">管理回复:</font></td> <td><textarea name="huifu" cols="30" rows="5" id="huifu"><%=rs("huifu")%></textarea></td> </tr> <tr bgcolor="#f2f2f2"> <td></td> <td> <input onClick="return check();" name="submit" type="submit" value="回复保存"> <input onclick="ClearReset()" type="reset" name="Clear" value="重新填写"></td> </tr> </table> <%rs.close set rs=nothing%> </td> </form> </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.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>