<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hait windows 后台管理</title>
<link rel="stylesheet" type="text/css" href="images/hait_admin.css" />
</head>
<?php require ("Hait_login_ask.php");?>
<?php
if($admin_gl==null or $admin_gl<>1 )
{
   echo "<script>alert('Hait windows 提醒你，非法操作！！你没有该权限！');location.href='Hait_right.php'</script>";
   exit;
}
?>
<body>
<div id="main">
<table width="100%"  border="0"align="center">
  
  <tr>
    <td align="center"><?php
error_reporting(0);
require '../config.php';
$page = $_GET["page"]; 
require_once'Hait_function.php';
$rows = mysql_num_rows(mysql_query("select * from hait_admin",$conn)); 
Page($rows,20); 
$sql = "select * from hait_admin order by id desc limit $select_from $select_limit "; 
$listexec = mysql_query($sql,$conn); 
?>
<script language="JavaScript">             
function delete_confirm(e) 
{
    if (event.srcElement.outerText == "删除") 
    {
        event.returnValue = confirm("Hait windows 提醒你，删除后不可恢复，你确认要删除吗？");
    }
}
document.onclick = delete_confirm;
</script><form method="post" action="hait_del_app.php"><input name="appname" type="text"  style="display:none" value="article"/>
  <table  cellpadding="4"  width="100%"cellspacing="1"  bgcolor="#C0C0C0"  class='STYLE7' >
    <tr bgcolor="#FFFFFF" align="center" class="STYLE6">
      <th background="images/bg2.gif">ID</th>
      <th background="images/bg2.gif">用户名</th>
      <th background="images/bg2.gif">密码</th>
      <th background="images/bg2.gif">权限</th>
      <th background="images/bg2.gif">操作/管理</th>
    </tr>
    <?php
while($list=mysql_fetch_array($listexec))
{
echo '<tr bgcolor="#F7FFFF" align="cnter" class="movelist" >';
echo '<td width="5%">';
echo $list['id'];
echo '</td>';
echo '<td width="20%" >';
echo $list['user'];
echo '</td>';
echo '<td width="20%">';
echo $list['password'];
echo '</td>';
echo '<td width="10%">';
if ($list['quanxian']==1){echo"一级";}elseif ($list['quanxian']==2){echo"二级";}elseif ($list['quanxian']==3){echo"三级";};
echo '</td>';
echo '<td width="20%" >';
echo '<a href=hait_admin_xg.php?'.$list[id].'>';
echo '修改</a> / <a href=hait_del_app.php?admindel-'.$list['id'].'onClick=delete_confirm>删除</a>';
echo '</td>';
echo '</tr>';
}
?>
  </table>
</form>
<table>
<tr>
<td align="center" class="page">
<?php echo $pagenav; ?></td>
</tr>
</table></td>
  </tr>
  <tr>
    <td align="center"><form method="post" action="hait_do_app.php"><input name="appname" type="text"  style="display:none" value="admin"/>
    <table align="left" width="100%" cellpadding="4" cellspacing="1" bgcolor="#C0C0C0"   class='STYLE7' >
    <tr bgcolor="#FFFFFF" align="center" class="STYLE6">
      <th colspan="2" align="left" background="images/bg2.gif"><table border="0">
        <tr>
          <td valign="bottom"><img src="images/cog.png" /></td>
          <td valign="bottom" >您现在的位置：添加新用户</td>
        </tr>
      </table></th>
    </tr>   
    
    <tr bgcolor="#DFEFFF">
      <td width="100" align="right" bgcolor="#FFFFFF">用&nbsp;&nbsp;户&nbsp;&nbsp;名:</td>
      <td align="left"  bgcolor="#FFFFFF"><input name="user" size="30"value="" /></td>
    </tr>
    <tr bgcolor="#DFEFFF">
      <td align="right" bgcolor="#FFFFFF">管理权限;</td>
      <td align="left" bgcolor="#FFFFFF"><table border="0">
          <tr>
            <td><input name="wz_gl" type="checkbox" value="1" />网站管理</td>
            <td><input name="sql_gl" type="checkbox" value="1" />数据库管理</td>
            <td><input name="admin_gl" type="checkbox" value="1" />管理员管理</td>
            <td><input name="upload_gl" type="checkbox" value="1" />上传文件管理</td>
            </tr>
          <tr>
            <td><input name="class_gl" type="checkbox" value="1" />分类管理</td>
            <td><input name="add_class" type="checkbox" value="1" />添加分类</td>
            <td><input name="article_gl" type="checkbox" value="1" />文章管理</td>
            <td><input name="add_article" type="checkbox" value="1" />添加文章</td>
            </tr>
          <tr>
            <td><input name="hsz_gl" type="checkbox" value="1" />回收站</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            </tr>
        </table></td>
    </tr>
    <tr bgcolor="#DFEFFF">
      <td align="right" bgcolor="#FFFFFF">输入密码:</td>
      <td align="left" bgcolor="#FFFFFF"><input name="password1" size="30"value="" /></td>
    </tr>
    <tr bgcolor="#DFEFFF">
      <td align="right" bgcolor="#FFFFFF">确认密码:</td>
      <td align="left" bgcolor="#FFFFFF"><input name="password2" type="text" size="30" value="" /></td>
    </tr>
    <tr bgcolor="#DFEFFF">
      <td align="right" bgcolor="#FFFFFF">&nbsp;</td>
      <td align="left" bgcolor="#FFFFFF"><input name="submit" type="submit" class="submit" value=" 添加管理员 " /></td>
    </tr>
    
    <tr >
    <td colspan="2" align="left" bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
 </table>
</form></td>
  </tr>
</table>
</div>
</body>
</html>