<?php
if($op==""){
$op="my";
}
?>
		<div class="userMain">
			<div class="uMain_title"><span class="iconFans">访问脚印</span></div>
			<div class="uMain_content">
				<div class="stageBox">
					<div class="stageBoxTop"><span></span></div>
					<div class="stageBoxCenter">
						<div class="stageBoxCenterContent">
							<div class="main_nav">
								<ul>
								<li class="navb_4"><a href="?ac=friend">我的好友</a></li>
								<li class="nava_4"><a href="?ac=look">访问脚印</a></li>
								<li class="navb_4"><a href="?ac=online">在线成员</a></li>
								</ul>
							</div>
							<div class="main_nav2">
								<ul>
								<li <?php if($op=="my") echo 'class=nav2a_4'?>><a href="?ac=look&op=my">谁访问过我</a></li>
								<li <?php if($op=="ta") echo 'class=nav2a_4'?>><a href="?ac=look&op=ta">我访问过谁</a></li>
								</ul>
							</div>
							<div class="minHeight500">
																<div class="onlineUser">
									<ul>
<?php
$a=0;
	global $db;
if($op=="my"){
	$sql="select * from s_look where S_Namea='".$chsh_username."' order by s_id desc";
		$Arr=getuserpage($sql,"30");//sql,每页显示条数
		$result=$db->query($Arr[2]);
		$numdate="a";
		if($result){
			while ($row = $db ->fetch_array($result)){
		$numdate="b";
	$sqlu="select * from s_users where S_name='".$row["S_Nameb"]."' order by s_id desc";
	$rsu=$db->query($sqlu);
	$rowu=$db->fetch_array($rsu);
	$fsnum= $db -> num_rows($db -> query("select * from s_friend where S_nameb='".$rowu["S_Name"]."' and s_lock=1"));
	$limit=time()-strtotime($rowu["S_LogTime"]);
?>
																				<li>
											<div class="icon"><a href="<?php echo userlink("index",$row["S_Nameb"])?>" target="_blank"><img class="avatar-58" src="<?php echo piclink("logo",$rowu["S_Logo"],"big")?>" onerror="this.onerror=null;this.src='<?php echo S_SiteDomain?>/user/images/avatar/noface_small.gif'" title="<?php echo $row["S_Nameb"]?>"/></a></div>
											<div class="info">
												<div><a <?php if($limit < 1800){echo("class='online_icon'");}?> href="<?php echo userlink("index",$row["S_Nameb"])?>" target="_blank"><?php echo $row["S_Nameb"]?></a></div>
												<div>人气：<?php echo $rowu["S_Hits"]?>次 / 粉丝：<?php echo $fsnum?>人 / 被赞：<?php echo $rowu["S_Dhits"]?>次</div>
												<div>访问时间：<?php echo datetime($row["S_Addtime"])?></div>
											</div>
										</li>
<?php
	}
}
if($numdate=="a"){
		echo("<div class='nothing'>还没有谁访问过您。</div>");
}
?>
																			</ul>
								</div>
<div class="page"><div class="pages"><?php echo $Arr[0];?></div></div>
															</div>
<?php
}elseif($op=="ta"){
	$sql="select * from s_look where S_Nameb='".$chsh_username."' order by s_id desc";
		$Arr=getuserpage($sql,"30");//sql,每页显示条数
		$result=$db->query($Arr[2]);
		$numdate="a";
		if($result){
			while ($row = $db ->fetch_array($result)){
		$numdate="b";
	$sqlu="select * from s_users where S_name='".$row["S_Namea"]."' order by s_id desc";
	$rsu=$db->query($sqlu);
	$rowu=$db->fetch_array($rsu);
	$fsnum= $db -> num_rows($db -> query("select * from s_friend where S_nameb='".$rowu["S_Name"]."' and s_lock=1"));
	$limit=time()-strtotime($rowu["S_LogTime"]);
?>
																				<li>
											<div class="icon"><a href="<?php echo userlink("index",$row["S_Namea"])?>" target="_blank"><img class="avatar-58" src="<?php echo piclink("logo",$rowu["S_Logo"],"big")?>" onerror="this.onerror=null;this.src='<?php echo S_SiteDomain?>/user/images/avatar/noface_small.gif'" title="<?php echo $row["S_Namea"]?>"/></a></div>
											<div class="info">
												<div><a <?php if($limit < 1800){echo("class='online_icon'");}?> href="<?php echo userlink("index",$row["S_Namea"])?>" target="_blank"><?php echo $row["S_Namea"]?></a></div>
												<div>人气：<?php echo $rowu["S_Hits"]?>次 / 粉丝：<?php echo $fsnum?>人 / 被赞：<?php echo $rowu["S_Dhits"]?>次</div>
												<div>访问时间：<?php echo datetime($row["S_Addtime"])?></div>
											</div>
										</li>
<?php
	}
}
if($numdate=="a"){
		echo("<div class='nothing'>您还没有访问过谁。</div>");
}
?>
																			</ul>
								</div>
<div class="page"><div class="pages"><?php echo $Arr[0];?></div></div>
															</div>
<?php
	}
?>

						</div>
					</div>
					<div class="stageBoxBottom"><span></span></div>
				</div>
			</div>
