www.gusucode.com > 共享世纪内容管理系统 2.1 build 080704 全站开源版 > replydo.asp
<head> <title>评论添加</title> <style> td{font-size:9pt;line-height:140%} body{font-size:9pt;line-height:140%} a:link { color: #0033CC; text-decoration: none } a:visited { color: #0033CC; text-decoration: none } a:active { color: #FF0000; text-decoration: none } a:hover { color: #000000; text-decoration: underline} </style> </head> <!--#include file="admin/md5.asp"--> <!--#include file="conn2.asp"--> <!--#include file="admin/config.asp"--> <!--#include file="admin/mdb_path_user_name.asp"--> <% content=request.form("content") infoid=trim(request.form("infoid")) user=trim(request.form("username")) password=md5(trim(request.form("password"))) if user="" or password="" or content="" then response.write("<script>alert('请填写各项内容,不能留空!');location.href='javascript:history.go(-1)'</script>") end if set conn_user=server.createobject("ADODB.CONNECTION") connstr_user="driver={Microsoft Access Driver (*.mdb)};dbq=" & server.mappath("admin/data/"&MDBname&".asp") conn_user.open connstr_user set rs=server.createobject("adodb.recordset") rs.open "select * from UserInfo where user='"&user&"'",conn_user,1,1 if rs.eof then response.write("<script>alert('抱歉,您不是本站注册用户,请先注册!');location.href='javascript:history.go(-1)'</script>") response.end else if rs("pwd")=password then '以上为lennyash修改 date=Now()+webtime/24 set rs=server.createobject("adodb.recordset") sql="select * from Reply" rs.open sql,conn,3,2 rs.addnew rs("username")=user rs("infoid")=infoid rs("content")=content rs("date")=date rs("check")=check rs.update rs.close if check="1" then response.write("<script>alert('成功:添加评论完成,即将刷新新闻html页!');location.href='admin/replyhtml.asp?type=page&id="&infoid&"'</script>") response.end else response.write("<script>alert('成功:添加评论完成,正在等待管理员的审核!');location.href='javascript:history.go(-1)'</script>") response.end end if else response.write("<script>alert('抱歉,您的密码有误,请重新填写!');location.href='javascript:history.go(-1)'</script>") response.end end if end if %>