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

		<?php
		$resmenu = getarr_dmmenu($pidmenu);
		 // pre($resmenu);
if($resmenu['datares']=='no') echo $resmenu['data'];
else{
?>
 <ul>
<?php
 
		foreach ($resmenu['data'] as $k=>$v) {

			$name = $v['name'];
			$pidname = $v['pidname'];
			$menutid = 'menu'.$v['id'].' ';
			$linkurl = $v['linkurl'];

			$typepidname=$v['type'];
			 $type = substr($typepidname,0,4);

 			if($type=='cate'){
				if($typepidname==$mainpidname) $activemenu = ' active';
			    else $activemenu = '';
 			}
			else{
				 if($pidname==$main_menuid) $activemenu = ' active';
				 else $activemenu = '';
			}
 

			?>
			<li  class="<?php echo $menutid?>"><a class="<?php echo $activemenu?>" href="<?php echo $linkurl?>"><?php echo $name?></a></li>
			<?php
		}
		?>
	</ul>
<?php
}
?>	
  