function user_otherlink($limit=5){ global $dbtbpre,$empire,$navinfor,$class_r; if($navinfor[infotags]){ $classid=(int)$classid; $limit=(int)$limit; $tbname=$class_r[$navinfor[classid]][tbname]; $tagarr=explode(",",$navinfor[infotags]); $arr=array(); $num=ceil($limit/count($tagarr)); foreach($tagarr as $k=>$v){ if(count($tagarr)==$k+1){ $num=$limit-count($arr); }else{ if($i<$num){ $num=ceil(($limit-count($arr))/count($tagarr)); } } $t=$empire->fetch1("select tagid,num from {$dbtbpre}enewstags where tagname='$v'"); if($t[tagid]){ $sql=$empire->query("select id from {$dbtbpre}enewstagsdata where tagid=$t