x
= '".date("Y-m-d")."' AND enable = 1 AND image <> '' ORDER BY rand() LIMIT 0,".$showBanner; $query = sql_query($sql); if (sql_num_rows($query) > 0) { while ($rec = sql_fetch_array($query)) { $thisPath = $configWebsiteName.'uploads/banner/'.$rec['image']; if ( $rec['image'] <> '' ) { echo '
'; $counter++; $aSize = getimagesize($thisPath); $width = $configBannerWidth["$banner_group_id"]; $height = $configBannerHeight["$banner_group_id"]; $aSize[0] = ((int)$aSize[0] > $width)?$width:(int)$aSize[0]; $aSize[1] = ((int)$aSize[1] > $height)?$height:(int)$aSize[1]; $sideBannerHeight += ($aSize[1]+4); $aType = explode(".",$rec['image']); $stype = $aType[count($aType)-1]; if ($stype <> 'swf') { if ($rec['link'] == '') echo ''; else echo ''; } else { ?> 'swf') { echo '
'; } // end if ( $rec['image'] <> '' ) { } // end while } // end if (sql_num_rows($query) > 0) { for ($i=$counter; $i<$showBanner; $i++) { $sideBannerHeight += ($configBannerHeight["$banner_group_id"]+4); ?>