<?php echo $this->fetch('header.html'); ?>
<style type="text/css">
table img{width:50px;}
</style>
<div class="row">
<div class="span12">
<h1><a href="<?php echo APPADMIN; ?>?m=admin_comment">评论管理</a></h1>
<form method="get" action="<?php echo APPADMIN; ?>" class="form form-inline">
<input type="hidden" name="m" value="admin_comment">
<input type="hidden" name="a" value="default">
ID:<input type="text" name="id" value="<?php echo $_GET['id']; ?>" class="w50" >
内容：<input type="text" name="content" value="<?php echo $_GET['content']; ?>">
状态：<select name="status" class="w100">
	<?php $_from = $this->_var['status_list']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('k', 'c');if (count($_from)):
    foreach ($_from AS $this->_var['k'] => $this->_var['c']):
?>
    <option value="<?php echo $this->_var['k']; ?>" <?php if ($this->_var['k'] == $_GET['status']): ?> selected<?php endif; ?>><?php echo $this->_var['c']; ?></option>
    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
</select>
<input type="submit" value="搜索" class="btn btn-warning">
</form>
<table class="table table-bordered" width="100%">
<tr>
<td width="8%">ID</td>
<td width="52%">内容</td>
<td width="6%">作者</td>
<td width="10%">状态</td>
<td width="24%">操作</td>
</tr>

<?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']['content']; ?></td>
<td><?php echo $this->_var['c']['userid']; ?></td>
<td><?php echo $this->_var['status_list'][$this->_var['c']['status']]; ?></td>
<td><a href="javascript:;" class="ajax" url="<?php echo APPADMIN; ?>?m=admin_comment&a=status&status=1&id=<?php echo $this->_var['c']['id']; ?>">通过</a> 
	<a href="javascript:;" class="ajax" url="<?php echo APPADMIN; ?>?m=admin_comment&a=status&status=98&id=<?php echo $this->_var['c']['id']; ?>">禁止</a>  
    <a href="javascript:;" class="delete" url="<?php echo APPADMIN; ?>?m=admin_comment&a=status&status=99&id=<?php echo $this->_var['c']['id']; ?>">删除</a></td>
</tr>
<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>

</table>
<?php echo $this->_var['pagelist']; ?>
</div>
</div>
<?php echo $this->fetch('footer.html'); ?>