 
<div class="grid_imgcenter <?php echo $cssname;?>">     
      <?php 
        $blockimg =  get_img($blockimg); 
         $numv = round($maxline/2); 

foreach($result['data'] as $k=>$v){
          // pre($v);
        $title = $v['title'];  
        $img  =   get_img($v['kv']);  
        $desp  =   $v['desp'];
        $despjj  =   $v['despjj'];
         
       $dhlinkurl =  $dhlinktitle= '';
            foreach ($v['arrcan'] as   $key=>$value) { 
                 $bsccc = $key;
                 $$bsccc=$value;
             }

$linkurlarr =  get_nodelinkurl($dhlinkurl);

if($k==0) echo '<div class="col_1f4 tr">';
    ?>

    <?php
        if($k<$numv){
          ?>

               <div class="img">
              <?php 
                 if($dhlinkurl<>'') echo '<a '.linkhref($dhlinkurl) .'>';
              ?> 
              <img class="mt10" src="<?php echo $img?>"  alt="<?php echo $title?>">   
               <?php 
                  if($dhlinkurl<>'')  echo '</a>';
              ?>     
               
            </div>
   
            <div class="text">
              <h4><?php echo $title?></h4>    
        
             <div class="desp"><?php echo $desp?> </div>
        
              <?php 
              
                if($dhlinktitle<>'' && $dhlinkurl){  
              ?>
              <div class="dmbtn mt10">
                 <a class="more" <?php echo linkhref($dhlinkurl)?>><?php echo $dhlinktitle;?></a>
              </div>              
               <?php 
               }
              ?>
            </div>

          <?php
        }


if($k==$numv) echo '</div><div class="colhalf tc"><img class="mt10" src="'.$blockimg.'"  alt="'.$namefront.'" />  </div><div class="col_1f4">';
 
    ?>

   <?php
        if($k>=$numv){
     ?>

           <div class="img">
              <?php 
                if($dhlinkurl<>'') echo '<a '.linkhref($dhlinkurl) .'>';
              ?> 
                  
              <img class="mt10" src="<?php echo $img?>"  alt="<?php echo $title?>">   
               <?php 
                    if($dhlinkurl<>'')  echo '</a>';
              ?>     
               
            </div>
   
            <div class="text">
              <h4><?php echo $title?></h4>    
        
             <div class="desp"><?php echo $desp?> </div>
        
              <?php 
              
                 if($dhlinkurl<>''){ //为了保证grid的高度，这里的按钮，要不全有，要不全不要。 
                    $linktitlev='查看详情>';
                    if($linktitle<>'') $linktitlev=$linktitle;
              ?>
              <div class="dmbtn mt10">
                 <a class="more"  <?php echo linkhref($dhlinkurl)?>><?php echo $linktitlev;?></a>
              </div>              
               <?php 
               }
              ?>
            </div>


    <?php
        }  
    ?>
 


 
<?php
}
echo '</div>';  
?>
 <div class="c"> </div>
</div>

