<%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
%><!--#include file="ljconn.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
title=request("title")
img=request("img")
if instr(request("url"),"http://")>0 then
url=request("url")
else
url="http://"&request("url")
end if
lbid=request("lbid")
px=request("px")
%>
<%
id=request("id")
action=request.QueryString("action")
select case action
case "add"
'检查排序是否被占用开始－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from zsxx",conn,1,3
rs.AddNew
rs("title")=title '
rs("img")=img
rs("url")=url
rs("px")=px
rs("lbid")=lbid
rs.Update
rs.Close
response.Write "<script language=javascript>alert('添加成功！');location.href='addzsxx.asp';</script>"
response.End
case "edit"
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from zsxx where id="&id&"",conn,1,3
rs("title")=title '
rs("img")=img
rs("url")=url
rs("lbid")=lbid
rs("px")=px
rs.Update
rs.Close
set rs=nothing
conn.close
set conn=nothing
response.Write "<script language=javascript>alert('修改成功！');location.href='managezsxx.asp';</script>"
response.End
end select
%>