 <?php 
  $res = getarr_cate($pidcate);
?> 
<div  <?php echo $cssname?>"  <?php echo $stylev?>>
<ul class="newsgridlist">
<?php 
 
   $showimgV= 'n';
   if(is_int(strpos($cssname,'showimg'))) $showimgV= 'y'; 


if($res['datares']=='yes'){
	 foreach($res['data'] as $k=>$v){
  
      $name = $v['name']; 
     
      
      $cateurl = $v['link']; 

      ?>
      <li class="main boxcol <?php echo $cus_columnsv;?>"><div class="boxheader">  
	      <a class="more" href="<?php echo $cateurl?>">更多></a>
       <h3><?php echo $name?></h3> 
       </div>
 
        <ul class="sublist <?php echo $cssname?>">
             <?php 
             
             
			 $curcatepidname = $v['pidname']; 

							  $sqlarr = array( 
					                'excerpt'=>$cus_substrnum,
					                'start'=>0,
					                'maxline'=>$maxline,
					                'order'=>'','where'=>'',
					                );
					  
					$resnode = getarr_node($curcatepidname,$sqlarr); 

 
					  if($resnode['datares']=='yes'){ 
					  
					  foreach($resnode['data'] as $k22 => $v22){
					  
					   
                            $title=$v22['title'];  
                            $nodeurl = $v22['link'];                            
                             
                            $kvsm= get_kvsm_cus($v22['kvsm_cus'],$v22['kvsm']);         
                            $imgvsm = get_img($kvsm); 


                           if($k22==0 && $showimgV =='y') 
                           { 
                            ?>
                            <li class="first img">
                            <a  <?php echo linkhref($nodeurl);?>>
                            <img class="zoomimg" src="<?php echo $imgvsm?>" alt="<?php echo $title?>" />
                            <div class="text"><?php echo $title?></div></a></li>
                                <?php
                            }
                            else {?>
                                 <li><a <?php echo linkhref($nodeurl);?>><?php echo $title?></a></li>
                            <?php } 

                    }
                    
                }
                else echo '<li>sorry,no result sub.</li>';

                    ?>
         </ul> 
    </li> 

 
<?php
}
?>


 

</ul>
<div class="c"> </div>
</div>
<?php }
 
?>
 

