<%@language=vbscript codepage=936 %>
<%path="../basedata"%>
<!--#include file="../inc/function.asp"-->
<%call Loginpower%>
<%call Legalpower%>
<!--#include file="../conn/conn_admin.asp"-->
<!-- #include file="../Inc/Head.asp" -->
<br/><br/><br/><br/>
<script language="javascript">
function confirmdel(id){
if (confirm("真的要删除此管理员帐号?")){
window.location.href="Manager_Admin_Del.asp?id="+id;
 }}
 function confirmde1(id){
if (confirm("此用户（不）可以删除"))
{
alert("其在是对不起啦，你没有权力删除此用户");
window.location.href="http://www.456vv.com/";
 }}
</script>
<SCRIPT language="javascript">
<!--
function form1_onsubmit()
{
if ( document.FORM1.uid.value=="" )
{
alert ("请您输入的用户");
document.FORM1.uid.focus();
return false;
}
if (document.FORM1.pwd1.value.length<6 || document.FORM1.pwd2.value.length<6)
{
alert ("您输入的密码不能少于6位。");
return false;
}
if (document.FORM1.pwd1.value != document.FORM1.pwd2.value)
{
alert ("请确认您的密码。你的两次密码不相同");
document.FORM1.pwd1.value='';
document.FORM1.pwd2.value='';
document.FORM1.pwd1.focus();
return false;
}
}
//-->
</SCRIPT>

<div style="text-align:center;">
<table width="560" align="center" border="1" bordercolor="#A5B6D6" cellpadding="0" cellspacing="2" class="center">
  <tr>
    <td class="southidc" width="598" height="25" ><div align="center"><strong>添加管理员</strong></div>
    </td>
  </tr>
  <tr>
    <FORM name="FORM1"  onsubmit="return form1_onsubmit()" action="Manager_Admin_Add.asp" method="post">
      <td><table width="50%" border="0" align="center" >
        <tr>
          <td height="25" colspan="2">&nbsp;</td>
        </tr>
        <tr>
          <td width="29%" height="22"><div align="right">管理员帐号：</div></td>
          <td width="71%"><input type="text" name="uid" size="16" maxlength="20"></td>
        </tr>
        <tr>
          <td height="22"><div align="right">管理员密码：</div></td>
          <td><input type="text" name="pwd1" size="16"></td>
        </tr>
        <tr>
          <td height="22"><div align="right">密码确认：</div></td>
          <td><input type="text" name="pwd2" size="16"></td>
        </tr>
        <tr>
          <td height="22" colspan="2"><div align="center">
            <INPUT type=submit value='确认添加' name=Submit2>
          </div></td>
        </tr>
      </table></td>
    </form>
  </tr>
</table>
<br>
<table width="560" align="center" border="1" bordercolor="#A5B6D6" cellpadding="0" cellspacing="2" class="center">
  <tr>
    <td width="553" height="25" class="back_southidc"><div align="center"><strong>管理员帐号管理</strong></div></td>
  </tr>
  <tr class="tr_southidc">
      <td><br>
          <table width="100%" border="0" align="center" cellpadding="0" cellspacing="2">
            <tr>
              <td width="15%" height="25"><div align="center">管理员帐号</div></td>
              <td width="28%"><div align="center">权限</div></td>
              <td width="13%"><div align="center">登陆数次</div></td>
              <td width="24%"><div align="center">操作</div></td>
              <td width="20%"><div align="center">删除</div></td>
            </tr>
<%
dim rs,sqltext
set rs=server.createobject("adodb.recordset")
sqltext="select * from admin"
rs.open sqltext,conn_admin,1,1
if not rs.eof then
do while not rs.eof
if rs.eof then exit do
%>
            <tr bgcolor="#DFEBF2">
              <td height="22"><div align="center"><%if session("AdminName")<>rs("Admin_User") then response.write rs("Admin_User") else response.write "<span style='color:#ff0000;'>"&rs("Admin_User")&"</span>" end if%></div></td>
              <td><div align="center"><%if rs("Admin_flag") then response.write "高" else response.write "低" end if%></div></td>
             <td><div align="center"><%= rs("Admin_Login_numeric")%></div></td>
              <td><div align="center"><%= "<a href=""Manager_Admin_Modify.asp?ID="&rs("Admin_id")&"""  >修改密码</a>"%></div></td>
              <td><div align="center"> <%if session("masterflag")<>true then response.write "<a title='此用户（不）可以删除' href='javascript:confirmde1("&rs("Admin_id")&")'>删除</a>" else response.write "<a title='此用户可以删除' href='javascript:confirmdel("&rs("Admin_id")&")'>删除</a>" end if%> </div></td>
            </tr>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing
conn_admin.close
set conn_admin=nothing
%>
        </table></td>
  </tr>
</table>
</div>
<!-- #include file="../Inc/Foot.asp" -->