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

PHP Kodu:
/** 
 * 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; 
    }
bu gamefunctions.php dosyasının bir kısmı yeni konularla alakalı olduğunu düşündüm sadece bu kısmını koydum ayrıca birde block.php var konuların yerleşimi ile ilgili heralde oda burda ;

<?PHP
/**
 * /includes/block.php
 * 
 * This is the central file that spits out the games.  It's an old file from the Arcadem 1.x branch that has only had minor feature upgrades.  Unfortunately, there are many issues with this file, including hard coded HTML tags which need to be removed.  In all likely hood, this file will be completely replaced in Arcadem 3.0.
 * @package /includes/block.php
 * @author Agares Media <sales@agaresmedia.com>
 * @copyright Copyright (c) 2007, Agares Media.  All rights reserved.
 * @todo ARCADEM 3.0 This file will be completely rewritten from scratch to remove DIVs, and other hard coded HTML.
 */
 require_once('./register_globals.php');
$cat = am_injection($_GET['cat']);  // Pull the prodid from the last page.

if ($cat== NULL && file_exists('.'.$themepath.'home.php')) { // This is new in Arcadem Pro 2.5.  If using a compatible 2.5 theme, if there is a file called home.php in the theme's directory, it will be the home page.
	include('.'.$themepath.'home.php');
	$loadedhome = true;
} else { // This code only executes if not on home.php :

// how many rows to show per page
$rowsPerPage = $config_gamesPerPage;
$numrows = am_numgssgames($db, $cat, NULL);
$wnum = 0;

// by default we show first page
$blockpage = 1;

// if $_GET['page'] defined, use it as page number
if(isset($_GET['blockpage'])) {$blockpage = am_injection($_GET['blockpage']);}
$offset = ($blockpage -1) * $rowsPerPage;


if ($blockpage == NULL) {$blockpage = 1;}
	$firstgame = ($blockpage * $config_gamesPerPage) - $config_gamesPerPage;
	$lastgame = ($blockpage * $config_gamesPerPage);
	$numgames = $lastgame - $firstgame;
	if ($numrows != NULL) {
		$res = am_getgssgames($db, $firstgame, $lastgame, $cat);
	}


$maxPage = ceil($numrows/$rowsPerPage);
$self = $_SERVER['PHP_SELF'];	
	
// ------------------------------------
// BEGIN THE TABLE CREATION PROCESS	
echo '<div class="block">';
$icounter = 0;

	$rplce = array("!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "~", "`", "=", "+", "\\", "'", "\"", "|", ":", ";", "?", ".", ",", "/", "[", "{", "]", "}");

if ($config_GamesQuickDetailed == 'Quick') {$detaildisp = 'tip';} else {$detaildisp = 'detail';}
	
while($icounter < $numgames) {
	if ($res[$icounter][0] != NULL) {
		$wwidth = $res[$icounter][4];
		$wheight = ($res[$icounter][5]+25);
		if ($wwidth < 26) {$wwidth = 640;}
		if ($wheight < 26) {$wheight = 480;}
			echo '
			<div id="t'.$icounter.'" class="'.$detaildisp.'">
			<img src="./arcade/img/' . $res[$icounter][13] . '" alt=" "> <br />
			<b>Oyun adı:</b> '.$res[$icounter][1].'<br />
			<div style="z-index:99;"><b>Açıklama: </b>'.$res[$icounter][2].' </div><br />
			<b>Kategori:</b> '.$res[$icounter][7].' <br />
			<b>Bu oyun kaç defa oynanmış:</b> '.$res[$icounter][8].' <br /><p />
			</div>';
		

		if ($config_GamesQuickDetailed == 'Quick') {
			if ($config_useGamePages == '0') { // -- If GamePages & SEO Friendly URLs are off in Quick mode, use this:
				echo '<div id="blockdiv"><img src=".'.$themepath.'images/spacer01.gif" class="spacer" onmouseout="popUp(event,\'t'.$icounter.'\')" onmouseover="popUp(event,\'t'.$icounter.'\')"  onclick="return false"><h4>' . substr($res[$icounter][1], 0, 14) . '</h4><br /><a href=".'.$themepath.'playgame.php?getgame='.$res[$icounter][0].'&keepThis=true&TB_iframe=true&height=' . $wheight . '&width=' . $wwidth . '" title="' . $res[$icounter][1] . '" class="thickbox"><img src=".'.$themepath.'images/playnow.jpg"></a><br /><img src="./arcade/img/' . $res[$icounter][13] . '" onmouseout="popUp(event,\'t'.$icounter.'\')" onmouseover="popUp(event,\'t'.$icounter.'\')"  onclick="return false"><br /></div>';		
			} else {
				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]))))  ;
					echo '<div id="blockdiv"><img src=".'.$themepath.'images/spacer01.gif" class="spacer" onmouseout="popUp(event,\'t'.$icounter.'\')" onmouseover="popUp(event,\'t'.$icounter.'\')"  onclick="return false"><h4>' . substr($res[$icounter][1], 0, 14) . '</h4><br /><a href="'.$res[$icounter][0].'-'.$newpageurl.'.html" title="' . $res[$icounter][1] . '"><img src=".'.$themepath.'images/playnow.jpg"></a><br /><img src="./arcade/img/' . $res[$icounter][6] . '.png" onmouseout="popUp(event,\'t'.$icounter.'\')" onmouseover="popUp(event,\'t'.$icounter.'\')"  onclick="return false"><br /></div>';		
				} else { // --- If GamePages are on, SEO titles are off, in Quick mode, use this:
					echo '<div id="blockdiv"><img src=".'.$themepath.'images/spacer01.gif" class="spacer" onmouseout="popUp(event,\'t'.$icounter.'\')" onmouseover="popUp(event,\'t'.$icounter.'\')"  onclick="return false"><h4>' . substr($res[$icounter][1], 0, 14) . '</h4><br /><a href="flash-arcade-game.php?gameid='.$res[$icounter][0].'&gamename='.$res[$icounter][1].'" title="' . $res[$icounter][1] . '"><img src=".'.$themepath.'images/playnow.jpg"></a><br /><img src="./arcade/img/' . $res[$icounter][13] . '" onmouseout="popUp(event,\'t'.$icounter.'\')" onmouseover="popUp(event,\'t'.$icounter.'\')"  onclick="return false"><br /></div>';		
				}
			}
		} else {
			if ($config_useGamePages == '0') { // -- If GamePages & SEO Friendly URLs are off in Detailed mode, use this:
					echo '<div class="playnow"><a href=".'.$themepath.'playgame.php?getgame='.$res[$icounter][0].'&keepThis=true&TB_iframe=true&height=' . $wheight . '&width=' . $wwidth . '" title="' . $res[$icounter][1] . '" class="thickbox"><img src=".'.$themepath.'images/playnow.gif" alt="playnow"></a></div>';
			} else {
				if ($SEOFriendlyURLs == '1') { // -- If SEO Friendly titles & GamePages are on in Detailed mode use this:
					$newpageurl = str_replace(" ", "-", strip_tags(trim(str_replace($rplce, "", $res[$icounter][1]))))  ;
					echo '<div class="playnow"><a href="'.$res[$icounter][0].'-'.$newpageurl.'.html" title="' . $res[$icounter][1] . '"><img src=".'.$themepath.'images/playnow.gif" alt="playnow"></a></div>';
				} else { // --- If GamePages are on, SEO titles are off, in Detailed mode, use this:
					echo '<div class="playnow"><a href="flash-arcade-game.php?gameid='.$res[$icounter][0].'&gamename='.$res[$icounter][1].'" title="' . $res[$icounter][1] . '"><img src=".'.$themepath.'images/playnow.gif" alt="playnow"></a></div>';
				}
			}	
		}
		
		
	}
		$icounter++;
	}
echo '</div>';

// --------------------------------------
// Page navigation
echo '<div class="bottomnav">';
if ($blockpage > 1) {
	$page  = $blockpage - 1;
	$prev  = " <a href=\"$self?blockpage=$page&cat=$cat\"><</a> ";
	$first = " <a href=\"$self?blockpage=1&cat=$cat\">«</a> ";
} else {
	$prev  = '&nbsp;'; // we're on page one, don't print previous link
	$first = '&nbsp;'; // nor the first page link
}

if ($blockpage < $maxPage) {
	$page = $blockpage + 1;
	$next = " <a href=\"$self?blockpage=$page&cat=$cat\">></a> ";
	$last = " <a href=\"$self?blockpage=$maxPage&cat=$cat\">»</a> ";
} else {
	$next = '&nbsp;'; // we're on the last page, don't print next link
	$last = '&nbsp;'; // nor the last page link
}

// print the navigation link
echo $first . $prev . " Şuanda $blockpage. sayfadasın, Toplam $maxPage sayfa var. (Yeni Oyunlar Son Sayfada) " . $next . $last ;

$tempmax = $maxPage + 1;
echo '<form name="sect" action="index.php" method="get">';
echo '<select name="blockpage" onChange="window.location=document.sect.blockpage.options[document.sect.blockpage.selectedIndex].value">';
	for ($counter=1; $counter<$tempmax; $counter++) {
		if ($blockpage != $counter) {
			echo '<option value="./index.php?blockpage='.$counter.'&cat='.$cat.'">'.$counter.'</option>';
		} else {
			echo '<option value="./index.php?blockpage='.$counter.'&cat='.$cat.'" selected>'.$counter.'</option>';
		}
	}
echo '</select><input type="hidden" value="'.$cat.'" /></form>';
echo '</div></div>';
}
?>

<center>
<script type="text/javascript"><!--
google_ad_client = "pub-4242876161481475";
/* 468x60, oluşturulma 21.05.2010 */
google_ad_slot = "4353186335";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>