01function Getimg($aid,$imgwith=110,$imgheight=110,$num=0) 02{ 03global $dsql; 04$imgurls = ''; 05$row =$dsql->getone( "Select aid,imgurls From `dede_addonimages` where aid='$aid' "); 06$id=$row['aid'];07$imgurls= $row['imgurls']; 08$dtp = new DedeTagParse();09$dtp->LoadSource($imgurls);10if(is_array($dtp->CTags))11{12 $i=0;13 foreach($dtp->CTags as $ctag)14 {15 if($i<$num){16 if($ctag->GetName()=="img")17 {18 $bigimg = trim($ctag->GetInnerText());19 if($ctag->GetAtt('ddimg') != $bigimg && $ctag->GetAtt('ddimg')!='')20 {21 $litimg = $ctag->GetAtt('ddimg');22 }23 $title=$ctag->GetAtt('text');24 $imglist.='<li><a title="'.$title.'" href="/plus/view.php?aid='.$id.'"><img src="'.$bigimg.'" width="'.$imgwith.'" height="'.$imgheight.'" alt="'.$title.'"></a></li>'; 25 $i++;26 }27 }28 }29 }30return $imglist; 31 32} |