<!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'));
		});
	});
	 $("#all").click(function() {
	 	$("input[@name='username[]']").each(function() {
			$(this).attr("checked", $('#all').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/online/do/delete/">
        <table border="0" align="center" cellpadding="4" cellspacing="1" class="tab" id="ta">
          <tr class="sub">
            <td width="23%" class="align-center">用户名</td>
            <td width="17%" class="align-center">登录时间</td>
            <td width="17%" class="align-center">最后活动</td>
            <td width="15%" class="align-center">在线时间</td>
            <td width="17%" class="align-center">用户IP</td>
            <td width="11%" class="align-center"><input name="checkbox2" type="checkbox" class="checkbox" value="checkbox" id="checkall" />
              全选</td>
          </tr>
		  <?php
		  if (count($this->userOnline)>0){
		  foreach($this->userOnline as $row){?>
          <tr class="row">
            <td class="align-center"><?php echo $row['username'];?></td>
            <td class="align-center"><?php echo date('Y-m-d H:i:s', $row['firstime']);?></td>
            <td class="align-center"><?php echo date('Y-m-d H:i:s', $row['lastime']);?></td>
            <td class="align-center"><?php echo round(($row['lastime'] - $row['firstime'])/60,2);?>分钟</td>
            <td class="align-center"><?php echo $row['userip'];?></td>
            <td class="align-center">
              <input name="username[]" type="checkbox" class="checkbox" value="<?php echo $row['username'];?>" />
              <a href="<?php echo $this->installdir;?>user/online/do/delete/username/<?php echo $row['username'];?>/" onclick="return confirm('确定删除该用户吗?')">删除</a> </td>
          </tr>
		  <?php
		  }
		  }else{	
		  	echo '<tr class="row align-center"><td colspan="6">没有找到任何记录!<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">
	      <input name="all" type="checkbox" class="checkbox" id="all" value="checkbox" />
	      <input type="submit" value="删除选择" />
	    </div>
	    </td>
	  </tr></table></form>
      </div>
    </td>
  </tr>
</table>
<?php
echo $this->render('copyright');
?>
</body>
</html>

