<link href="../style/css/myf.css" rel="stylesheet" type="text/css" />
<script src="../style/js/myf.list.js" type="text/javascript"></script>
<script type="text/javascript">
function MM_changeProp(objId,x,theProp,theValue) { //v9.0
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(objId); }
  if (obj){
    if (theValue == true || theValue == false)
      eval("obj.style."+theProp+"="+theValue);
    else eval("obj.style."+theProp+"='"+theValue+"'");
  }
}
</script>
</head>

<body>
<table border="0" align="center" cellpadding="0" cellspacing="0" class="top_bar"><tr><td class="left"><a href="?type=add">+友</a></td><td align="center" class="center"><table  border="0"  cellpadding="0" cellspacing="0" id="my_f_sel">
  <tr>
    <td id="sell"><a href="#" onclick="MM_changeProp('nogro','','display','none','DIV');MM_changeProp('gro','','display','inline','DIV');MM_changeProp('sell','','backgroundColor','#328cc9','TD');MM_changeProp('selr','','backgroundColor','#fff','TD')">分组</a></td>
    <td id="selr"><a href="#" onclick="MM_changeProp('gro','','display','none','DIV');MM_changeProp('nogro','','display','inline','DIV');MM_changeProp('sell','','backgroundColor','#fff','TD');MM_changeProp('selr','','backgroundColor','#328cc9','TD')">全部</a></td>
  </tr>
</table></td><td width="40" class="right"><a href="../index.php?">首页</a></td></tr></table>
<table border="0" align="center" cellpadding="0" cellspacing="0" class="my_sub_bar">
    <tr>
	<td><a href="message/list.php"><img src="../style/message.png"></a><br>短信</td>
	<td><a href="zone.php?"><img src="../style/zone.png"></a><br>空间</td>
	<td><a href="qe"><img src="../style/message.png"></a><br>说说</td>
	<td><a href="weibo.php?"><img src="../style/weibo.png"></a><br>微博</td>
	</tr>
	</table>
<div id="gro" style="display:inline">
<div class="f_sub">好友分组[<a href="mod_gro.php?">管理分组</a>]</div>
<?php   echo myflist($id,$wapid,'html') ?></div>
<div id="nogro" style="display:none;"><?php 
$sql = "SELECT `fid`,`userid`,`friendid`,`groid`,`siteid`,`remarks`,`black` FROM `my_friend` WHERE userid='{$id}' AND siteid='{$wapid}'";
$lists = mysql_query($sql);
if($lists && mysql_num_rows($lists)>0){
   echo '<ul class="f_list">';
	while(list($fid,$userid,$friendid,$groid,$siteid,$remarks,$black) = mysql_fetch_row($lists)){
	 $zai=u_online($friendid,$wapid);
if($zai==1){
  $zai='在线';
  }else{
   $zai='离线';
   }
     echo ' <li>
	 <table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td class="left"><a href="#"><img src="'.user('head','id',$friendid).'"></a></td><td class="right"><a href="#"><h2>'.user('nc','id',$friendid).'['.$zai.']</h2><h3>'.user('qianm','id',$friendid).'</h3></a></td></tr></table>
	 </li>
';
   }
}else{
echo '<div class="tip">您还没有好友哦，赶快添加吧</div>';
}
echo '</ul>';
?>
</div>
<div class="footer">
Myfriend By<?php echo $_SERVER['HTTP_HOST']?>
</div>
<?php   echo myflist($id,$wapid,'js') ?>