arkadaşlar yardımcı olurmusunuz burada hangi kodla oynarsak yeni eklediğim oyunlar son sayfa yerine ana sayfada görünür amacım yeni oyun eklediğimde 5.sayfaya değilde 1.sayfaya eklensin yani 1,2,3,4,5 yerine 5,4,3,2,1 olarak dizemek anlatabildimmi bilmiyorum site bu
www.bebekizoyunlari.com /**
* am_listnewgames
*
* Return the newest games in either line break (flat) or in an unordered list (list)
* @param string $format accepted values are 'list' or 'flat', default is flat.
* @param string $number The number of games to return. If not specified defaults to 10.
* @param string $cat The category you'd like the top games from (optional)
* @return unknown
*/
function am_listnewgames($format = NULL, $number = NULL, $cat=NULL, $echo=true) {
global $SEOFriendlyURLs;
global $db;
$icounter = 0;
if ($format == 'flat' || $format == NULL) {
$start = NULL;
$final = '<p />';
} elseif($format == 'list') {
$start = '<li>';
$final = '</li>';
$output .= '<ul>';
}
$rplce = array("!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "~", "`", "=", "+", "\\", "'", "\"", "|", ":", ";", "?", ".", ",", "/", "[", "{", "]", "}");
if ($number == NULL || !is_numeric($number)){$number=10;}
if ($cat==NULL) {
$sql = "SELECT `primkey`, `gamename`, `totalplays` FROM `AMCMS_games` ORDER BY `primkey` DESC LIMIT 0, $number;";
} else {
$sql = "SELECT `primkey`, `gamename`, `totalplays` FROM `AMCMS_games` WHERE `category`='$cat' ORDER BY `primkey` DESC LIMIT 0, $number;";
}
$res = am_queries($db, $sql);
while($icounter < $number) {
if ($SEOFriendlyURLs == '1') { // -- If SEO Friendly titles & GamePages are on in Quick mode use this:
$newpageurl = str_replace(" ", "-", strip_tags(trim(str_replace($rplce, "", $res[$icounter][1])))) ;
$output .= $start.'<a href="'.$res[$icounter][0].'-'.$newpageurl.'.html">'.$res[$icounter][1].'</a>'.$final;
} else { // --- If GamePages are on, SEO titles are off, in Quick mode, use this:
$output .= $start.'<a href="flash-arcade-game.php?gameid='.$res[$icounter][0].'&gamename='.$res[$icounter][1].'" title="' . $res[$icounter][1] . '">'.$res[$icounter][1].'</a>'.$final;
}
++$icounter;
}
if($format == 'list') {
$output .= '</ul>';
}
if ($echo==true) {echo $output;}
return $output;
}