Admin_Master.asp
上传用户:angela
上传日期:2022-05-11
资源大小:853k
文件大小:24k
源码类别:

外挂编程

开发平台:

ASP/ASPX

  1. <!--#include file="setup.asp"-->
  2. <!--#include file="check.asp"-->
  3. <!--#include file="inc/md5.asp"-->
  4. <%
  5. If Not CheckAdmin("999") Then
  6.     Server.Transfer("showerr.asp")
  7.     Response.End
  8. End If
  9. '=====================================================================
  10. ' 作者声明:转载请保留版权信息,鄙视不要脸的人
  11. '=====================================================================
  12. ' 程序名称:蓝宇网络发布系统
  13. ' 程序作者:蓝宇 QQ:18159079 ╲、随心゛ QQ:6821845
  14. ' 文件名称:Admin_Master.asp
  15. ' 更新日期:2007-6-5
  16. '=====================================================================
  17. ' 联系方式:Tel:13203117383,QQ:18159079,hi.baidu.com/hezeyu
  18. ' 程序开发:蓝宇,╲、随心゛
  19. ' 官方网站:蓝宇网络(http://hi.baidu.com/hezeyu)
  20. '=====================================================================
  21. ' Copyright 2004-2007 蓝宇 - All Rights Reserved.
  22. '=====================================================================
  23. Dim selAdminID
  24. Dim strClass
  25. titlename="系统管理员"
  26. Admin_header
  27. Response.Write "<table cellpadding=2 cellspacing=1 border=0 class=tableBorder align=center>" & vbCrLf
  28. Response.Write " <tr>" & vbCrLf
  29. Response.Write " <th height=22 colspan=6>管理员管理</th>" & vbCrLf
  30. Response.Write " </tr>" & vbCrLf
  31. Response.Write " <tr>" & vbCrLf
  32. Response.Write " <td " & LeftClass & "> <b>管理选项:</b> <a href=admin_master.asp>管理首页</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href=admin_master.asp?action=add>添加管理员</a>"
  33. Response.Write " </td>" & vbCrLf
  34. Response.Write " </tr>" & vbCrLf
  35. Response.Write " </table><br>" & vbCrLf
  36. Action = LCase(Request("action"))
  37. Select Case Trim(Action)
  38. Case "renew"
  39.         Call UpdateFlag
  40. Case "del"
  41.         Call del
  42. Case "pasword"
  43.         Call pasword
  44. Case "newpass"
  45.         Call newpass
  46. Case "add"
  47.         Call addadmin
  48. Case "edit"
  49.         Call userinfo
  50. Case "savenew"
  51.         Call savenew
  52. Case "active"
  53.         Call ActiveLock
  54. Case Else
  55.         Call userlist
  56. End Select
  57. If FoundErr = True Then
  58.         ReturnError(ErrMsg)
  59. End If
  60. Admin_footer
  61. CloseConn
  62. Private Sub userlist()
  63.         Response.Write "<table cellpadding=""2"" cellspacing=""1"" border=""0"" class=""tableBorder"" align=center>" & vbCrLf
  64.         Response.Write " <tr>" & vbCrLf
  65.         Response.Write "<th><B>用户名</B></th>" & vbCrLf
  66.         Response.Write "<th><B>上次登陆时间</B></th>" & vbCrLf
  67.         Response.Write "<th><B>上次登陆IP</B></th>" & vbCrLf
  68.         Response.Write "<th><B>级别</B></th>" & vbCrLf
  69.         Response.Write "<th><B>操作</B></th>" & vbCrLf
  70.         Response.Write "<th><B>状态</B></th>" & vbCrLf
  71.         Response.Write " </tr>" & vbCrLf
  72.         Set Rs = tee5.Execute("select * from Gq_Admin order by Logintime desc")
  73.         Do While Not Rs.EOF
  74.         Response.Write " <tr>" & vbCrLf
  75.         Response.Write " <td " & CenterClass & "><a href=""?id="
  76.         Response.Write Rs("id")
  77.         Response.Write "&action=edit"">"
  78.         Response.Write Rs("AdminName")
  79.         Response.Write "</a></td>" & vbCrLf
  80.         Response.Write "<td align=center " & CenterClass & ">"
  81.         Response.Write Rs("Logintime")
  82.         Response.Write "</td>" & vbCrLf
  83.         Response.Write "<td align=center " & CenterClass & ">"
  84.         Response.Write Rs("Loginip")
  85.         Response.Write "</td>" & vbCrLf
  86.         Response.Write "<td align=center " & CenterClass & ">"
  87.         If Rs("status")="高级管理员" then
  88.         Response.Write "<font color=red>"
  89.         Response.Write Rs("status")
  90.         Response.Write "</font>"
  91.         Else
  92.         Response.Write Rs("status")
  93.         End If
  94.         Response.Write "</td>" & vbCrLf
  95.         Response.Write "<td align=center " & CenterClass & "><a href=""?action=Active&id=" & Rs("id") & "&lock="
  96.         If Rs("isLock") = 0 Then
  97.                 Response.Write "1"" onclick=""return confirm('您确定要锁定此管理员吗?')"">锁定管理员</a> | "
  98.         Else
  99.                 Response.Write "0"" onclick=""return confirm('您确要激活此管理员吗?')"">激活管理员</a> | "
  100.         End If
  101.         Response.Write "<a href=""?id="
  102.         Response.Write Rs("id")
  103.         Response.Write "&action=pasword"" title='修改管理员信息'>"
  104.         Response.Write "修改</a>&nbsp;|&nbsp;"
  105.         Response.Write "<a href=""?action=del&id="
  106.         Response.Write Rs("id")
  107.         Response.Write "&name="
  108.         Response.Write Rs("AdminName")
  109.         Response.Write """ onclick=""return confirm('此操作将删除该管理员n 您确定执行此操作吗?')"">删除</a>&nbsp;|&nbsp;<a href=""?id="
  110.         Response.Write Rs("id")
  111.         Response.Write "&action=edit"">编辑权限</a></td>" & vbCrLf
  112.         Response.Write "<td align=center " & CenterClass & ">"
  113.         If Rs("isLock") = 0 Then
  114.                 Response.Write "正常"
  115.         Else
  116.                 Response.Write "<font color=red>锁定<font>"
  117.         End If
  118.         Response.Write "</td>" & vbCrLf
  119.         Response.Write " </tr>" & vbCrLf
  120.         Rs.movenext
  121.         i = i + 1
  122.         Loop
  123.         Rs.Close
  124.         Set Rs = Nothing
  125.         Response.Write " </table>" & vbCrLf
  126. End Sub
  127. Private Sub del()
  128.         If Trim(Request("id")) <> "" Then
  129.         tee5.Execute ("delete from Gq_Admin where AdminName<>'" & LoginName & "' And id=" & Request("id"))
  130.         Response.Redirect (Request.ServerVariables("HTTP_REFERER"))
  131.         Else
  132.         ErrMsg = "<li>错误的系统参数!</li>"
  133.         Founderr = True
  134.         Exit Sub
  135.         End If
  136. End Sub
  137. Private Sub ActiveLock()
  138.         If Trim(Request("lock")) <> "" And Trim(Request("id")) <> "" Then
  139.         tee5.Execute ("update Gq_Admin set isLock="&Request("lock")&" where AdminName<>'" & LoginName & "' And id=" & Request("id"))
  140.         Response.Redirect (Request.ServerVariables("HTTP_REFERER"))
  141.         Else
  142.         ErrMsg = "<li>错误的系统参数!</li>"
  143.         Founderr = True
  144.         Exit Sub
  145.         End If
  146. End Sub
  147. Private Sub pasword()
  148.         Dim oldpassword
  149.         If Not CheckAdmin("9999") Then
  150.         ErrMsg = "<li>您没有此操作权限!</li><li>如有什么问题请联系站长?</li>"
  151.         Founderr = True
  152.         Exit Sub
  153.         End If
  154.         Set Rs = tee5.Execute("select * from Gq_Admin where id=" & Request("id"))
  155.         oldpassword = Rs("password")
  156.         Response.Write "<table cellpadding=""2"" cellspacing=""1"" border=""0"" class=""tableBorder"" align=center>" & vbCrLf
  157.         Response.Write "<form action=""?action=newpass"" method=post>" & vbCrLf
  158.         Response.Write " <tr>" & vbCrLf
  159.         Response.Write " <th colspan=2 height=23>管理员资料管理--密码修改" & vbCrLf
  160.         Response.Write " </th>" & vbCrLf
  161.         Response.Write " </tr>" & vbCrLf
  162.         Response.Write " <tr >" & vbCrLf
  163.         Response.Write " <td width=""26%"" " & RightClass & ">后台登陆名称:</td>" & vbCrLf
  164.         Response.Write " <td width=""74%"" " & LeftClass & ">" & vbCrLf
  165.         Response.Write " <input type=hidden name=""oldLoginName"" value="""
  166.         Response.Write Rs("AdminName")
  167.         Response.Write """>" & vbCrLf
  168.         Response.Write " <input type=text size=25 name=""LoginName2"" value="""
  169.         Response.Write Rs("AdminName")
  170.         Response.Write """>" & vbCrLf
  171.         Response.Write " </td>" & vbCrLf
  172.         Response.Write " </tr>" & vbCrLf
  173.         Response.Write " <tr >" & vbCrLf
  174.         Response.Write " <td width=""26%"" " & RightClass & ">后台登陆密码:</td>" & vbCrLf
  175.         Response.Write " <td width=""74%"" " & LeftClass & ">" & vbCrLf
  176.         Response.Write " <input type=""password"" size=25 name=""password2"">"
  177.         Response.Write " (如果不修改密码请留空)" & vbCrLf
  178.         Response.Write " </td>" & vbCrLf
  179.         Response.Write " </tr>" & vbCrLf
  180.         Response.Write " <tr>" & vbCrLf
  181.         Response.Write " <td width=""26%"" " & RightClass & ">管理员级别:</td>" & vbCrLf
  182.         Response.Write " <td width=""74%"" " & LeftClass & ">" & vbCrLf
  183.         Response.Write " <input type=radio name=AdminGrade value='0' "
  184.         If Rs("AdminGrade") = 0 Then Response.Write " checked"
  185.         Response.Write " > 普通管理员&nbsp;&nbsp;" & vbCrLf
  186.         Response.Write " <input type=radio name=AdminGrade value='999' "
  187.         If Rs("AdminGrade") = 999 Then Response.Write " checked"
  188.         Response.Write " > 高级管理员 (拥有最高权限)" & vbCrLf
  189.         Response.Write " </td>" & vbCrLf
  190.         Response.Write " </tr>" & vbCrLf
  191.         Response.Write " <tr>" & vbCrLf
  192.         Response.Write " <td " & RightClass & ">是否激活管理员:</td>" & vbCrLf
  193.         Response.Write " <td " & LeftClass & ">" & vbCrLf
  194.         Response.Write " <input type=radio name=isLock value='1' "
  195.         If Rs("isLock") = 1 Then Response.Write " checked"
  196.         Response.Write " > 否&nbsp;&nbsp;" & vbCrLf
  197.         Response.Write " <input type=radio name=isLock value='0' "
  198.         If Rs("isLock") = 0 Then Response.Write " checked"
  199.         Response.Write " > 是" & vbCrLf
  200.         Response.Write " </td>" & vbCrLf
  201.         Response.Write " </tr>" & vbCrLf
  202.         Response.Write " <tr>" & vbCrLf
  203.         Response.Write " <td " & RightClass & ">限制一个管理员登陆:</td>" & vbCrLf
  204.         Response.Write " <td " & LeftClass & ">" & vbCrLf
  205.         Response.Write " <input type=radio name=isAloneLogin value='0' "
  206.         If Rs("isAloneLogin") = 0 Then Response.Write " checked"
  207.         Response.Write " > 否&nbsp;&nbsp;" & vbCrLf
  208.         Response.Write " <input type=radio name=isAloneLogin value='1' "
  209.         If Rs("isAloneLogin") = 1 Then Response.Write " checked"
  210.         Response.Write " > 是" & vbCrLf
  211.         Response.Write " </td>" & vbCrLf
  212.         Response.Write " </tr>" & vbCrLf
  213.         Response.Write " <tr align=""center"">" & vbCrLf
  214.         Response.Write " <td colspan=""2"" " & CenterClass & ">" & vbCrLf
  215.         Response.Write " <input type=hidden name=id value="""
  216.         Response.Write Request("id")
  217.         Response.Write """>" & vbCrLf
  218.         Response.Write " <input type=button name=Submit4 onclick='javascript:history.go(-1)' value='返回上一页' class=Button> <input type=""submit"" name=""Submit"" value="" 更 新 "" class=""button"">" & vbCrLf
  219.         Response.Write " </td>" & vbCrLf
  220.         Response.Write " </tr>" & vbCrLf
  221.         Response.Write " </form>" & vbCrLf
  222.         Response.Write " </table>" & vbCrLf
  223. Rs.Close
  224. Set Rs = Nothing
  225. End Sub
  226. Private Sub newpass()
  227.         Dim passnw
  228.         Dim usernw
  229.         Dim aduser
  230.         Dim oldpassword
  231.         If Not CheckAdmin("9999") Then
  232.         ErrMsg = "<li>您没有此操作权限!</li><li>如有什么问题请联系站长?</li>"
  233.         Founderr = True
  234.         Exit Sub
  235.         End If
  236.         Set Rs = tee5.Execute("select * from Gq_Admin where id=" & Request("id"))
  237.         oldpassword = Rs("password")
  238.         If Request("LoginName2") = "" Then
  239.         ErrMsg = "<li>请输入管理员名字。<a href=?>[ <font color=red>返回</font> ]</a>"
  240.         Founderr = True
  241.         Exit Sub
  242.         Else
  243.         usernw = Trim(Request("LoginName2"))
  244.         End If
  245.         If Request("password2") = "" Then
  246.         passnw = "没有修改"
  247.         Else
  248.         passnw = Request("password2")
  249.         End If
  250.         Set Rs = CreateObject("adodb.recordset")
  251.         SQL = "select * from Gq_Admin where AdminName='" & Trim(Request("oldLoginName")) & "'"
  252.         Rs.Open SQL, conn, 1, 3
  253.         If Not Rs.EOF And Not Rs.bof Then
  254.         Rs("AdminName") = usernw
  255.         If Request("password2") <> "" Then Rs("password") = md5(Request("password2"))
  256.         If CInt(Request.Form("AdminGrade")) = 999 Then
  257.                 Rs("status") = "高级管理员"
  258.         Else
  259.                 Rs("status") = "普通管理员"
  260.         End If
  261.         Rs("AdminGrade") = Request.Form("AdminGrade")
  262.         Rs("isLock") = Request.Form("isLock")
  263.         Rs("isAloneLogin") = Request.Form("isAloneLogin")
  264.         Succeed ("<li>管理员资料更新成功,请记住更新信息。<br> 管理员名称:" & Request("LoginName2") & " <BR> 管理员密码:" & passnw & "")
  265.         Rs.update
  266.         End If
  267.         Rs.Close
  268.         Set Rs = Nothing        
  269. End Sub
  270. Private Sub addadmin()
  271.         If Not CheckAdmin("9999") Then
  272.         ErrMsg = "<li>您没有此操作权限!</li><li>如有什么问题请联系站长?</li>"
  273.         Founderr = True
  274.         Exit Sub
  275.         End If
  276.         Response.Write "<table cellpadding=""2"" cellspacing=""1"" border=""0"" class=""tableBorder"" align=center>" & vbCrLf
  277.         Response.Write "<form action=""?action=savenew"" method=post>" & vbCrLf
  278.         Response.Write " <tr>" & vbCrLf
  279.         Response.Write " <th colspan=2 height=23>管理员管理--添加管理员" & vbCrLf
  280.         Response.Write " </th>" & vbCrLf
  281.         Response.Write " </tr>" & vbCrLf
  282.         Response.Write " <tr >" & vbCrLf
  283.         Response.Write " <td width=""26%"" " & RightClass & ">后台登陆名称:</td>" & vbCrLf
  284.         Response.Write " <td width=""74%"" " & LeftClass & ">" & vbCrLf
  285.         Response.Write " <input type=text name=""LoginName2"">" & vbCrLf
  286.         Response.Write " </td>" & vbCrLf
  287.         Response.Write " </tr>" & vbCrLf
  288.         Response.Write " <tr>" & vbCrLf
  289.         Response.Write " <td width=""26%"" " & RightClass & ">后台登陆密码:</td>" & vbCrLf
  290.         Response.Write " <td width=""74%"" " & LeftClass & ">" & vbCrLf
  291.         Response.Write " <input type=""password"" name=""password2"">" & vbCrLf
  292.         Response.Write " </td>" & vbCrLf
  293.         Response.Write " </tr>" & vbCrLf
  294.         Response.Write " <tr>" & vbCrLf
  295.         Response.Write " <td width=""26%"" " & RightClass & ">管理员级别:</td>" & vbCrLf
  296.         Response.Write " <td width=""74%"" " & LeftClass & ">" & vbCrLf
  297.         Response.Write " <input type=radio name=AdminGrade value='0' checked> 普通管理员&nbsp;&nbsp;" & vbCrLf
  298.         Response.Write " <input type=radio name=AdminGrade value='999'> 高级管理员 (拥有最高权限)" & vbCrLf
  299.         Response.Write " </td>" & vbCrLf
  300.         Response.Write " </tr>" & vbCrLf
  301.         Response.Write " <tr>" & vbCrLf
  302.         Response.Write " <td " & RightClass & ">限制一个管理员登陆:</td>" & vbCrLf
  303.         Response.Write " <td " & LeftClass & ">" & vbCrLf
  304.         Response.Write " <input type=radio name=isAloneLogin value='0' checked> 否&nbsp;&nbsp;" & vbCrLf
  305.         Response.Write " <input type=radio name=isAloneLogin value='1'> 是" & vbCrLf
  306.         Response.Write " </td>" & vbCrLf
  307.         Response.Write " </tr>" & vbCrLf
  308.         Response.Write " <tr>" & vbCrLf
  309.         Response.Write " <td width=""26%"" " & RightClass & ">是否激活管理员:</td>" & vbCrLf
  310.         Response.Write " <td width=""74%"" " & LeftClass & ">" & vbCrLf
  311.         Response.Write " <input type=radio name=isLock value='1' checked> 否&nbsp;&nbsp;" & vbCrLf
  312.         Response.Write " <input type=radio name=isLock value='0'> 是" & vbCrLf
  313.         Response.Write " </td>" & vbCrLf
  314.         Response.Write " </tr>" & vbCrLf
  315.         Response.Write " <tr align=""center"">" & vbCrLf
  316.         Response.Write " <td colspan=""2"" " & CenterClass & ">" & vbCrLf
  317.         Response.Write " <input type=button name=Submit4 onclick='javascript:history.go(-1)' value='返回上一页' class=Button>  <input type=""submit"" name=""Submit"" value="" 添 加 "" class=""button"">" & vbCrLf
  318.         Response.Write " </td>" & vbCrLf
  319.         Response.Write " </tr>" & vbCrLf
  320.         Response.Write " </form>" & vbCrLf
  321.         Response.Write " </table>" & vbCrLf
  322. End Sub
  323. Private Sub savenew()
  324.         Dim adminuserid
  325.         If Not CheckAdmin("9999") Then
  326.         ErrMsg = "<li>您没有此操作权限!</li><li>如有什么问题请联系站长?</li>"
  327.         Founderr = True
  328.         Exit Sub
  329.         End If
  330.         If Request.Form("LoginName2") = "" Then
  331.         ErrMsg = "请输入后台登陆用户名!"
  332.         Founderr = True
  333.         Exit Sub
  334.         Else
  335.         adminuserid = Request.Form("LoginName2")
  336.         End If
  337.         If Request.Form("password2") = "" Then
  338.         ErrMsg = "请输入后台登陆密码!"
  339.         Founderr = True
  340.         Exit Sub
  341.         End If
  342.         Set Rs = tee5.Execute("select AdminName from Gq_Admin where AdminName='" & Replace(Request.Form("LoginName2"), "'", "") & "'")
  343.         If Not (Rs.EOF And Rs.bof) Then
  344.         ErrMsg = "您输入的用户名已经在管理用户中存在!"
  345.         Founderr = True
  346.         Exit Sub
  347.         End If
  348.         Set Rs = Server.CreateObject("adodb.recordset")
  349.         SQL = "select * from Gq_Admin where (id is null)"
  350.         Rs.open SQL,conn,1,3
  351.         Rs.addnew
  352.         Rs("AdminName") = Replace(Request.Form("LoginName2"), "'", "")
  353.         If CInt(Request.Form("AdminGrade")) = 999 Then
  354.                 Rs("status") = "高级管理员"
  355.         Else
  356.                 Rs("status") = "普通管理员"
  357.         End If
  358.         Rs("password") = md5(Request.Form("password2"))
  359.         Rs("isLock") = Request.Form("isLock")
  360.         Rs("AdminGrade") = Request.Form("AdminGrade")
  361.         Rs("Authority") = ",,,,,,,,,,,,,,,"
  362.         Rs("LoginTime") = Now()
  363.         Rs("Loginip") = tee5.GetUserIP
  364.         Rs("RandomCode") = tee5.GetRandomCode
  365.         Rs("isAloneLogin") = Request.Form("isAloneLogin")
  366.         Rs.update
  367.         Rs.close:set Rs=Nothing
  368.         Succeed ("添加成功,请到管理员管理给予相应的权限,如需修改请返回管理员管理!<br> 管理员名称:" & adminuserid & "<br> 管理员密码:" & Request.Form("password2") & "")
  369. End Sub
  370. Private Sub userinfo()
  371.         Dim AdminFlag,rsChannel
  372.         Dim ChanID,ModuleName,strModules
  373.         Set Rs = tee5.Execute("SELECT id,Authority FROM Gq_Admin WHERE id=" & Request("id"))
  374.         AdminFlag = Rs("Authority")
  375.         Rs.Close
  376.         Set Rs = Nothing
  377.         Response.Write " <table border=0 align=center cellpadding=3 cellspacing=1 class=tableborder>" & vbCrLf
  378.         Response.Write "  <tr>" & vbCrLf
  379.         Response.Write " <th colspan=6>管理员权限管理(请选择相应的权限分配给管理员)</th>" & vbCrLf
  380.         Response.Write " </tr>" & vbCrLf
  381.         Response.Write " <form name=myform method=post action=?action=renew>" & vbCrLf
  382.         Response.Write " <input type=hidden name=id value=""" & Request("id") & """>" & vbCrLf
  383.         Response.Write "  <tr>" & vbCrLf
  384.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  385.         Response.Write "value=""SiteConfig"" "
  386.            If InStr(AdminFlag, "SiteConfig") <> 0 Then Response.Write "checked"
  387.         Response.Write " > 系统设置</td>" & vbCrLf
  388.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  389.         Response.Write "value=""GameType"" "
  390.            If InStr(AdminFlag, "GameType") <> 0 Then Response.Write "checked"
  391.         Response.Write "> 游戏类型</td>" & vbCrLf
  392.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  393.         Response.Write "value=""MenuList"" "
  394.            If InStr(AdminFlag, "MenuList") <> 0 Then Response.Write "checked"
  395.         Response.Write "> 导航管理</td>" & vbCrLf
  396.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  397.         Response.Write "value=""Advertise"" "
  398.            If InStr(AdminFlag, "Advertise") <> 0 Then Response.Write "checked"
  399.         Response.Write "> 广告管理</td>" & vbCrLf
  400.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  401.         Response.Write "value=""CreateHtml"" "
  402.            If InStr(AdminFlag, "CreateHtml") <> 0 Then Response.Write "checked"
  403.         Response.Write "> 生成HTML</td>" & vbCrLf
  404.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  405.         Response.Write "value=""Copyright"" "
  406.            If InStr(AdminFlag, "Copyright") <> 0 Then Response.Write "checked"
  407.         Response.Write "> 版权设置</td>" & vbCrLf
  408.         Response.Write "</tr>" & vbCrLf
  409.         Response.Write "  <tr>" & vbCrLf
  410.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  411.         Response.Write "value=""GameList"" "
  412.            If InStr(AdminFlag, "GameList") <> 0 Then Response.Write "checked"
  413.         Response.Write " > 私服管理</td>" & vbCrLf
  414.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  415.         Response.Write "value=""AddGameList"" "
  416.            If InStr(AdminFlag, "AddGameList") <> 0 Then Response.Write "checked"
  417.         Response.Write "> 添加私服</td>" & vbCrLf
  418.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  419.         Response.Write "value=""GameColl"" "
  420.            If InStr(AdminFlag, "GameColl") <> 0 Then Response.Write "checked"
  421.         Response.Write "> 私服采集</td>" & vbCrLf
  422.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  423.         Response.Write "value=""JzList"" "
  424.            If InStr(AdminFlag, "JzList") <> 0 Then Response.Write "checked"
  425.         Response.Write "> 家族管理</td>" & vbCrLf
  426.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  427.         Response.Write "value=""ArticleList"" "
  428.            If InStr(AdminFlag, "ArticleList") <> 0 Then Response.Write "checked"
  429.         Response.Write "> 文章管理</td>" & vbCrLf
  430.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  431.         Response.Write "value=""SoftList"" "
  432.            If InStr(AdminFlag, "SoftList") <> 0 Then Response.Write "checked"
  433.         Response.Write "> 下载管理</td>" & vbCrLf
  434.         Response.Write "</tr>" & vbCrLf
  435.         Response.Write "  <tr>" & vbCrLf
  436.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  437.         Response.Write "value=""BackupData"" "
  438.            If InStr(AdminFlag, "BackupData") <> 0 Then Response.Write "checked"
  439.         Response.Write " > 数据备份</td>" & vbCrLf
  440.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  441.         Response.Write "value=""RestoreData"" "
  442.            If InStr(AdminFlag, "RestoreData") <> 0 Then Response.Write "checked"
  443.         Response.Write "> 数据恢复</td>" & vbCrLf
  444.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  445.         Response.Write "value=""CompressData"" "
  446.            If InStr(AdminFlag, "CompressData") <> 0 Then Response.Write "checked"
  447.         Response.Write "> 数据压缩</td>" & vbCrLf
  448.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  449.         Response.Write "value=""SpaceSize"" "
  450.            If InStr(AdminFlag, "SpaceSize") <> 0 Then Response.Write "checked"
  451.         Response.Write "> 空间占用</td>" & vbCrLf
  452.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  453.         Response.Write "value=""FriendLink"" "
  454.            If InStr(AdminFlag, "FriendLink") <> 0 Then Response.Write "checked"
  455.         Response.Write "> 连接管理</td>" & vbCrLf
  456.         Response.Write " <td " & LeftClass & "><input type=""checkbox"" name=""AdminFlag"" "
  457.         Response.Write "value=""ChangePassword"" "
  458.            If InStr(AdminFlag, "ChangePassword") <> 0 Then Response.Write "checked"
  459.         Response.Write "> 修改密码</td>" & vbCrLf
  460.         Response.Write "</tr>" & vbCrLf
  461.         Response.Write " <tr>" & vbCrLf
  462.         Response.Write "<td colspan=6 " & CenterClass & ">" & vbCrLf
  463.         Response.Write "<input class=Button type=button name=Submit4 onclick='javascript:history.go(-1)' value='返回上一页'>   " & vbCrLf
  464. Response.Write "<input class=Button type=button value='全选' onClick=""CheckAll(this.form)"">"
  465. Response.Write "<input class=Button type=button value='撤消' onClick=""CheckCel(this.form)"">"
  466. Response.Write "<input class=Button type=button value='反选' onClick=""CheckSel(this.form)""> "
  467.         Response.Write "<input class=Button type=""submit"" name=""Submit"" value=""更新管理员权限""></td>" & vbCrLf
  468.         Response.Write "</tr>" & vbCrLf
  469.         Response.Write "</form>" & vbCrLf
  470.         Response.Write "</table>" & vbCrLf
  471. End Sub
  472. Private Sub UpdateFlag()
  473.         Dim Sucmsg
  474.         Set Rs = Server.CreateObject("adodb.recordset")
  475.         SQL = "SELECT * FROM Gq_Admin WHERE id=" & Request("id")
  476.         Rs.Open SQL, conn, 1, 3
  477.         If Not (Rs.EOF And Rs.BOF) Then
  478.         Rs("Authority") = Replace(Replace(Request("AdminFlag"), "'", ""), " ", "")
  479.         Rs.update
  480.         End If
  481.         Rs.Close
  482.         Set Rs = Nothing
  483.         Sucmsg = "<li>管理员更新成功,请记住更新信息。"
  484.         Succeed (Sucmsg)
  485. End Sub
  486. %>