<div class="logo_bg">
  <h1>
  <?php
    $query = mysql_query("select * from {$total_pr}user where id='".$_SESSION['con_id']."'");
	while($row = mysql_fetch_array($query)){
	  $user_name = $row['username'];	
	}
    echo "<font color='#00FF33'>".$user_name."</font><span class='lo_is'>的个人博客</font><br />";
  ?>
  </h1>
  <div class="logo">
   <?php
     $query = mysql_query("select * from {$total_pr}user where id='".$_SESSION['user_id']."'");
		while($row = mysql_fetch_array($query)){
		  $admin_name = $row['username'];	
		}
     if($admin_name != ""){
         echo "当前用户：<a href='index.php?id=".$_SESSION['user_id']."'>".$admin_name."</a>&nbsp;|&nbsp;<a href='logout.php'>退出</a>";
     }
     else {
         echo "<strong><a href='login.php'>登陆</a>&nbsp;|&nbsp;<a href='register.php'>注册</a></strong>";   
     }
   ?>
</div>
</div>
<div class="blue">
<div id="slatenav">
<ul>
<li><a href="./index.php" title="博客首页" class="current">首页</a></li>
<li><a href="./article.php" title="我的博文">博文</a></li>
<li><a href="./picture.php" title="我的相册">相册</a></li>
<?php
if($_SESSION['user_id'] == $_SESSION['con_id']){
     echo '<li><a href="friends.php" title="我的好友">好友</a></li>';
	 $qu[0] ="select status from {$total_pr}hello where receiveid='".$_SESSION['user_id']."' and status='0'";
	 
	 $qu[1] = "select status from {$total_pr}throw where receiveid='".$_SESSION['user_id']."' and status='0'";
	  
	 $qu[2] = "select status from {$total_pr}le_mess where receiveid='".$_SESSION['user_id']."' and status='0'";
	 
	 $qu[3] = "select status from {$total_pr}img_comment where receiveid='".$_SESSION['user_id']."' and status='0'";
	 
	 $qu[4] = "select status from {$total_pr}art_comment where receiveid='".$_SESSION['user_id']."' and status='0'";
	   for($i=0;$i<6;$i++){
		   $re = mysql_query($qu[$i]);
		   if($re){
			   $status_num += mysql_num_rows($re);
		   }
	   }
	 
	   if($status_num != 0){
		  echo '<li><a href="with_me.php?tab0" title="与我相关">与我相关(+<font color=red>'.$status_num.'</font>)</a></li>';
	   }
	   else{
		  echo '<li><a href="with_me.php?tab0" title="与我相关">与我相关</a></li>';
	   }
}
?>
</ul>
</div>
</div>