<!--#include file="Admin.asp" -->
<!--#include file="cf.asp" -->
<!--#include file="adminconn.asp" -->
<!--#include file="../include/safe.asp"-->
<!--#include file="include/md5.asp"-->
<%
if session("admin")=request("username") or session("aleave")="super" then 
id=request.querystring("id")
set rs=server.createobject("adodb.recordset")
sql="select * from admin where id="&id
rs.open sql,conn,1,1
if rs.eof then
response.write"<script language=javascript>alert('服务器出错，请联系管理员！');"
response.write"javascript:history.go(-1)</script>"
else
admin=rs("admin")
password=rs("password")
aleave=rs("aleave")
bigclassauthorize=replace(rs("bigclassauthorize")," ","")
smallclassauthorize=replace(rs("smallclassauthorize")," ","")
%>
<link href="../include/css.css" type=text/css rel=stylesheet>
<meta http-equiv=content-type content=text/html; charset=gb2312>
<br />
<table width="90%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#000000">
  <form method="post" action="admin_adminsave.asp?id=<%=id%>">
          
    <tr bgcolor="#cccccc"> 
      <td height="24" colspan=2 align=center><b>修 改 管 理 员 资 料</b></td>
</tr>
    <tr bgcolor="#ffffff"> 
      <td width="19%" height="22" align="right">用户名：</td>
      <td width="81%">&nbsp;
      <input name="admin" type="text" class="input" value="<%=admin%>" size="35" maxlength="20"></td>
</tr>
    <tr bgcolor="#ffffff"> 
      <td width="19%" height="22" align="right">密码：</td>
      <td width="81%">&nbsp;
        <input type="password" name="password" size="35" class="input">
      &nbsp; 直接输入你要修改的密码</td>
</tr>
    <tr bgcolor="#ffffff"> 
      <td width="19%" height="22" align="right">权限：</td>
      <td width="81%" height="22">&nbsp;
        <select name="aleave" style="font-size:9pt" class="input">
<%if session("aleave")="super" then%>
<option value=super<%if aleave="super" then%> selected<%end if%>>超级管理员</option>
<option value=check<%if aleave="check" then%> selected<%end if%>>普通管理员</option>
<%else%>
<option value=check<%if aleave="check" then%> selected<%end if%>>普通管理员</option>
<%end if%>
</select></td>
</tr><%if session("aleave")="super"then%>
<tr bgcolor="#cccccc" id="userpriv">
    <td align="right" bgcolor="#FFFFFF">栏目权限：</td>
    <td align="left" bgcolor="#FFFFFF"><div style="padding-left:5px;">
<script language="javascript">
	function CheckAll(form)  {
    for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }
</script> 
<%
set rsgetbigclassid=server.createobject("adodb.recordset") 
sql="select * from bigclass where urlok=0 order by bigclassid"
rsgetbigclassid.open sql,conn,1,1
if not rsgetbigclassid.eof then
do while not rsgetbigclassid.eof
%><br />
<%If Instr("," & bigclassauthorize & ",","," & rsgetbigclassid("bigclassid") & ",") > 0 Then%>
<input type="checkbox" name="bigclassauthorize" checked="checked" value="<%=rsgetbigclassid("bigclassid")%>"> <font class="s01"><%=rsgetbigclassid("bigclassname")%></font><br />
<%else%>
<input type="checkbox" name="bigclassauthorize" value="<%=rsgetbigclassid("bigclassid")%>"> <font class="s01"><%=rsgetbigclassid("bigclassname")%></font><br />
<%end if
set rsgetsmallclassid=server.createobject("adodb.recordset") 
sql="select * from smallclass where bigclassname='"&rsgetbigclassid("bigclassname")&"'"
rsgetsmallclassid.open sql,conn,1,1
if not rsgetsmallclassid.eof then
do while not rsgetsmallclassid.eof
%>
<%If Instr("," & smallclassauthorize & ",","," & rsgetsmallclassid("smallclassid") & ",") > 0 Then%>
<input type="checkbox" checked="checked" name="smallclassauthorize" value="<%=rsgetsmallclassid("smallclassid")%>"> <%=rsgetsmallclassid("smallclassname")%>
<%else%>
<input type="checkbox" name="smallclassauthorize" value="<%=rsgetsmallclassid("smallclassid")%>"> <%=rsgetsmallclassid("smallclassname")%>
<%end if
rsgetsmallclassid.movenext
loop
end if
rsgetsmallclassid.close
%><br />
<% 
rsgetbigclassid.movenext 
loop 
end if 
rsgetbigclassid.close 
%><br />
<input type='checkbox' name=chkall onclick='CheckAll(this.form)'> <font color=red>全部栏目权限</font>
</div></td>
</tr><%end if%>
    <tr align="center" bgcolor="#ffffff" height="24"> 
      <td height="30" colspan=2> 
        <input type="hidden" value="edit" name="act">
<input name="cmdok" type="submit" id="cmdok" value=" 修 改 " class="input">
        &nbsp;
<input name="cmdcance" type="reset" id="cmdcance" value=" 清 除 " class="input"></td>
</tr>
</form>
</table>
</body>
</html>
<%
end if
rs.close
set rs=nothing
end if
%>                                                             