POST TIME:2017-11-12 23:44
// 获取图集图片[新增的功能] function Getimgs($aid, $imgwith = 400, $imgheight = 300, $num = 0){ global $cfg_basedir; 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 .= "" . trim($wordcount[2][$i]) . ""; } if($num>0){return $imglist;} else{ $row = $dsql -> getone("Select litpic From`dede_archives` where id='$aid'"); if($row['litpic']=='') { $row['litpic'] = '/images/defaultpic.gif'; } return $row['litpic']; } }