<script language="javascript" src="<?=BASEURL?>public/admin/js/jquery.tablesorter.js"></script>
<script language="javascript">
$(
	function (){
		$(".adminlist").tablesorter({ headers: { 0: { sorter: false}, 1: {sorter: false} } });
	}
);
</script>
<table class="adminlist" cellpadding="0" cellspacing="0">
	<thead>
    	<tr><th>#</th>
        <th><input type="checkbox" name="toggle" id="toggle" value="all" /></th>
        <th>域名</th>
        <th>安装时间</th>
        <th>登录次数</th>
        <th>最后登录时间</th>
        <th>操作</th>
        </tr>
    </thead>
    <tbody>
    	<?php foreach($licences as $licence){ if(@!$a){ $a=1;}?>
        <tr>
        	<td><?=$a++?></td>
        	<td><input type="checkbox" name="select_id[]" value="<?=$licence->licence_id?>" id="cb<?=$a?>"></td>
        	<td><a href="http://<?=$licence->web_domain?>" target="_blank"><?=$licence->web_domain?></a></td>
        	<td><?=date("Y-m-d H:i:s",$licence->create_time)?></td>
        	<td><?=$licence->login_times?></td>
        	<td><?=date("Y-m-d H:i:s",$licence->laster_time)?></td>
        	<td>
            	<a href="<?=BASEURI?>licence/delete/<?=$licence->licence_id?>" onclick="if(!confirm('确认是否删除')){return false;}">删除</a>
            </td>
        </tr>
        <?php }?>
    </tbody>
    <tfoot>
    	<tr>
        	<td colspan="5">
        	<input type="button" class="button" value="删除" onclick="select_control('<?=BASEURI?>licence/delete','确认是否删除')"/>
            </td>
        </tr>
        
    </tfoot>
</table>
