<?
session_start();
require_once "../init.php";
require_once "../authority.inc.php";
$keyword=trim($keyword);
if($keyword){
	$wheres=" AND (UserID like '%$keyword%' or RealName like '%$keyword%') ";
}
$sql = "select * from admins where 1 $wheres";
$result = $DB->query($sql);
$PNum = $DB->num_rows($result);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" 
/>
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="/admin/lib/html5.js"></script>
<script type="text/javascript" src="/admin/lib/respond.min.js"></script>
<script type="text/javascript" src="/admin/lib/PIE_IE678.js"></script>
<![endif]-->


<!--[if IE 6]>
<script type="text/javascript" src="/admin/static/h-ui.admin/js/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>员工管理</title>
<LINK href="../share/style.css" rel=stylesheet>
<script src='../share/global.js'></script>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 系统管理 <span class="c-gray en">&gt;</span> 系统设置 <span 
class="c-gray en">&gt;</span> 员工管理<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" 
href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">

<!--子导航-->

<!--结束-->

<!--搜索-->

<form method='post' action='<?=$_SERVER['PHP_SELF']?>'>

	<div class="text-c"> 日期范围：
		<input type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})" id="datemin" class="input-text Wdate" style="width:120px;">
		-
		<input type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d'})" id="datemax" class="input-text Wdate" style="width:120px;">
		<input type="text" name="keyword"  onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})" class="input-text" style="width:250px" placeholder="输入管理员名称" id="" name="">
		<button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜用户</button>
	</div>

<br>



</form>
<? include "admins_nav.inc.php"?>
<!--搜索-->

<br>

      <?
			if($PNum){
	    ?>
<table width="100%"  border="0" cellspacing="0" cellpadding="0"  class="table table-border table-bordered table-hover table-bg table-sort">
<tr id="tr">
  <td height="20">用户ID</td>
  <td>真实姓名</td>
  <td>电话</td>
  <td>E-Mail</td>
  <td>最后登录</td>
  <td>操作</td>
</tr>
<? while($EmployInfo=$DB->fetch_array($result)){?>
<tr id="td" >
  <td><?=$EmployInfo[UserID]?></td>
  <td><?=$EmployInfo[RealName]?></td>
  <td>&nbsp;<?=$EmployInfo[Tel]?>&nbsp;</td>
  <td>&nbsp;<?=$EmployInfo[Email]?>&nbsp;</td>
  <td>&nbsp;<?=$EmployInfo[dtLogin]?>&nbsp;</td>
  <td> 
	<? $key = GetHashKey('admins'.$EmployInfo[UserID]);?>
	<a href="admins_edit.php?UserID=<?=$EmployInfo[UserID]?>&key=<?=$key?>">修改</a> |
	<a href="admins_perm.php?UserID=<?=$EmployInfo[UserID]?>&key=<?=$key?>">权限分配</a> |
	<?if($EmployInfo[UserID]!=$_SESSION[AdmUserID_S]){?>
	<a href="admins_del.php?UserID=<?=$EmployInfo[UserID]?>&key=<?=$key?>" onclick="return confirm('确定删除吗?')"><? }?>删除</a> 
  </td>
</tr>
<? }?>
</table>
<?	}else{
	   echo "<center><br><br>没有相关记录<br><br></center>";
	}
?>

<div id="page">
<?
	echo $pageStr;
?>
</div>
</div><br>
<? 
$DB->close();
include "../share/bottom.php";
?>
</body>
</html>
