<!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>
<title>vodcms.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->basedir;?>images/admin/public.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->basedir;?>images/admin/style.css" />
<link href="../../images/admin/public.css" rel="stylesheet" type="text/css" />
<link href="../../images/admin/style.css" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->basedir;?>js/jquery.js" language="javascript"></script>
<script src="<?php echo $this->basedir;?>js/jquery.tablednd.js" language="javascript"></script>
<script language="javascript">
$(document).ready(function() {
     $("#ta tr").mouseover(function(){
      $(this).addClass("over");
     });
     $("#ta tr").mouseout(function(){
      $(this).removeClass("over");
     });
	 $("#ta tr:even").addClass("double");
	 $('#mostrar').click(function(){$('#sh').toggle();});
	 /*全选*/
	 $("#checkall").click(function() {
	 	$("input[@name='username[]']").each(function() {
			$(this).attr("checked", $('#checkall').attr('checked'));
		});
	});
});
</script>
<body>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
  <tr align="center" valign="top">
    <td width="*" align="center" valign="top">
	<!-- ######### begin ######### -->
      <div class="Block">
        <div class="BlockBar">用户列表</div>
        <form id="form1" name="form1" method="post" action="<?php echo $this->installdir;?>user/post/">
        <table border="0" align="center" cellpadding="4" cellspacing="1" class="tab" id="ta">
          <tr class="sub">
            <td width="7%" class="align-center">UID</td>
            <td width="16%" class="align-center">用户名</td>
            <td width="13%" class="align-center">消费类型</td>
            <td width="17%" class="align-center">帐户点数</td>
            <td width="19%" class="align-center">注册时间</td>
            <td width="10%" class="align-center">用户组</td>
            <td width="7%" class="align-center">状态</td>
            <td width="11%" class="align-center"><input name="checkbox2" type="checkbox" class="checkbox" value="checkbox" id="checkall" />
              全选</td>
          </tr>
		  <?php
		  if (count($this->Users)>0){
		  foreach($this->Users as $row){?>
          <tr class="row">
            <td class="align-center"><?php echo $row['uid'];?></td>
            <td class="align-center"><a href="<?php echo $this->installdir;?>user/modify/uid/<?php echo $row['uid'];?>/" title="编辑用户"><?php echo $row['username'];?></a></td>
            <td class="align-center"><?php echo $row['usertype'] ? _('包月') : _('计点');?></td>
            <td class="align-center"><?php
			if ($row['usertype']==1){
				if ($row['lifetime']<time()){ 
					echo '<font color="red">已到期</a>';
				}else{
					echo _('到期:'.date('Y-m-d', $row['lifetime']));
				}
			}else{ echo $row['point'].'点';}?></td>
            <td class="align-center"><?php echo date('Y-m-d H:i:s', $row['regdate']);?></td>
            <td class="align-center"><?php echo $row['usergroup'] ? $row['usergroup'] : '游客';?></td>
            <td class="align-center">
			<a href="<?php echo $this->installdir;?>user/locked/uid/<?php echo $row['uid'];?>/"><?php if($row['locked'] == 0){
				echo '已激活';
			}elseif ($row['locked'] == 1){
				echo '锁定中';
			}elseif ($row['locked'] == 2){
				echo '未激活';
			}?></a></td>
            <td class="align-center">
              <input name="username[]" type="checkbox" class="checkbox" value="<?php echo $row['username'];?>" />
              <a href="<?php echo $this->installdir;?>user/delete/uid/<?php echo $row['uid'];?>/" onclick="return confirm('确定删除该用户吗?')">删除</a> </td>
          </tr>
		  <?php
		  }
		  }else{	
		  	echo '<tr class="row align-center"><td colspan="8">没有找到任何记录!<a href="javascript:history.back()">您可以点击这里返回上一页</a></td></tr>';
		  }?>
        </table>
        
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
	  <tr><td width="82%">
	  <?php echo $this->printpage;?>
	    <div class="form-handle">
	      <select name="post" id="post">
	        <option value="locked">更改状态</option>
	        <option value="delete">批量删除</option>
	        <option value="usergroup">重设用户组</option>
	        <option value="point">重设点数</option>
	        <option value="lifetime">重设包月</option>
	        </select>
		    <input type="submit" name="Submit3" value="操作" />
		  </div>
	    </td>
	  </tr></table></form>
      </div>
      <div class="BlockBar">用户查找</div>
        <form id="form1" name="form1" method="post" action="<?php echo $this->installdir;?>user/search/">
        <table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" class="tab" id="sh">
          <tr class="row">
            <td width="13%" class="align-right">用户组：</td>
            <td width="87%" class="align-left"><select name="usergroup" id="usergroup">
              <option value="all" <?php if($_REQUEST['usergroup'] == 'all') echo 'checked="checked"';?> >全部</option><?php echo $this->groupOption;?>
            </select>            </td>
          </tr>
          <tr class="row">
            <td class="align-right">消费模式：</td>
			<td class="align-left"><select name="usertype" id="usertype">
			  <option value="all" <?php if($_REQUEST['usertype'] == 'all') echo 'checked="checked"';?> >全部</option>
			  <option value="1" <?php if($_REQUEST['usertype'] == 1) echo 'checked="checked"';?> >包月</option>
			  <option value="0" <?php if($_REQUEST['usertype'] == 0) echo 'checked="checked"';?> >计点</option>
			  </select>			</td>
          </tr>
          <tr class="row">
            <td class="align-right">帐户点数：</td>
            <td class="align-left"><select name="point" id="point">
              <option value="all" <?php if($_REQUEST['point'] == 'all') echo 'checked="checked"';?> >不限</option>
              <option value="0" <?php if($_REQUEST['point'] == 0) echo 'checked="checked"';?> >无点数</option>
              <option value="1" <?php if($_REQUEST['point'] == 1) echo 'checked="checked"';?> >有点数</option>
            </select>            </td>
          </tr>
          <tr class="row">
            <td class="align-right">包月到期：</td>
            <td class="align-left"><select name="lifetime" id="lifetime">
              <option value="all" <?php if($_REQUEST['lifetime'] == 'all') echo 'checked="checked"';?> >不限制</option>
              <option value="7" <?php if($_REQUEST['lifetime'] == 7) echo 'checked="checked"';?> >一星期内到期</option>
              <option value="30" <?php if($_REQUEST['lifetime'] == 30) echo 'checked="checked"';?> >一个月内到期</option>
              <option value="92" <?php if($_REQUEST['lifetime'] == 92) echo 'checked="checked"';?> >三个月内到期</option>
              <option value="0" <?php if($_REQUEST['lifetime'] == 0) echo 'checked="checked"';?> >已到期</option>
            </select>            </td>
          </tr>
          <tr class="row">
            <td class="align-right">注册时间：</td>
            <td class="align-left"><input name="startime" type="text" class="time" id="startime"  onClick="vodcms_date(event,this,this)" value="<?php echo $_REQUEST['startime'];?>" />
              至
              <input name="endtime" type="text" class="time" id="endtime"  onClick="vodcms_date(event,this,this)" value="<?php echo $_REQUEST['endtime'];?>" /></td>
          </tr>
          <tr class="row">
            <td class="align-right">用户状态：</td>
            <td class="align-left"><label>
              <select name="locked" id="locked">
                <option value="all" <?php if($_REQUEST['locked'] == 'all') echo 'checked="checked"';?> >全部</option>
                <option value="0" <?php if($_REQUEST['locked'] == 0) echo 'checked="checked"';?> >正常</option>
                <option value="1" <?php if($_REQUEST['locked'] == 1) echo 'checked="checked"';?> >锁定</option>
                <option value="2" <?php if($_REQUEST['locked'] == 2) echo 'checked="checked"';?> >未激活</option>
              </select>
            </label></td>
          </tr>
          <tr class="row">
            <td class="align-right">关键词：</td>
            <td class="align-left"><input name="keyword" type="text" id="keyword" value="<?php echo $_REQUEST['keyword'];?>" />
              <input name="type" type="radio" class="checkbox" value="username" <?php if($_REQUEST['type'] != 'email') echo 'checked="checked"';?> />
            匹配用户名
            <input name="type" type="radio" class="checkbox" value="email" <?php if($_REQUEST['type'] == 'email') echo 'checked="checked"';?> />
            匹配邮箱
            <input name="checkbox" type="checkbox" class="checkbox" id="checkbox" value="1" <?php if($_REQUEST['checkbox']) echo 'checked="checked"';?> />
            精确匹配</td>
          </tr>
          <tr class="row">
            <td class="align-center">&nbsp;</td>
            <td class="align-left"><input name="search" type="submit" class="btn" id="search" value=" 提 交 " /></td>
          </tr>
        </table>
        </form>
      </div>
      <!-- ########## end ########## -->
    </td>
  </tr>
</table>
<?php
echo $this->render('copyright');
?>
</body>
</html>

