企业信息列表
<%
if Instr(session("AdminPurview"),"|29,")=0 then
response.write ("
您没有管理该模块的权限!
")
response.end
end if
dim Result
Result=request.QueryString("Result")
dim ID,AdminName,Working,Password,vPassword,UserName,Purview,Explain,AddTime
ID=request.QueryString("ID")
if ID="" then ID=0
call AdminEdit()
%>
<%
sub AdminEdit()
dim Action,rsCheckAdd,rs,sql
Action=request.QueryString("Action")
if Action="SaveEdit" then
set rs = server.createobject("adodb.recordset")
if Result="Add" then
set rsCheckAdd = conn.execute("select AdminName from LiangJingCMS_Admin where AdminName='" & trim(Request.Form("AdminName")) & "'")
if not (rsCheckAdd.bof and rsCheckAdd.eof) then
response.write ""
response.end
end if
sql="select * from LiangJingCMS_Admin"
rs.open sql,conn,1,3
rs.addnew
if len(trim(Request.Form("AdminName")))<3 or len(trim(Request.Form("AdminName")))>10 then
response.write ""
response.end
end if
if len(trim(Request.Form("Password")))<6 or len(trim(Request.Form("Password")))>16 then
response.write ""
response.end
end if
if Request.Form("Password")<>Request.Form("vPassword") then
response.write ""
response.end
end if
rs("AdminName")=trim(Request.Form("AdminName"))
if Request.Form("Working")=1 then
rs("Working")=Request.Form("Working")
else
rs("Working")=0
end if
rs("Password")=Md5(Request.Form("Password"))
rs("UserName")=trim(Request.Form("UserName"))
rs("AdminPurview")=Request.Form("Purview1") & Request.Form("Purview2") &_
Request.Form("Purview3") & Request.Form("Purview4") & Request.Form("Purview5") &_
Request.Form("Purview6") & Request.Form("Purview7") & Request.Form("Purview8") &_
Request.Form("Purview9") & Request.Form("Purview10") & Request.Form("Purview11") &_
Request.Form("Purview12") & Request.Form("Purview13") &_
Request.Form("Purview14") & Request.Form("Purview15") & Request.Form("Purview16") &_
Request.Form("Purview17") & Request.Form("Purview18") &_
Request.Form("Purview19") & Request.Form("Purview20") & Request.Form("Purview21") &_
Request.Form("Purview22") & Request.Form("Purview23") & Request.Form("Purview24") &_
Request.Form("Purview25") &_
Request.Form("Purview26") & Request.Form("Purview27") & Request.Form("Purview28") &_
Request.Form("Purview29") & Request.Form("Purview30") & Request.Form("Purview31") &_
Request.Form("Purview32") & Request.Form("Purview33") & Request.Form("Purview34") &_
Request.Form("Purview35") & Request.Form("Purview36") & Request.Form("Purview37") &_
Request.Form("Purview38") & Request.Form("Purview39") & Request.Form("Purview40")
rs("Explain")=trim(Request.Form("Explain"))
rs("AddTime")=now()
end if
if Result="Modify" then
sql="select * from LiangJingCMS_Admin where ID="&ID
rs.open sql,conn,1,3
rs("AdminName")=trim(Request.Form("AdminName"))
if Request.Form("Working")=1 then
rs("Working")=Request.Form("Working")
else
rs("Working")=0
end if
if trim(Request.Form("Password"))<>"" then
if len(trim(Request.Form("Password")))<6 or len(trim(Request.Form("Password")))>16 then
response.write ""
response.end
end if
if Request.Form("Password")<>Request.Form("vPassword") then
response.write ""
response.end
end if
rs("Password")=Md5(Request.Form("Password"))
end if
rs("UserName")=trim(Request.Form("UserName"))
rs("AdminPurview")=Request.Form("Purview1") & Request.Form("Purview2") &_
Request.Form("Purview3") & Request.Form("Purview4") & Request.Form("Purview5") &_
Request.Form("Purview6") & Request.Form("Purview7") & Request.Form("Purview8") &_
Request.Form("Purview9") & Request.Form("Purview10") & Request.Form("Purview11") &_
Request.Form("Purview12") & Request.Form("Purview13") &_
Request.Form("Purview14") & Request.Form("Purview15") & Request.Form("Purview16") &_
Request.Form("Purview17") & Request.Form("Purview18") &_
Request.Form("Purview19") & Request.Form("Purview20") & Request.Form("Purview21") &_
Request.Form("Purview22") & Request.Form("Purview23") & Request.Form("Purview24") &_
Request.Form("Purview25") &_
Request.Form("Purview26") & Request.Form("Purview27") & Request.Form("Purview28") &_
Request.Form("Purview29") & Request.Form("Purview30") & Request.Form("Purview31") &_
Request.Form("Purview32") & Request.Form("Purview33") & Request.Form("Purview34") &_
Request.Form("Purview35") & Request.Form("Purview36") & Request.Form("Purview37") &_
Request.Form("Purview38") & Request.Form("Purview39") & Request.Form("Purview40")
rs("Explain")=trim(Request.Form("Explain"))
end if
rs.update
rs.close
set rs=nothing
response.write ""
else
if Result="Modify" then
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_Admin where ID="& ID
rs.open sql,conn,1,1
AdminName=rs("AdminName")
Working=rs("Working")
UserName=rs("UserName")
Purview=rs("AdminPurview")
Explain=rs("Explain")
rs.close
set rs=nothing
end if
end if
end sub
%>