<!--#include file="ljconn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>1 then
response.Write "<p align=center><font color=red>您没有此项目管理权限！</font></p>"
response.End
end if
end if
%>
<%'dim action,anclassid
id=request.QueryString("id")
pingpainame2=request("pingpainame2")
action=request.querystring("action")
select case action
'//添加新数据
case "add" 
if pingpainame2="" then
response.Redirect "pingpaimanage1.asp"
response.End()
end if
'lgclass=request("lgclass")
'if lgclass="0" then
'response.Redirect "pingpaimanage.asp"
'response.End()
'end if
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from pingpai1",conn,1,3
rs.AddNew
rs("pingpainame")=trim(request("pingpainame2"))
rs("img")=request("img")
rs("flag")=request("flag")
rs.Update
rs.Close
set rs=nothing
response.Redirect "pingpaimanage1.asp"
'//修改数据
case "edit"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from pingpai1 where id="&id,conn,1,3
'rs("pingpainame")=trim(request("pingpainame"))
rs("img")=request("img")
rs("flag")=request("flag")
rs.Update
rs.Close
set rs=nothing
response.Redirect "pingpaimanage1.asp"
'//删除数据
case "del"
conn.execute ("delete from pingpai1 where id="&id)
'conn.execute ("delete from ztbl_2 where xsid="&id)
response.Redirect "pingpaimanage1.asp"
end select
%>
