<?php 
  function bbslist($uv,$uw,$limit){
  $sql="SELECT bbsid,gro,title,v,content,time,name,zip,top,waptop,good,userid FROM bbs WHERE siteid='{$GLOBALS['wapid']}' AND userid={$uw} ORDER BY bbsid DESC LIMIT {$limit}";  
        $result = mysql_query($sql);
		if($result && mysql_num_rows($result)>0){
	    $i=0;
	    while(list($bbsid,$gro,$title,$v,$content,$time,$bname,$zip,$top,$waptop,$good,$userid)=mysql_fetch_row($result)){
		        $list.='<li><a href=http://'.$_SERVER['HTTP_HOST'].'/bbs/content.php?cid='.$gro.'&id='.$bbsid.'>'.$title.'['.$v.']</a><br>'.mb_substr($content,0,100,"UTF-8").'...</li>';
		    }
		}else{
		        $list='您还没有发表任何帖子哦！';
		
		   }
		   if($uv==$uw){
		     $t='我的帖子';
			 }else{
			 $t='TA的帖子';
			 }
		   $list='<ul class="zone_bbs_list">'.$list.'</ul><div class="more"><a href="http://'.HTTP_HOST.'/bbs/search_list.php?cid=0&u='.user('xid','id',$uw).'">加载更多</a></div>';
		   return $list;
		}
function admin_mk($admin){
    if($admin==1){
        $admini1='
	<a href="../admin/wap_admin_cg.php?">超级管理员后台</a><br>';
    }else{
	$admini1=NULL;
	}
	if($admin==2||$admin==1){
	$admini2='
	<a href="../admin/wap_admin.php?">站长管理后台</a>';
	}else{
	$admini2=NULL;
	}
	if($admini1==NULL&&$admini2==NULL){
	 $admini='';
	 }else{
	 $admini='<table style="width:80%;margin-top:10px;border:1px solid #ccc;height:50px;margin-left:auto;margin-right:auto;">
	<tr>
	<td style="height:20px;line-height:20px;background-color:#ccc;text-align:center;">
	管理后台
	</td>
	</tr>
	<tr>
	<td>
	'.$admini1.$admini2.'
	</td>
	</tr>
	</table>';
	
      }
	  return $admini;
}