$value){if(strtolower($value) == $_REQUEST['size']){$SIZE_FOUND = true; $SIZE_KEY = $id; break;}} if($SIZE_FOUND == false){header('Location:'.$GLOBALS['APP']['PATHS']['BASEURL'].''); exit();} $SIZE = $GLOBALS['APP']['WALLPAPERS'][$SIZE_KEY]; $TMP['META_TITLE'] = $SIZE." Wallpapers - Free ".$SIZE." wallpaper download"; $TMP['META_KEYWORDS'] = $SIZE." wallpapers, ".$SIZE.", download ".$SIZE." wallpaper, ".$SIZE." wallpaper"; $TMP['META_DESC'] = $SIZE." Wallpapers - Free ".$SIZE." wallpaper download"; $TMP['META_EXTENSION'] = ''; $TOKEN = strtolower($SIZE); $UPP = 5; if((int)$_REQUEST['s'] != 0){$_REQUEST['s'] = (int)$_REQUEST['s'] -1;} ?>

Wallpapers


fetch_assoc($sql -> query($cquery)); $total = $r['total']; unset($r); $query = "SELECT * FROM wallpapers as w, users as u WHERE w.wallpaper_sizes & ".sqlSafe((pow(2,$SIZE_KEY)))." != 0 AND w.wallpaper_owner = u.user_id ORDER BY w.wallpaper_id DESC LIMIT ".((int)$_REQUEST['s']*(int)$UPP).", ".(int)$UPP."; "; $wallpapers = new Listing($sql, $query); if($wallpapers){ foreach($wallpapers -> data as $id => $wp){ include('inc/templates/wallpaper_public.php'); } } $wallpapers -> __destruct(); include('ads_bottom.php'); // CREATE PAGINATION // ------------------------------------------------ if($total > ($UPP)){ echo '
    '; $pages = (int)($total/$UPP); if(($pages*$UPP) < $total){$pages++;} if((int)$_REQUEST['s'] != 0){ $top_limit_pages = (int)$_REQUEST['s']+8; $bottom_limit_pages = ((int)$_REQUEST['s'])-7; if($bottom_limit_pages < 0){ $top_limit_pages += abs($bottom_limit_pages); $bottom_limit_pages = 0; } } //else {$top_limit_pages = $pages; $bottom_limit_pages = 0;} else {$top_limit_pages = 16; $bottom_limit_pages = 0;} if($top_limit_pages > $pages){$top_limit_pages = $pages;}; for($i = $bottom_limit_pages; $i< $top_limit_pages; $i++){ if($i != (int)$_REQUEST['s']){ if($i == 0){echo '
  • '.($i+1).'
  • ';} else {echo '
  • '.($i+1).'
  • ';} } else { if($i == 0){echo '
  • '.($i+1).'
  • ';} else {echo '
  • '.($i+1).'
  • ';} } } echo '
'; } } catch(Exception $e){echo '
'.showError($e).'
';} ?>