1) $page_titlek .= ' | Page '.$page; $resolutions = $resolution; $headline = 'Wallpapers for resolution '.$resolutions; if($resolution == "320x240") { $resolution = "320x240"; $resolutions = "iPod"; $headline = 'iPod Wallpapers'; } if($resolution == "iPad") { $resolution = "1024x768"; $resolutions = "iPad"; $headline = 'iPad Wallpapers'; } $page_desc = "Collection of Desktop Wallpapers with ".$resolutions." pixels resolution."; $meta_description = "Free ".$resolutions." Desktop Wallpapers collection for your desktop"; $meta_keywords = $resolutions.", Wallpapers, Desktop, Vista, Windows, Mac, Apple, OS X"; require(ROOT . "/templates/header.inc.php"); // *** SETUP RESOLUTION ARRAY *** unset($in_res); if($resolution == "320x240") $in_res = "'320x240', '800x600', '1024x768', '1152x864', '1280x1024', '1600x1200', '1920x1440', '2560x1920'"; else if($resolution == "800x600") $in_res = "'800x600', '1024x768', '1152x864', '1280x1024', '1600x1200', '1920x1440', '2560x1920'"; else if($resolution == "1024x768") $in_res = "'1024x768','1152x864','1280x1024','1600x1200','1920x1440','2560x1920'"; else if($resolution == "1152x864") $in_res = "'1152x864','1280x1024','1600x1200','1920x1440','2560x1920'"; else if($resolution == "1280x1024") $in_res = "'1280x1024','1600x1200','1920x1440','2560x1920'"; else if($resolution == "1600x1200") $in_res = "'1600x1200','1920x1440','2560x1920'"; else if($resolution == "1920x1440") $in_res = "'1920x1440','2560x1920'"; else if($resolution == "2560x1920") $in_res = "'2560x1920'"; else if($resolution == "1280x800") $in_res = "'1280x800','1440x900','1680x1050','1920x1200','2560x1600'"; else if($resolution == "1440x900") $in_res = "''1440x900','1680x1050','1920x1200','2560x1600'"; else if($resolution == "1680x1050") $in_res = "'1680x1050','1920x1200','2560x1600'"; else if($resolution == "1920x1200") $in_res = "'1920x1200','2560x1600'"; else if($resolution == "2560x1600") $in_res = "'2560x1600'"; else if($resolution == "1920x1080") $in_res = "'1920x1080'"; else if($resolution == "1366x768") $in_res = "'1366x768','1920x1080'"; else if($resolution == "1280x720") $in_res = "'1280x720','1366x768','1920x1080'"; else if($resolution == "852x480") $in_res = "'852x480','1280x720','1366x768','1920x1080'"; if(empty($in_res)) { include("footer.php"); exit(); } $query = "SELECT COUNT(*) AS num FROM wallpapers WHERE resolution IN (".$in_res.")"; #echo $query . "
"; $resg = mysql_query($query) or die("ERROR ".__LINE__.": ".mysql_error()); $arg = mysql_fetch_array($resg); $num = $arg[num]; echo '
'; ShowBanner300x250_gallery_top(); echo ''; ShowBanner300x250(); echo '
'; //AddThisButton(); echo '

'.$headline.'

'."\n"; /***********************************/ /** **/ /** DISPLAY GALLERY OF WALLPAPERS **/ /** **/ /***********************************/ if(empty($page) || $page<1) $page = 1; $hits = 30; $x = 0; $zs = 0; $start = ($page-1)*$hits; $pixQuery = "SELECT wallpapers.*,categories.*, wallpapers.id AS id, wallpapers.name AS name, categories.name AS cname FROM wallpapers INNER JOIN categories ON (wallpapers.category=categories.id) WHERE wallpapers.active=1 AND wallpapers.adult=0 AND wallpapers.resolution IN (".$in_res.") ORDER BY datum DESC LIMIT ".$start.",".$hits; //echo "->".$pixQuery; $resg = mysql_query($pixQuery) or die("ERROR ".__LINE__.": ".mysql_error()); while($arg = mysql_fetch_array($resg)) { if(empty($arg[picture_name])) { $arg[picture_name] = preg_replace("/_/"," ",$arg[name]); $arg[picture_name] = preg_replace("/-/"," ",$arg[picture_name]); $arg[picture_name] = preg_replace("/\.jpg/i","",$arg[picture_name]); $arg[picture_name] = ucwords($arg[picture_name]); } if(empty($arg[picture_alt])) $arg[picture_alt] = $arg[picture_name]; if (!empty($arg[picture_alt])) { $pictureAlt = $arg[picture_alt]; } else { $pictureAlt = $arg[name].' Wallpaper'; } $x++; $filename = $arg[folder].'thumb/320_'.$arg[name]; $nid = (int)($arg[category]/100); $filename = '/wallpapers/'.$nid.'/'.$arg[category].'/thumb/200_'.$arg[name]; $filename_full = '/photo/'.$arg[id].'/'.$arg[name]; $webURL = ''; echo '
'; ### Tiny Navigation ### echo '
'; echo 'Zoom'; echo ''; echo 'View'; echo '
'; ### Display Wallpaper ### echo ''; echo ''.$pictureAlt.''; echo ''; ### Name of the wallpaper ### echo '
'; echo ''.$arg[picture_name].''; echo '
'; echo '
'; } if ($num>20) { echo '
'; $show = 38; ShowPages2($num,$page,$hits,$show); echo '
'; } ### Show Popular Tags echo '

'; echo '

Popular Tag Clouds

'; ShowPopularTagClouds(60); ShowTodayPopular(); require(ROOT . "/templates/footer.inc.php");