<?php 
function ViewClassList($urlStr,$wapid){
        $html .= '<div class="title">选择栏目|<a href="?cid=0">所有记录>></a></div>';
		$sql="SELECT cid,cn,xuhao FROM class WHERE url='{$urlStr}' AND siteid ='{$wapid}' ORDER BY cid DESC";
		$result = mysql_query($sql);
		$dnum = 0;
		while(list($cid,$cn,$number) = mysql_fetch_row($result)){
		$div = $dnum++%2==0?'line1':'line2';
		$html .= '<div class="'.$div.'">';
		$html .= "[".$cid."]";
		$html .= "<a href=\"?cid=".$cid."\">".$cn."</a>"; 
		}
	return $html;
}
?>