<?php
if(!defined('IN_DEMOSOSO')) {
exit('this is wrong page,please back to homepage');
}
?>

<?php

//begin cate level 1
$sql = "SELECT * from ".TABLE_CATE." where ppid='$mainpidname'  and sta_visible='y' $andlangbh order by pos desc,id";	// echo getnum($sql);
if(getnum($sql)>0){
$res = getall($sql);
$indexarr = indexingarr($res);
$getnewarr = getnewtreearr($indexarr);
//	pre($getnewarr);
 
 if(substr($curcatepidname,0,4)=='cate') $sdmaincate_cur = ' sdmaincate_cur ';
 else $sdmaincate_cur =  '';

 //$sdmaincate_cur =  '';
//sdexpand-- 
 
 $ulclassv= '';
//$ulclassv= 'class="sdexpand '.$sdmaincate_cur.'"';

echo '<ul '.$ulclassv.'>';
echo   echoarrhtml_menu($getnewarr,1);
echo '</ul>';
}//end 	if(getnum($sql)>0)
else echo '<ul><li class="m"><a class="m" href="'.$mainurl.'">'.decode($maintitle).'</a></li></ul>';

?>

  