<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo V('-:tpl/title');?>管理后台</title>
<link href="<?php echo W_BASE_URL;?>css/admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo W_BASE_URL;?>js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo W_BASE_URL;?>js/admin.js"></script>
</head>
<body>
     <!--header-->
     <?php include APP::tplFile("admin/header", false);?>
     <!--content-->
     <div class="wrap">
              <div class="hspace1"></div>
              <!--left-->
              <div class="con_left">
				   <?php include APP::tplFile("admin/weibo_setting_menu", false);?>
              </div>
              <!--right-->
              <div class="con_right">
				<!--menu-->
				<?php include("templates/admin/main_menu.tpl.php");?>
				<div class="position">
				您所在的位置：<b>微博管理</b>><b>今日话题</b>><b>已设置话题</b>
			  </div>
            <!--搜索结果列表-->
            <div class="cr_list">
			<form name="form_check" id="form_check" action="" method="post">
                <table cellspacing="0">
				<tr>
					<th style="text-align:center;width:50px;">ID</th>
			        <th class="text_l" style="text-align:center;width:100px">话题内容</th>
					<th style="text-align:center;">生效时间</th>
					<th style="text-align:center;width:200px;">操作者</th>
                    <th style="text-align:center;width:150px;">操作</th>
                 </tr>
				 <?php if (count($list) > 0) {?>
				 <?php foreach($list as $key => $item) {?>
				 <tr<?php if ($key %2) {?> style="background:#f5f6f3;"<?php }?>>
					<td class="text_l" style="text-align:left;"><input name="id[]" type="checkbox" value="<?php echo $item['id'];?>" /><?php echo $item['id'];?></td>
					
					<td style="text-align:left;"><?php echo $item['topic'];?></td>
					<td style="text-align:left;"><?php echo date('Y-m-d H:i', $item['start_time']);?></td>
					<td style="text-align:center;"><?php echo $item['name'];?></td>
					<td style="text-align:center;">
						<a href="?m=admin/today_topic.edit&id=<?php echo $item['id']?>">编辑</a>
						<a href="javascript:if(confirm('你确定要删除话题<?php echo $item['topic'];?>吗?')) {window.location.href='?m=admin/today_topic.delete&id=<?php echo $item['id'];?>'}">删除</a>
					</td>
				 </tr>
			    <?php
						}
					} else {
				?>
				<tr >
					<td colspan="6" style="text-align:left;padding-left:20px">没有任何记录</td>
			    </tr>
				<?php }?>
              </table>
			</form>
                    </div>

		<?php if (count($list)> 0) {?>
                    <div class="cr_oplist">
                        <div class="left">
                            <input name="checkall" type="checkbox" value="" onclick="checkAll('id[]', this.checked)"/>全选 
			<a href="#" onclick="doAction('del','id[]','form_check','?m=admin/today_topic.delete')">删除</a>
                        </div>
                        <div class="right">
                               <?php echo $pager?>
                        </div>
                    </div>
					<?php }?>
     </div>  
</body>
</html>
