'."\n"; $output .= ''."\n"; $output .= ''."\n"; $output .= ''."\n"; $output .= ' The Wallpapers - Latest Wallpapers'."\n"; $output .= ' http://www.TheWallpapers.org/'."\n"; $output .= ' Latest Wallpapers Categories at theWallpapers'."\n"; $output .= ' Latest Wallpapers'."\n"; $output .= ' Copyright 2003-2009 www.TheWallpapers.org'."\n"; $output .= ' info@thewallpapers.org'."\n"; $output .= ' '.$datum.''."\n"; $output .= ' info@thewallpapers.org'."\n"; $output .= ' '."\n"; $output .= ' TheWallpapers'."\n"; $output .= ' http://www.TheWallpapers.org/gfx/rss_tiny.gif'."\n"; $output .= ' 2278'."\n"; $output .= ' http://www.TheWallpapers.org'."\n"; $output .= ' '."\n"; $t = getDate(); if($t['mon']<10) $t['mon'] = "0".$t['mon']; if($t['mday']<10) $t['mday'] = "0".$t['mday']; $today = $t['year']."-".$t['mon']."-".$t['mday']; $query = "SELECT wallpapers.*,categories.*, wallpapers.id AS id, wallpapers.description AS picture_description, wallpapers.name AS name, wallpapers.picture_name AS picture_name, categories.name AS cname FROM wallpapers INNER JOIN categories ON (wallpapers.category=categories.id) WHERE active=1 ORDER BY datum DESC LIMIT 50"; $res = mysql_query($query) or die("ERROR ".__LINE__.": ".mysql_error()); while($ar = mysql_fetch_array($res)) { if(empty($ar[picture_name])) { $ar[picture_name] = eregi_replace("_"," ",$ar[name]); $ar[picture_name] = eregi_replace("-"," ",$ar[picture_name]); $ar[picture_name] = eregi_replace(".jpg","",$ar[picture_name]); $ar[picture_name] = ucwords($ar[picture_name]); } $desc = $ar[description]; if(!empty($ar[picture_description])) $desc = $ar[picture_description]; $nid = (int)($ar[id]/100); $output .= ''."\n"; $output .= ' '.$ar[picture_name].' Wallpaper'."\n"; $output .= ' '.$datum.''."\n"; $output .= ' http://www.thewallpapers.org/desktop/'.$ar[id].'/'.fixName($ar[cname]).''."\n"; $output .= ' '."\n"; $output .= ' '."\n"; $output .= ''."\n"; } $output .= ''."\n"; $output .= ''."\n"; echo $output; function makeRSS_LatestCategories() { $datum = date('D, d M Y h:m:s O')."\n"; unset($output); $output .= ''."\n"; $output .= ''."\n"; $output .= ''."\n"; $output .= ''."\n"; $output .= ' theWallpapers - Latest Wallpapers'."\n"; $output .= ' http://www.theWallpapers.org/'."\n"; $output .= ' Latest Wallpapers Categories at theWallpapers'."\n"; $output .= ' Latest Wallpapers'."\n"; $output .= ' Copyright 2003-2008 www.theWallpapers.org'."\n"; $output .= ' info@skinbase.org'."\n"; $output .= ' '.$datum.''."\n"; $output .= ' info@thewallpapers.org'."\n"; $output .= ' '."\n"; $output .= ' theWallpapers'."\n"; $output .= ' http://www.theWallpapers.org/gfx/rss_tiny.gif'."\n"; $output .= ' 2278'."\n"; $output .= ' http://www.theWallpapers.org'."\n"; $output .= ' '."\n"; $res = mysql_query("SELECT * FROM categories ORDER BY id DESC LIMIT 10") or die("ERROR ".__LINE__.": ".mysql_error()); while($ar = mysql_fetch_array($res)) { $res2 = mysql_query("SELECT * FROM wallpapers WHERE category='".$ar[id]."' ORDER BY RAND() LIMIT 1") or die("ERROR ".__LINE__.": ".mysql_error()); $ar2 = mysql_fetch_array($res2); $nid = (int)($ar[id]/100); $output .= ''."\n"; $output .= ' '.$ar[name].' Wallpapers'."\n"; $output .= ' '.$datum.''."\n"; $output .= ' http://www.thewallpapers.org/'.$ar[page].''."\n"; $output .= ' '."\n"; $output .= ' '."\n"; $output .= ''."\n"; } $output .= ''."\n"; $output .= ''."\n"; $fp = fopen($GLOBALS['path']."/rss/new_wallpapers.rss","w+"); fwrite($fp, $output); fclose($fp); } ?>