<?php
//获取栏目信息1
function class_name($cid,$str,$wapid){
$sql="SELECT cid,{$str} FROM class WHERE siteid='{$wapid}' AND cid='{$cid}'";
    $result=mysql_query($sql);
	list($cid,$strs) = mysql_fetch_row($result);
	   if($str == 'cn'){
	         if($cid == 0||$cid == NULL||$cid == ''){
	         $sql = "SELECT id,stitle FROM user WHERE id='{$wapid}'";
             $result = mysql_query($sql);
             list($wapid,$stitle) = mysql_fetch_row($result);
	         $str = $stitle;
             mysql_free_result($result);
	   }else{
	   $strs = $strs;
	       }
	   }else{
	   $strs = $strs;
	   }
	return $strs;
	}

?>