<!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 if ($uid == $userinfo['id']) {?>我<?php } else {echo htmlspecialchars($userinfo['screen_name']);}?>关注的人<?php echo V('-:tpl/title');?></title>
<link href="<?php echo W_BASE_URL;?>css/base.css" rel="stylesheet" type="text/css" />
<link href="<?php echo W_BASE_URL;?>css/skin_<?php echo SITE_SKIN_TYPE;?>/skin.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div id="wrapper">
    <!-- header -->
    <?php include APP::tplFile('header');?>
    <!-- end header -->
        <div id="container">
        	<div class="sidebar">
            	<?php include APP::tplFile('intro');?> 
				<!-- top 10 -->
				<?php if ($top == 'true'):?>
				<div class="top10">
                	<div class="sidebar-head">人气关注榜 Top10</div>
                    <ul>
						<?php if ($toplist):?>
						<?php foreach ($toplist as $key => $item):?>
                    	<li>
                        	<div class="ranking skin-bg"><?php echo $key+1;?></div>
                        	<span><?php echo number_format($item['followers_count']);?></span>
                            <a href="<?php echo URL('ta',array('id' => $item['uid']));?>"><?php echo htmlspecialchars($item['screen_name']);?></a>
                        </li>
						<?php endforeach;?>
						<?php endif;?>
                    </ul>
                </div>
				<!-- end top -->
				<!-- fans -->
				<?php else:?>
                <div class="user-sidebar">
                	<div class="sidebar-head"><?php echo htmlspecialchars($userinfo['screen_name']);?>的粉丝（<?php echo empty($userinfo['followers_count']) ? 0 : $userinfo['followers_count'];?>）</div>
                    <ul>
						<?php if ($followers):?>
						<?php foreach ($followers as $item):?>
                    	<li>
                        	<a href="<?php  echo URL('ta',array('id' => $item['id']));?>"><img src="<?php echo APP::F('profile_image_url', $item['profile_image_url']);?>" alt="<?php echo htmlspecialchars($item['screen_name']);?>" title="<?php echo htmlspecialchars($item['screen_name']);?>" /></a>
                            <p><a href="<?php echo URL('ta',array('id' => $item['id']));?>" title="<?php echo htmlspecialchars($item['screen_name']);?>"><?php echo htmlspecialchars($item['screen_name']);?></a></p>
                        </li>
						<?php endforeach;?>
						<?php endif;?>
                    </ul>
                </div>
				<?php endif;?>
				<!-- end fans -->       
                
                          
            </div>
            <div class="main">
            	<div class="title-box">
            		<h3 class=""><?php if ($uid == $userinfo['id']): ?>我<?php else:?><?php echo htmlspecialchars($userinfo['screen_name'])?><?php endif;?>正在关注（<?php echo empty($userinfo['friends_count']) ? 0 : $userinfo['friends_count'];?>）</h3>
                    
                </div>
				<?php if (empty($list['users'])):?>
					<!-- follow empty tip -->
					<?php if ($uid == $userinfo['id']):?>
						<!-- wo tip -->
						<div class="default-tips">
							<div class="tips-icon all-bg"></div>
							<p>我关注的人-还没找到想要关注的人？快去找朋友吧。 </p>
						</div>
						<!-- end wo tip -->
					<?php else:?>
						<!-- ta tip -->
						<div class="default-tips">
							<div class="tips-icon all-bg"></div>
							<p>还没发现值得关注的人呢~ </p>
						</div>
						<!-- end ta tip -->
					<?php endif;?>
					<!-- end follow empty tip -->
				<?php else:?>
					<!-- follow list -->
					<div class="user-list">
						<ul id="user_list">
							<?php if ($list):?>
							<?php foreach ($list['users'] as $item):?>
							<li>
								<div class="list-content">
									<div class="user-pic">
										<a href="<?php  echo URL('ta', array('id' => $item['id']));?>"><img src="<?php echo APP::F('profile_image_url', $item['profile_image_url']);?>" alt="" title="<?php echo htmlspecialchars($item['screen_name']);?>"/></a>
									</div>
									<div class="content-r">
										<?php if ($uid != $userinfo['id']):?>
											<?php if (in_array($item['id'], $fids)):?>
											<span class="followed-icon icon-bg">已关注</span>
											<?php else:?>
											<a class="addfollow-btn all-bg"  rel="<?php echo $item['id']?>" href="#"></a>
											<?php endif;?>
										<?php else:?>
											<?php if (in_array($item['id'], $fids)):?>
											<div class="each-follow all-bg" title="已互相关注"></div>
											<?php endif;?>
											<a href="#" rel="<?php echo $item['id']?>" style="display:none" class="forjs-cancel-att">取消关注</a>
                                            <?php if (in_array($item['id'], $fids)):?>
											<a href="javascript:;" style="display:none" rel="<?php echo htmlspecialchars($item['screen_name']);?>" class="forjs-private">发私信</a>
											<?php endif;?>
										<?php endif;?>
                                        
									</div>
									<div class="content-m">
										<a class="u-name" href="<?php  echo URL('ta', array('id' => $item['id']));?>" title="<?php echo htmlspecialchars($item['screen_name']);?>"><?php echo htmlspecialchars($item['screen_name']);?></a>
										<p class="icon-bg <?php if ($item['gender'] == 'f'):?>female-icon<?php elseif ($item['gender'] == 'm'):?>male-icon<?php endif;?>"><?php echo $item['location'];?> 粉丝数：<?php echo $item['followers_count'];?>人</p>
										<div class="u-info"><?php if ($item['description']):?>简介：<?php echo htmlspecialchars($item['description']);?><?php endif;?>&nbsp;</div>
									</div>
								</div>
							</li>
							<?php endforeach;?>
							<?php endif;?>
						</ul>
						<div class="list-footer">
							<div class="page">
							<?php echo $makePage;?>
							</div>
							<a href="#">返回顶部</a>
						</div>
					</div>
					<!-- end follow list -->
				<?php endif;?>
            </div>
        </div>
        <!-- footer -->
		<?php include APP::tplFile('footer');?>
        <!-- end footer -->
    </div>
    
<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/common.js"></script>
<script type="text/javascript" src="<?php echo W_BASE_URL;?>js/ui.js"></script>
<script type="text/javascript" src="<?php echo W_BASE_URL;?>js/msgs.js"></script>
<script type="text/javascript">
var XWEIBO = {uid: '<?php echo $userinfo["id"];?>', emotions: <?php echo json_encode(V('-:sinaWeiboEmotions'));?>, autoshow: '<?php echo  V('-:userConfig/user_newfeed');?>', tipshow: '<?php echo  V('-:userConfig/user_newmsg');?>'};
$(function(){
	XWB.listenAttention($('#user_list')<?php echo ($uid == $userinfo['id'])? ", 1": '';?>);

	setTimeout(function(){
		XWB.notifyChecker.start();
	}, 3000);

	 XWB.bindSearch($('#search'), $('#searchSubmit'));

    $('#user_list .forjs-private').click(function(e){
      e.preventDefault();
      var el = $(e.target);
      XWB.MSGS.showPopup();
      XWB.MSGS.findEl('sender').val(el.attr("rel"));
      XWB.MSGS.findEl('content').focus();

        $('#container div.user-intro strong').substrByWidth(105);
    });
});
</script>   
</body>
</html>
