<!--#include file="conn.asp"-->
<!--#include file="adminset.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
end if
if session("flag")>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
if qx8<>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if


if request("tit")="" then
response.write "<script LANGUAGE='javascript'>alert('对不起，请填写主题！');history.go(-1);</script>"
response.End
end if
if request("mal")="" then
response.write "<script LANGUAGE='javascript'>alert('对不起，请填写邮箱！');history.go(-1);</script>"
response.End
end if
if request("lxr")="" then
response.write "<script LANGUAGE='javascript'>alert('对不起，请填写联系人！');history.go(-1);</script>"
response.End
end if
if request("tel")="" then
response.write "<script LANGUAGE='javascript'>alert('对不起，请填写电话！');history.go(-1);</script>"
response.End
end if
if request("jg")="" then
response.write "<script LANGUAGE='javascript'>alert('对不起，请填写价格！');history.go(-1);</script>"
response.End
end if

action=request("action")
id=request("id")
select case action
case "add"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [shop_infomsg]",conn,1,3
rs.addnew
rs("kin")=request("anclassid")
rs("classid2")=request("nclassid")
rs("classid3")=request("xclassid")
rs("gq")=trim(request("gq"))
rs("tit")=trim(request("tit"))
rs("mal")=trim(request("mal"))
rs("lxr")=trim(request("lxr"))
rs("tel")=trim(request("tel"))
rs("qq")=trim(request("qq"))
rs("jg")=trim(request("jg"))
rs("ysh")=trim(request("ysh"))
rs("msg")=trim(request("msg"))
rs("whe")=trim(request("whe"))
rs("edt")=trim(request("edt"))
rs("userid")=trim(request("userid"))
rs("good")=0
rs("lls")=0
rs("tim")=now()
rs.update
rs.close
response.Redirect "info_manage.asp"
set rs=nothing

case "save"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from [shop_infomsg] where  id="&id&" ",conn,1,3
rs("kin")=request("anclassid")
rs("classid2")=request("nclassid")
rs("classid3")=request("xclassid")
rs("gq")=trim(request("gq"))
rs("tit")=trim(request("tit"))
rs("mal")=trim(request("mal"))
rs("lxr")=trim(request("lxr"))
rs("tel")=trim(request("tel"))
rs("qq")=trim(request("qq"))
rs("jg")=trim(request("jg"))
rs("ysh")=trim(request("ysh"))
rs("msg")=trim(request("msg"))
rs("whe")=trim(request("whe"))
rs("edt")=trim(request("edt"))
rs("userid")=trim(request("userid"))
rs("tim")=now()
rs.update
rs.close
set rs=nothing
response.Redirect "info_manage.asp"
end select
%>