<!DOCTYPE html>
<html><?php echo $this->fetch('head.html'); ?>
	<body>

		<div class="tabs-border">
			<a class="item active" href="/moduleadmin.php?m=vote">投票管理</a>
			<a class="item" href="/moduleadmin.php?m=vote&a=add">投票添加</a>
		</div>
		<div class="main-body">
			<table class="tbs">
				<thead>
					<tr>
						<td>id</td>
						<td>标题</td>
						<td>添加时间</td>
						<td>状态</td>
						<td>开始时间</td>
						<td>结束时间</td>
						<td>操作</td>
					</tr>
				</thead>
				<tbody>
					<?php $_from = $this->_var['data']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['c']):
?>
					<tr>
						<td><?php echo $this->_var['c']['id']; ?></td>
						<td><?php echo $this->_var['c']['title']; ?></td>
						<td><?php echo date("Y-m-d",$this->_var['c']['dateline']); ?></td>
						<td><div url="/moduleadmin.php?m=vote&a=status&id=<?php echo $this->_var['c']['id']; ?>&ajax=1" class="js-toggle-status <?php if ($this->_var['c']['status'] == 1): ?>yes<?php else: ?>no<?php endif; ?>"></div> </td>


						<td><?php echo date("Y-m-d",$this->_var['c']['starttime']); ?></td>
						<td><?php echo date("Y-m-d",$this->_var['c']['endtime']); ?></td>
						<td>
							<a href="/moduleadmin.php?m=vote_join&vid=<?php echo $this->_var['c']['id']; ?>">参与选手</a>
							<a href="/moduleadmin.php?m=vote&a=add&id=<?php echo $this->_var['c']['id']; ?>">编辑</a>
							<a href="/module.php?m=vote&a=home&id=<?php echo $this->_var['c']['id']; ?>" target="_blank">查看</a>


						</td>
					</tr>
					<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
				</tbody>
			</table>
			<div><?php echo $this->_var['pagelist']; ?></div>
		</div>
		<?php echo $this->fetch('footer.html'); ?>
	</body>
</html>
