www.gusucode.com > 凡人网络购物系统 2008源码程序 > addly.asp

    <!--#include file="conn.asp"-->
<title>商品评论</title>
<link href=Skin/<%=venshop_skin%>/css.css rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<body topmargin="5" leftmargin="0" rightmargin="0" bottommargin="0">
<%
If request("action")="add" Then
id=request("id")
chkid(id)
mail=DelStr(request("Mail"))
Comment=DelStr(Request("Comment"))
title=DelStr(Request("title"))
if mail="" or Comment="" or title="" then
response.write "必须项为空时系统不接受" 
response.end
else
Set rs=Server.CreateObject("ADODB.Recordset")
Sql="select * from venshop_comment"
rs.open sql,conn,1,3 
rs.addnew
rs("mail")=mail
rs("comment")=comment
rs("title")=title
rs("dateid")=id
rs("date")=date()
rs("c_c")=0
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "感谢您的留言,管理员会尽管处理。" 
response.end
end if
else
id=request("id")
%>
<div align="center">
<table cellspacing=1 cellpadding=0><form name="form" method="post" action="addly.asp?action=add&id=<%=id%>">
<tr><th colspan="2" align=left class="cartshowa">&nbsp;发表评论</th></tr>
<tr><td align=right class="cartshow1">昵称:</td><td class="cartshow1"><input name="mail" type="text" size="30" maxlength="250"></td></tr>
<tr><td align=right class="cartshow0">标题:</td><td class="cartshow0">
	<input name="title" type="text" size="30" maxlength="250"></td></tr>
<tr><td align=right class="cartshow1">内容:</td><td class="cartshow1"><textarea name="comment" cols="40" rows="5"></textarea></td></tr>
<tr><td colspan="2" align=center class="cartshow0"><input type="submit" name="Submit" value="发表">&nbsp;&nbsp;<input type="reset" name="Submit2" value="清空"></td></tr>
</form></table>
</div>
<%end if%>