*/ /* last modified: 2001.10.08 */ /**********************************************/ /** * Path for Banner Ads */ function banner_display () { // import banner paths from config $banner_path_468x60 = BASE."banner/468x60/"; $banner_path_xml = BASE."banner/xml/"; // opening html $banner = ""; $banner .= "\n\n".''."\n"; $banner .= "
\n"; // read dir and get list of banners $ads = array(); $d = opendir($banner_path_468x60); while($entry = readdir($d)) { if(!ereg("(.+)\\.gif$", $entry, $arr)) continue; //" array_push($ads, $arr[1]); } closedir($d); // randomly select a banner and display it $img = $ads[(rand(1,count($ads))-1)]; $url = get_xml_tag($banner_path_xml.$img.'.xml','url'); $alt = get_xml_tag($banner_path_xml.$img.'.xml','alt'); // da banner $banner .= ''; $banner .= ''.$alt.''; $banner .= ''."\n"; // closing html $banner .= '
'."\n"; $banner .= ''."\n\n"; return $banner; } ?>