<!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>
<script>
parent.admin.index.selectSubMenu('#celebrityList', false)
function search() {
	var url = buildModulePath('admin/celebrity','celebrityList', 'keyword=' + $('#keyword').val());
	window.location.href = url;
}
</script>
</head>
<body>
	<?php include  APP::tplFile("admin/header.php", false);?>
     <div class="wrap">
            <div class="position">当前位置：微博管理<em>></em>名人推荐<em>></em><strong>名人列表</strong></div>
            <!--搜索结果列表-->
            <div class="cr_list">
				<div class="search_box">
                    搜索：
                    <input class="insert_text" type="text" name="keyword" id="keyword" value="<?php echo V('g:keyword');?>" />
                    <span class="button"><input type="submit" value="搜索" onclick="search()" /></span>
		        </div>
			<form name="form_check" id="form_check" action="" method="post">
                <table cellspacing="0">
				<tr>
                	<th style="text-align:center;width:30px;"></th>
					<th style="text-align:center;width:50px;">ID</th>
			        <th class="text_l" style="text-align:center;width:150px">昵称</th>
					<th style="text-align:center;">介绍</th>
					<th style="text-align:center;">微博地址</th>
					<th style="text-align:center;width:100px;">排序</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) {?> class="rowbg"<?php }?>>
                 	<td class="table_checkbox"><input name="id[]" type="checkbox" value="<?php echo $item['id'];?>" /></td>
					<td class="text_l" style="text-align:left;"><?php echo $item['id'];?></td>
					
					<td style="text-align:left;"><?php echo $item['nick'];?></td>
					<td style="text-align:left;"><?php echo $item['description'];?></td>
					<td style="text-align:center;"><a href="<?php echo $item['url'];?>" target="_blank"><?php echo W_BASE_HTTP . $item['url'];?></a></td>
					<td style="text-align:center;"><?php echo $item['orders'];?></td>
					<td style="text-align:center;">
						<a href="<?php echo URL('admin/celebrity.edit','id='. $item['id']);?>">修改排序</a><em>|</em><a href="javascript:if(confirm('你确定要删除名人<?php echo $item['nick'];?>吗?')) {window.location.href='<?php echo URL('admin/celebrity.delete','id='. $item['id']);?>'}">删除</a>
					</td>
				 </tr>
			    <?php
						}
					} else {
				?>
				<tr >
					<td colspan="7" style="text-align:left;padding-left:20px">没有任何记录</td>
			    </tr>
				<?php }?>
              </table>
			</form>
                    </div>

					<?php if (count($list)> 0) {?>
                    <div class="cr_oplist">
                        <div class="right">
                               <?php echo $pager?>
                        </div>
                        <div class="left">
                            <label><input name="checkall" type="checkbox" value="" onclick="checkAll('id[]', this.checked)"/>全选</label>
							<a href="#" onclick="doAction('del','id[]','form_check','<?php echo URL('admin/celebrity.delete');?>')">删除所选</a>
                        </div>
                    </div>
					<?php }?>
		<div class="info_tips">
            <p>1.名人推荐将取前12名在爱说茶馆前端网页中显示，每次显示3人，共分4页；</p>
            <p>2.显示内容包括头像、昵称、介绍，点击后在此设定的网页；</p>
            <p>3.取前12名的选择方式为优先选择设置的排序数值较小的内容，排序相同选择ID较小的内容。</p>
            <p>4.昵称请输入此用户当前在微博中使用的昵称。</p>
        </div>
     </div>  
</body>
</html>
