<!--#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 qx14<>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if

if request("lx")="" then
response.write "<script LANGUAGE='javascript'>alert('对不起，请选择类型！');history.go(-1);</script>"
response.End
end if
if request("zt")="" then
response.write "<script LANGUAGE='javascript'>alert('对不起，请填写主题！');history.go(-1);</script>"
response.End
end if
if request("nr")="" 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_usergg]",conn,1,3
rs.addnew
rs("zt")=trim(request("zt"))
rs("nr")=trim(request("nr"))
rs("fbr")=session("admin")
rs("lx")=trim(request("lx"))
rs("hot")=0
rs("adddate")=now()
rs.update
rs.close
response.Redirect "web_gonggao1.asp"
set rs=nothing

case "save"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_usergg where id="&id&" ",conn,1,3
rs("zt")=trim(request("zt"))
rs("nr")=trim(request("nr"))
rs("fbr")=session("admin")
rs("lx")=trim(request("lx"))
rs("adddate")=now()
rs.update
rs.close
set rs=nothing
response.Redirect "web_gonggao1.asp"
end select
%>