0) ){ $row = mysql_fetch_array($res); if ($row){ extract( $row ); if ($id){ viewBanner($id); } } } } function viewBanner($id){ global $siteurl,$att_path,$b_height,$b_width; if($b_width){ $imgstr = " width=$b_width"; } if($b_height){ $imgstr .= " height=$b_height"; } $query = "SELECT html, date FROM banners WHERE id = $id"; $result = @mysql_query($query) or die( $query."
".mysql_error() ); if($row = mysql_fetch_object($result) ){ // Increment the numImps field for this banner @mysql_query("UPDATE banners SET pos='A', numImps = numImps + 1 WHERE id = $id") or die( mysql_error() ); // Output the JavaScript and the images $handle=opendir($att_path); while (false!==($file = readdir($handle))) { if ($file != "." && $file != "..") { if( strstr($file , "xban".$id."_") ){ $furl = $siteurl."/script/".(str_replace("./","",$att_path))."/".$file; ?> document.write(''); document.write(''); document.write('');