• 28-05-2010, 12:43:20
    #10
    erdemmin adlı üyeden alıntı: mesajı görüntüle
    bunda sql ile ilgili bir işlem yokki orta sayfa hangisi siteyi acınca index 'in ortasında acılan sayfa hangisi onun phpsini gonderebilirmisin ?
    kardeş hangi dosyayı istediğini anlamadım ama siteye /index.php olarak girince ana sayfa açılıyor alttan sayfalara geçiş yapıncada açılan 1. sayfa http://www.bebekizoyunlari.com/index...ockpage=1&cat= bu bunun koduda aşağıda mevcut block.php
  • 28-05-2010, 13:36:41
    #11
    index.php de
    <a class="feed-button" href="./rss.php">&nbsp;</a>		</div>
    ile
    <div class="adside">
    arasını burda yayınlarsan daha iyi olur
  • 28-05-2010, 13:53:40
    #12
    sorun çözülmüştür scripte gerek kalmadı
  • 28-05-2010, 17:45:17
    #13
    gamefunctions.php tamamı arkadaşlar bunun içerisinde olabilirmi?

    <?PHP
    // 
    
    /**
     * am_numArcademGames
     *
     * Counts the number of games installed
     * @param object $db The open database connection which is created by /includes/dbconnect.php
     * @param string $cat A category.
     * @param unknown_type $forgot Depreciated aspect of this function
     * @return int $numgssgames Returns an integer value of the number of games total, or when $cat is specified, the number of games in a specific category
     */
    	function am_numArcademGames($db = NULL, $cat = NULL, $forgot=NULL) {
    		global $db;
    		if ($cat == NULL) {
    			$sql = "SELECT * FROM `AMCMS_games`;";
    		} else {
    			$sql = "SELECT * FROM `AMCMS_games` WHERE `category`='$cat';";
    		}
    		$numArcademGames = am_countrecords($db, $sql);
    		return $numArcademGames;
    	}
    	
    
    /**
     * am_getArcademGames
     *
     * Grabs the specified number of games.
     * @param object $db The open database connection which is created by /includes/dbconnect.php
     * @param int $firstgame The first game in the result set to retrieve.
     * @param int $lastgame The last game in the result set to retrieve.  Every game between the $firstgame and the $lastgame is returned as well.
     * @param string $cat A category.
     * @return array $res returns an array 
     */
    	function am_getArcademGames($db, $firstgame, $lastgame, $cat = NULL) {
    		$numgames = $lastgame - $firstgame;
    		if ($cat == NULL) {
    			$sql = "SELECT * FROM `AMCMS_games` LIMIT $firstgame, $lastgame;";
    		} else {
    			$sql = "SELECT * FROM `AMCMS_games` WHERE `category`='$cat' LIMIT $firstgame, $lastgame;";
    		}
    		$res = am_queries($db, $sql);
    		return $res;
    	}		
    	
    
    	
    /**
     * am_playArcademGame
     *
     * Grabs a specific game
     * @param object $db The open database connection which is created by /includes/dbconnect.php
     * @param int $id The primary key (id) of the game to return the result set for.
     * @return array $res returns all details of one specific game.
     */
    	function am_playArcademGame($db, $id) {
    		$sql = "SELECT * FROM `AMCMS_games` WHERE `primkey`='$id';";
    		$res = am_queries($db, $sql);
    		return $res;
    	}	
    	
    
    /**
     * am_numArcademGameCat
     *
     * Return the number of games per category, or if $cat is specified, the number of games in one specific category.
     * @param object $db The open database connection which is created by /includes/dbconnect.php
     * @param string $cat A category.
     * @return int $numgsscats returns the number
     */
    	function am_numArcademGameCat($db = NULL, $cat = NULL) {
    		global $db;
    		if ($cat == NULL) {
    			$sql = "SELECT COUNT( * ) AS `Rows` , `category` FROM `AMCMS_games` GROUP BY `category` ORDER BY `category`;";
    		} else {
    			$sql = "SELECT COUNT( * ) AS `Rows` , `category` FROM `AMCMS_games` WHERE `category`=`$cat` GROUP BY `category` ORDER BY `category`;";
    		}
    		$numArcademGameCat = am_countrecords($db, $sql);
    		return $numArcademGameCat;
    	}
    
    /**
     * am_getArcademGameCat
     *
     * Return the games per category
     * @param object $db The open database connection which is created by /includes/dbconnect.php
     * @param string $cat A category.
     * @return unknown
     * @depreciated Use am_numgssgamecat instead
     */
    	function am_getArcademGameCat($db, $cat) {
    		$sql = "SELECT COUNT( * ) AS `Rows` , `category` FROM `AMCMS_games` GROUP BY `category` ORDER BY `category`;";
    		$res = am_queries($db, $sql);
    		return $res;
    	}	
    	
    /**
     * am_listgamecats
     *
     * List the game categories in an unordered list (no UL tag inside of this function)
     * @param object $db The open database connection which is created by /includes/dbconnect.php
     * @param string $wholelinked If this value is set to 'linkall', then the entire list is within the <a> tag.  If the value is 'none' then the number of games per category is not listed
     * @param string $list if list is not specified, then it is assumed that the returned format is with a list.  If set to 'bracket', then each category is seperated by a bracket and is displayed horizontally.  If set to 'flat' then it returns an array with each category's name.
     * @return array $retvalue Returns an array of category names, where each category is assigned to one interation of the array.  Only returns this value if 'flat' is specified for $list.
     */	
    	function am_listgamecats($db = NULL, $wholelinked = NULL, $list = NULL) {
    		global $db;
    		$icounter = 0;
    		$numcats = am_numArcademGameCat($db, NULL);
    		$res = am_getArcademGameCat($db, NULL);
    		if ($wholelinked == 'linkall') {$first = ''; $second= '</a>';} else {$first = '</a>'; $second= '';}
    		if ($list == 'bracket') {echo '[ ';$bracket = ' | ';}
    		while ($icounter < $numcats) {
    			if ($wholelinked!='none') {$numgamecat = ' ('.$res[$icounter][0].')';}
    			if ($list == NULL && $list != 'flat') {
    				echo '<li><a href="index.php?cat='.$res[$icounter][1] ,'">',$res[$icounter][1] , $first,$numgamecat,$second,'</li>';
    			} elseif ($list != 'bracket' && $list != 'flat') {
    				echo '<a href="index.php?cat=',$res[$icounter][1] ,'">',$res[$icounter][1] , $first,$numgamecat,$second;
    			} elseif ($list == 'bracket' && $list != 'flat') {
    				echo '<a href="index.php?cat=',$res[$icounter][1] ,'">',$res[$icounter][1] , $first,$numgamecat,$second,$bracket;
    			} 
    			if ($list == 'flat') {
    				$retvalue[$icounter] = $res[$icounter][1];
    			}
    			++$icounter;
    			if ($icounter == $numcats-1) {$bracket = ' ]';} else {$bracket = ' | ';}
    		}
    			if ($list == 'flat') {
    				return $retvalue;
    			}
    	}
    
    
    	
    /**
     * am_topgames
     *
     * Return the most played games in array.  No formatting is done.
     * @param object $db The open database connection which is created by /includes/dbconnect.php
     * @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 array $res Returns an array of the top games
     */
    	function am_topgames($db = NULL, $number = NULL, $cat=NULL) {
    		global $db;
    		if ($number == NULL || !is_numeric($number)){$number=10;}
    		if ($cat==NULL) {
    			$sql = "SELECT `primkey`, `gamename`, `totalplays`, `imagesmall` FROM `AMCMS_games` ORDER BY `totalplays` DESC LIMIT 0, $number;";
    		} else {
    			$sql = "SELECT `primkey`, `gamename`, `totalplays`, `imagesmall` FROM `AMCMS_games` WHERE `category`='$cat' ORDER BY `totalplays` DESC LIMIT 0, $number;";		
    		}
    		$res = am_queries($db, $sql);
    		return $res;
    	}	
    
    /**
     * am_listtopgames
     *
     * Return the most played games in either line break (flat) or in an unordered list (list)
     * @param string $format accepted values are 'list', 'flat', or 'image', 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_listtopgames($format = NULL, $number = NULL, $cat=NULL) {
    		global $SEOFriendlyURLs;
    		$icounter = 0;
    		if ($format == 'flat' || $format == NULL) {
    			$start = NULL;
    			$final = '<p />';
    		} elseif($format == 'list') {
    			$start = '<li>';
    			$final = '</li>';
    			echo '<ul>';
    		}
    		$rplce = array("!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "~", "`", "=", "+", "\\", "'", "\"", "|", ":", ";", "?", ".", ",", "/", "[", "{", "]", "}");		
    		if ($number == NULL || !is_numeric($number)){$number=10;}
    		$res = am_topgames($db, $number, $cat);
    		foreach ($res as $resCounter) {
    			if ($resCounter[0]!=NULL) {
    				if ($SEOFriendlyURLs == '1') { // -- If SEO Friendly titles & GamePages are on in Quick mode use this:
    					$newpageurl = str_replace(" ", "-", strip_tags(trim(str_replace($rplce, "", $resCounter[1]))))  ;
    					if ($format=='image') {
    						echo '<a href="',$resCounter[0],'-',$newpageurl,'.html"><img src="./arcade/img/',$resCounter[3],'" /></a>';
    					} else {
    						echo $start,'<a href="',$resCounter[0],'-',$newpageurl,'.html">',$resCounter[1],'</a>',$final;
    					}					
    				} else { // --- If GamePages are on, SEO titles are off, in Quick mode, use this:
    					if ($format=='image') {
    						echo '<a href="flash-arcade-game.php?gameid=',$resCounter[0],'&gamename=',$resCounter[1],'" title="' , $resCounter[1] , '"><img src="./arcade/img/',$resCounter[3],'" /></a>';			
    					} else {
    						echo $start,'<a href="flash-arcade-game.php?gameid=',$resCounter[0],'&gamename=',$resCounter[1],'" title="' , $resCounter[1] , '">',$resCounter[1],'</a>',$final;
    					}
    				}
    			}
    		}
    		if($format == 'list') {
    			echo '</ul>';
    		}
    	}
    
    
    /**
     * 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;
    	}
    	
    
    /**
     * am_social
     *
     * Outputs social bookmarking links
     * @param string $gettitle The title of the page that you want passed on to the social bookmarking sites
     * @param string $format accepted values are 'list', 'flat', or 'none' default is flat.   List outputs everything in <li> tags, while flat uses <p />
     * @param string $typeinfo accepted values are 'image', 'text', or 'both'.  When set to image, only the icon of the service is outputed, text is only the text of the service.  Both displays both text and image.
     */	
    	function am_social($gettitle, $format=NULL, $typeinfo=NULL) {
    		global $sitetitle;
    		if ($gettitle ==NULL) {$gettitle = $sitetitle;} // If it's not a game page use the site title
    		if ($typeinfo==NULL) {$typeinfo='both';} 
    		if ($format == 'flat' || $format == NULL) {
    			$start = NULL;
    			$final = '<p />';
    		} elseif($format == 'list') {
    			$start = '<li>';
    			$final = '</li>';
    			echo '<ul>';
    		} elseif($format == 'none') {
    			$start = NULL;
    			$final = NULL;		
    		}
    		echo $start,'<a href="http://digg.com/submit?phase=2&url=http://' , $_SERVER['HTTP_HOST'] , urlencode($_SERVER['REQUEST_URI']) ,'" rel="nofollow" target="_blank">'; if($typeinfo=='image'|| $typeinfo=='both'){echo'<img src="./includes/images/digg.gif" alt="">';};if ($typeinfo=='text' || $typeinfo=='both') { echo 'Digg';}; echo '</a>',$final;
    		echo $start,'<a href="http://del.icio.us/post?v=2&url=http://' , $_SERVER['HTTP_HOST'] , urlencode($_SERVER['REQUEST_URI']) ,'" title="Post to del.icio.us" rel="nofollow" target="_blank">'; if($typeinfo=='image'|| $typeinfo=='both'){echo'<img src="./includes/images/delicious.gif" alt="">';};if ($typeinfo=='text' || $typeinfo=='both') { echo 'del.icio.us';};echo '</a>',$final;
    		echo $start,'<a href="http://www.stumbleupon.com/submit?url=http://' , $_SERVER['HTTP_HOST'] , urlencode($_SERVER['REQUEST_URI']) ,'&title=', urlencode($gettitle),'" rel="nofollow" target="_blank">'; if($typeinfo=='image'|| $typeinfo=='both'){echo'<img src="./includes/images/stumbleupon.gif" alt="">';};if ($typeinfo=='text' || $typeinfo=='both') { echo 'StumbleUpon';};echo '</a>',$final;
    		echo $start,'<a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://' , $_SERVER['HTTP_HOST'] , urlencode($_SERVER['REQUEST_URI']) ,'&t=', urlencode($gettitle),'" rel="nofollow" target="_blank">'; if($typeinfo=='image'|| $typeinfo=='both'){echo'<img src="./includes/images/yahoomyweb.gif" alt="">';};if ($typeinfo=='text' || $typeinfo=='both') { echo 'Yahoo! My Web';};echo '</a>',$final;
    		echo $start,'<a href="http://www.furl.net/storeIt.jsp?t=', urlencode($gettitle),'&u=http://' , $_SERVER['HTTP_HOST'] , urlencode($_SERVER['REQUEST_URI']) ,'" rel="nofollow" target="_blank">'; if($typeinfo=='image'|| $typeinfo=='both'){echo'<img src="./includes/images/furl.gif" alt="">';};if ($typeinfo=='text' || $typeinfo=='both') { echo 'Furl';};echo '</a>',$final;
    		echo $start,'<a href="http://www.google.com/bookmarks/mark?op=edit&bkmk=http://' , $_SERVER['HTTP_HOST'] , urlencode($_SERVER['REQUEST_URI']) ,'&title=', urlencode($gettitle),'" rel="nofollow" target="_blank">'; if($typeinfo=='image'|| $typeinfo=='both'){echo'<img src="./includes/images/googlebookmarks.gif" alt="">';};if ($typeinfo=='text' || $typeinfo=='both') { echo 'Google Bookmarks';};echo '</a>',$final;
    		echo $start,'<a href="https://favorites.live.com/quickadd.aspx?url=http://' , $_SERVER['HTTP_HOST'] , urlencode($_SERVER['REQUEST_URI']) ,'&title=', urlencode($gettitle),'" rel="nofollow" target="_blank">'; if($typeinfo=='image'|| $typeinfo=='both'){echo'<img src="./includes/images/windowslive.gif" alt="">';};if ($typeinfo=='text' || $typeinfo=='both') { echo 'Windows Live';};echo '</a>',$final;
    		echo $start,'<a href="http://www.facebook.com/sharer.php?u=http://' , $_SERVER['HTTP_HOST'] , urlencode($_SERVER['REQUEST_URI']) ,'&t=', urlencode($gettitle).'" rel="nofollow" target="_blank">'; if($typeinfo=='image'|| $typeinfo=='both'){echo'<img src="./includes/images/facebook.gif" alt="">';};if ($typeinfo=='text' || $typeinfo=='both') { echo 'Facebook';};echo '</a>',$final;
    		echo $start,'<a href="http://www.technorati.com/faves?add=http://' , $_SERVER['HTTP_HOST'] , urlencode($_SERVER['REQUEST_URI']) ,'" rel="nofollow" target="_blank">'; if($typeinfo=='image'|| $typeinfo=='both'){echo'<img src="./includes/images/technorati.gif" alt="">';};if ($typeinfo=='text' || $typeinfo=='both') { echo 'Technorati';};echo '</a>',$final;
    		echo $start,'<a href="http://www.squidoo.com/lensmaster/bookmark?[url]http://'[/url] , $_SERVER['HTTP_HOST'] , urlencode($_SERVER['REQUEST_URI']) ,'" rel="nofollow" target="_blank">'; if($typeinfo=='image'|| $typeinfo=='both'){echo'<img src="./includes/images/squidoo.gif" alt="">';};if ($typeinfo=='text' || $typeinfo=='both') { echo 'Squidoo';};echo '</a>',$final;
    		echo $start,'<a href="http://www.netscape.com/submit/?U=', urlencode($gettitle),'&T=http://' , $_SERVER['HTTP_HOST'] , urlencode($_SERVER['REQUEST_URI']) ,'" rel="nofollow" target="_blank">'; if($typeinfo=='image'|| $typeinfo=='both'){echo'<img src="./includes/images/netscape.gif" alt="">';};if ($typeinfo=='text' || $typeinfo=='both') { echo 'Netscape';};echo '</a>',$final;
    		echo $start,'<a href="http://blogmarks.net/my/new.php?mini=1&simple=1&url=http://' , $_SERVER['HTTP_HOST'] , urlencode($_SERVER['REQUEST_URI']) ,'&title=', urlencode($gettitle),'" rel="nofollow" target="_blank">'; if($typeinfo=='image'|| $typeinfo=='both'){echo'<img src="./includes/images/blogmarks.gif" alt="">';};if ($typeinfo=='text' || $typeinfo=='both') { echo 'Blogmarks';};echo '</a>',$final;
    		echo $start,'<a href="http://www.spurl.net/spurl.php?url=http://' , $_SERVER['HTTP_HOST'] , urlencode($_SERVER['REQUEST_URI']) ,'&title=', urlencode($gettitle),'" rel="nofollow" target="_blank">'; if($typeinfo=='image'|| $typeinfo=='both'){echo'<img src="./includes/images/spurl.gif" alt="">';};if ($typeinfo=='text' || $typeinfo=='both') { echo 'Spurl';};echo '</a>',$final;
    		if($format == 'list') {
    			echo '</ul>';
    		}		
    	}
    	
    
    /**
     * am_gamestats
     *
     * Outputs some basic stats suitable for the front end.  Only updates once per day per user to reduce load, but this can be a draw back because the stats will appear to be out of date.
     * @param object $db The open database connection which is created by /includes/dbconnect.php 
     */	
    	function am_gamestats($db=NULL) {
    		global $db;	
    			$res = am_queries($db, "SELECT SUM(`totalplays`) FROM `AMCMS_games`;", 3, 0);
    			$_SESSION['gamestats_playtotal'] = $res[0][0];
    			$_SESSION['gamestats_total'] = am_countrecords($db, "SELECT `primkey` FROM `AMCMS_games`;");
    			$_SESSION['numregister_users'] = am_countrecords($db, "SELECT `userkey` FROM `AMCMS_users`;");
    			$_SESSION['gamestats_cats'] = am_numgssgamecat();
    			$_SESSION['numarticles'] = am_countrecords($db, "SELECT * FROM `AMCMS_articles`;");
    			$_SESSION['numreviews'] = am_countrecords($db, "SELECT * FROM `AMCMS_reviews`;");
    	}
    	
    	
    // ---------------------------------
    // Old depreciated functions.  These are modified to work with 2.7, and are kept for backwards compatibility.
    	
    /**
     * am_numgssgames
     *
     * Depreciated.  Calls the new function instead.
     * @param object $db The open database connection which is created by /includes/dbconnect.php
     * @param string $cat A category.
     * @param unknown_type $forgot Depreciated aspect of this function
     * @return int $numgssgames Returns an integer value of the number of games total, or when $cat is specified, the number of games in a specific category
     */
    	function am_numgssgames($db = NULL, $cat = NULL, $forgot=NULL) {
    		return am_numArcademGames($db, $cat, $forgot);
    	}	
    	
    
    /**
     * am_getgssgames
     *
     * Depreciated.  Calls new function instead.
     * @param object $db The open database connection which is created by /includes/dbconnect.php
     * @param int $firstgame The first game in the result set to retrieve.
     * @param int $lastgame The last game in the result set to retrieve.  Every game between the $firstgame and the $lastgame is returned as well.
     * @param string $cat A category.
     * @return array $res returns an array 
     */
    	function am_getgssgames($db, $firstgame, $lastgame, $cat = NULL) {
    		return am_getArcademGames($db, $firstgame, $lastgame, $cat);
    	}		
    
    /**
     * am_playgame
     *
     * Depreciated.  Calls new function.
     * @param object $db The open database connection which is created by /includes/dbconnect.php
     * @param int $id The primary key (id) of the game to return the result set for.
     * @return array $res returns all details of one specific game.
     */
    	function am_playgame($db, $id) {
    		return am_playArcademGame($db, $id);
    	}
    	
    /**
     * am_numgssgamecat
     *
     * Depreciated.  Calls new function.
     * @param object $db The open database connection which is created by /includes/dbconnect.php
     * @param string $cat A category.
     * @return int $numgsscats returns the number
     */
    	function am_numgssgamecat($db = NULL, $cat = NULL) {
    		return am_numArcademGameCat($db, $cat);
    	}	
    
    /**
     * am_getgssgamecat
     *
     * Depreciated.  Calls new function.
     * @param object $db The open database connection which is created by /includes/dbconnect.php
     * @param string $cat A category.
     * @return unknown
     * @depreciated Use am_numgssgamecat instead
     */
    	function am_getgssgamecat($db, $cat) {
    		return am_getArcademGameCat($db, $cat);
    	}	
    	
    ?>
  • 28-05-2010, 18:00:14
    #14
    beyler birde phpmyadmin den baktım bu tabloya "AMCMS_games" oyunlar benim yüklediğim gibi yani linklerdeki 1-demo.html 2-demo.html şeklinde sıralamış
  • 28-05-2010, 18:37:41
    #15
    Üyeliği durduruldu
    yazdıklarını anlamadım halk diliyle derdini anlatırsan yardım edelim
  • 28-05-2010, 20:23:35
    #16
    park adlı üyeden alıntı: mesajı görüntüle
    yazdıklarını anlamadım halk diliyle derdini anlatırsan yardım edelim
    kardeşim ben hangi dilden konuşuyorum daha nasıl anlatayım böyle bir flash oyun sitem var eklediğim konular ilk sayfaya değilde son sayfaya ekleniyor benim istediğim ilk yani ana sayfaya eklensin öteleme sistemi ile kayıp devam etsin siteye girip inceleyince demek istediğimi daha iyi anlarsın
  • 28-05-2010, 22:34:04
    #17
    function am_numArcademGames($db = NULL, $cat = NULL, $forgot=NULL) { 
            global $db; 
            if ($cat == NULL) { 
                $sql = "SELECT * FROM `AMCMS_games` ORDER BY primkey DESC ;"; 
            } else { 
                $sql = "SELECT * FROM `AMCMS_games` WHERE `category`='$cat';"; 
            } 
            $numArcademGames = am_countrecords($db, $sql); 
            return $numArcademGames; 
        }
    Şöle bir dene bakalım olucakmı.


  • 28-05-2010, 22:37:15
    #18
     
    function am_getArcademGames($db, $firstgame, $lastgame, $cat = NULL) { 
            $numgames = $lastgame - $firstgame; 
            if ($cat == NULL) { 
                $sql = "SELECT * FROM `AMCMS_games` ORDER BY primkey DESC LIMIT $firstgame, $lastgame;"; 
            } else { 
                $sql = "SELECT * FROM `AMCMS_games` WHERE `category`='$cat' LIMIT $firstgame, $lastgame;"; 
            } 
            $res = am_queries($db, $sql); 
            return $res; 
        }
    İlk verdiğim olmazsa eski haline al birde yukardaki şekilde dene. Böle flood gibi oldu ama LIMIT koymuş kodda belkide budur.