<!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>
function disabledFollowers(uid, nickname) {
	if (!confirm('确认要屏蔽"' + nickname + '"吗？')) {
		return;
	}
	var data = {
		'id': uid,
		'nick': nickname
	}
	$.post('<?php echo URL('admin/followers.delete');?>',data, function(data) {
		data = eval('(' + data + ')');
		if (data.state) {
			alert('成功屏蔽');
			window.location.reload();
		} else {
			alert('操作失败');
		}		
	})
}
</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>
                        <!--search-->

			<?php if (count($list) > 0) {?>
			<div class="cr_oplist">
				<div class="right">
				<?php echo $pager;?>
				</div>
			</div>
			<?php }?>

                        <!--搜索结果列表-->
            <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;">昵称</th>
					<th style="text-align:center;width:200px;">用户帐号</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;"><?php echo $item['id'];?></td>
					
					<td style="text-align:left;"><?php echo $item['screen_name'];?></td>
					<td style="text-align:left;"><?php echo $item['uid'];?></td>
					<td style="text-align:center;"><?php echo $item['followers_count'];?></td>
					<td style="text-align:center;">
							<?php if ($item['add_time']) {?>
								<a href="?m=admin/followers.delete&id=<?php echo $item['id'];?>">恢复</a>
							<?php } else {?>
							<a href="javascript:disabledFollowers('<?php echo $item['uid'];?>','<?php echo $item['screen_name'];?>');">屏蔽</a>
							<?php }?>
					</td>
				 </tr>
			    <?php
						}
					} else {
				?>
				<tr>
					<td colspan="5" 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>
		<?php }?>
				<p>1. 人气关注将取前10名未被屏蔽的用户，显示在网页前端；</p>
				<p>2. 显示内容包括昵称、粉丝数；</p>
				<p>3. 被屏蔽的用户将进入屏蔽列表，可取消屏蔽，重新进入排名。</p>
     </div>  
</body>
</html>
