?? pinglun.asp
字號:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<html>
<head>
<title><%=webname%>--用戶評論</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
<style>
td{font-size:9pt;line-height:120%;color:#353535}
body{font-size:9pt;line-height:120%}
a:link { color: #000000; text-decoration: none }
a:visited { color: #000000; text-decoration: none }
a:active { color: #000000; text-decoration: none }
a:hover { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px }
</style>
</head>
<body leftmargin="3" topmargin="4" marginwidth="00">
<%dim bookid,action
bookid=request.QueryString("id")
action=request.QueryString("action")
if action="save" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_pinglun",conn,1,3
rs.addnew
rs("bookid")=bookid
rs("pinglunname")=HTMLEncode2(trim(request("pinglunname")))
rs("pingluncontent")=HTMLEncode2(trim(request("pingluncontent")))
rs("pinglundate")=now()
rs("shenhe")=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="#CCCCCC" 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><img src="images/postreviws1.gif" width="280" height="21"></td>
</tr>
<tr>
<form name="pinglunform" method="post" action="pinglun.asp?action=save&id=<%=bookid%>">
<td>
<table width="100%" border="0" cellpadding="2" cellspacing="1">
<tr>
<td width="23%">您的姓名:</td>
<td width="77%">
<input name="pinglunname" type="text" id="pinglunname" size="12">
</td>
</tr>
<tr>
<td valign="top">評論正文:</td>
<td>
<textarea name="pingluncontent" cols="26" rows="5" id="pingluncontent"></textarea>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input type="image" border="0" name="submit" src="images/bc.gif" width="54" height="18" onClick="return check();">
<input type="image" border="0" name="submit2" src="images/qc.gif" width="54" height="18" onClick="return check();">
</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.pinglunform.pinglunname.value)) {
document.pinglunform.pinglunname.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 + -