 
<ul class="textlist <?php echo $cssname?>"  <?php echo $stylev?>>
<?php
  foreach($result['data'] as $k=>$v){
          // pre($v);
        $title = $v['title']; $titlestyle = $v['titlestyle']; 
         
        $kvsm= get_kvsm_cus($v['kvsm_cus'],$v['kvsm']);         
        $img = get_img($kvsm); 
        $dateday  =   $v['dateday'];
        $desp  =   $v['desp'];
        $titlestylev=$titlestyle<>''?' style="'.$titlestyle.'" ':'';   
 
            $link = $v['link'];          
            $linkurl = linkhref($link).$titlestylev;             
            
            //echo $linkurl;
 
     if($kvsm<>''){
            	?>
            	<li class="hasimg">
            	<a class="img" <?php echo $linkurl;?>><img src="<?php echo get_img($img);?>" alt="<?php echo $title;?>" /></a>
            	<div class="text"><h4><span class="day"><?php echo $dateday;?></a></span>
            	<a <?php echo $linkurl;?>><?php echo $title;?></a></h4>
            	<p class="textshort"><?php echo $desp;?></a></p></div></li>
            	<?php 
            }
            else{
            	?>
            	<li class="noimg"><div class="text"><h4><span class="day"><?php echo $dateday;?></a></span>
            	<a <?php echo $linkurl;?>><?php echo $title;?></a></h4>
            	<p class="textshort"><?php echo $desp;?></a></p></div></li>
            	<?php 
            }
        }//end foreach

?>
</ul>