function Getimg($aid,$imgwith=110,$imgheight=110,$num=0) { global $dsql; $imgurls = ''; $row =$dsql->getone( "Select imgurls From `dede_addonimages` where aid='$aid' "); $imgurls= $row['imgurls']; preg_match_all("/{dede:img (.*)} (.*){//dede:img/isU",$imgurls,$wordcount); $count=$count($wordcount[2]); if ($num>$count || $num==0){$num=$count;} for($i=0;$i<$num;$i++){ $imglist.="<li><img src=".trim($wordcount[2][$i])." width=".$imgwith." height=".$imgheight."></li>"; } return $imglist; }
[field:id function="Getimg(@me,80,90,7)" /]
新闻热点
疑难解答