function findIMG($text){ preg_match_all('/\.*?\<\/img\>/i',$text,$page); foreach($page as $value) $src = substr($value<0>,5); $src = substr($src,0,-6); return($src);}function ssi_pic($num_top = 12,$order,$board){ global $db_prefix, $scripturl, $smcFunc; $request = $smcFunc['db_query'>('', ' SELECT t.id_topic,m.body,m.subject FROM {db_prefix}messages m,{db_prefix}topics t WHERE t.id_first_msg=m.id_msg AND t.id_board='.$board.' ORDER BY t.'.$order.' DESC LIMIT '.$num_top, array( ) ); $posts = array(); while ($row = $smcFunc['db_fetch_assoc'>($request)) { // Build the array. $topics[> = array( 'id' => $row['id_topic'>, 'body' => $row['body'>, 'subject' => $row['subject'> ); } $smcFunc['db_free_result'>($request); foreach ($topics as $data){ $topic = "topic/".$data['id'>; $srcPic = findIMG($data['body'>); $subject = $data['subject'>; if($srcPic ==''){ echo '<div class="boxpGal"> <div class="picpGal"><a href="'.$topic.'" title="'.$subject.'" target="_blank"><img src="http://insurancethai.net/wp-content/themes/insurancecenter/images/logo.png" width="150" height="180" alt="" /></a></div> </div>'; }else{ echo '<div class="boxpGal"> <div class="picpGal"><a href="'.$topic.'" title="'.$subject.'" target="_blank"><img src="'.$srcPic.'" width="150" height="180" alt="" /></a></div> </div>'; } }}
echo'<div class="cat_bar"><h3 class="catbg">ดึงรูปมาแสดงโอ๊ววววว</h3></div>';echo''.ssi_pic(6,'ID_TOPIC',34).'';
.boxpGal { background-color: rgba(255, 255, 255, 0); float: left; height: 180; width: 150px; margin: 5px;}
$srcPic = findIMG($num['body'>);
$detail =$num['body'>;
".$detail."
<style type="text/css">.image-crop{width:120px; height:80px;overflow:hidden;border: 1px #ccc dotted; padding:1px;}</style><div class="image-crop"><img src=' ".$srcPic." ' ></div>
// Show the menu up top. Something like ...
function findIMG($text){ if (preg_match_all('/\.*?\<\/img\>/i',$text,$page)){ foreach($page as $value) $src = substr($value<0>,5); $src = substr($src,0,-6); return($src);} if (preg_match_all('/\.*?\<\/img\>/i',$text,$page)){ foreach($page as $value) $src = substr($value<0>,26); $src = substr($src,0,-6); return($src);}}//Messages.tem.php Picfunction pic_show($topic,$w,$h){ global $db_prefix, $scripturl, $smcFunc, $settings, $txt; $request = $smcFunc['db_query'>('', ' SELECT t.id_topic,m.body,m.subject,m.id_msg FROM {db_prefix}messages m,{db_prefix}topics t WHERE t.id_first_msg=m.id_msg AND t.id_topic='.$topic.' LIMIT 1', array( ) ); $posts = array(); $url_board = $scripturl."?board=".$board; while ($row = $smcFunc['db_fetch_assoc'>($request)) { $topic = $scripturl."?topic=".$row['id_topic'>; $srcIMG = findIMG($row['body'>); $subject = $row['subject'>; echo'<div>'; echo'<a href="'.$topic.'" target="_blank"><img alt="" class="img_fade" '; if(!empty($srcIMG)) echo 'src="'.$srcIMG.'" '; else echo'src="', $settings['images_url'>, '/no_image.png" '; echo'width="'.$w.'" height="'.$h.'" > '; echo'<>'; } $smcFunc['db_free_result'>($request);}
<img src="', $topic['first_post'>['icon_url'>, '" alt="" />
'; pic_show($topic['id'>,80,80);echo'
โปรดรอ
cymiz.com insurance