Location: PHPKode > scripts > phpGamesCenter > rgames/index.php
<?php

/**
* The index file of RGameScript Pro.
*
* @author Roosevelt Purification
* @package RGameScriptPro1.1
*/

/*===========================================================================*\
|| ######################################################################### ||
|| # RGameScript Pro Version 1.1
|| # --------------------------------------------------------------------- # ||
|| # Copyright ©2005-2006 Roosevelt Purification. All Rights Reserved.     # ||
|| # RGameScript Pro is a free software released under GNU/GPL License	   # ||
|| # Website URL: http://www.photoshopcity.com/                            # ||
|| ######################################################################### ||
\*===========================================================================*/

session_start();

error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);

/**
* Include the required PHP Class files
*
*/
require("rincludes/class_init.php");

$dir = "radmincp/";

if (file_exists("rinstall.php"))
{
	$roosevelt->CommonCss("radmincp/");
	DisplayMessage("Please remove the rinstall.php file from your server!!", 1, 0, 0, $dir);
	exit;
}

$id = $_GET['id'];

if ($roosevelt->Connection())
{
	$roosevelt->LoadSettings();
	
	if ($roosevelt->rsettings['SiteOn'] == 1)
	{
	
		if (session_is_registered("rgames_admin"))
		{
			$_SESSION['rgames_user'] = $_SESSION['rgames_admin'];
		}
		
		if (session_is_registered("rgames_user"))
		{
			$roosevelt->CheckPermission("USER");
		}
		
		switch ($id)
		{
			case 'ljg':
				$rgames->LoadJustGame($_GET['gid']);
				exit;
				break;
		}
		
		require("rskins/{$roosevelt->rsettings['SiteSkin']}/header.html");
		
		if (session_is_registered("rgames_user"))
		{
			switch ($id)
			{
				case 'cp':
					$roosevelt->ChangePassword("USER");
					break;
				case 'logout':
					$roosevelt->LogOut($dir);
					break;
			}
		}
		
		switch ($id)
		{
			case 'cats':
				$rgames->ShowGames();
				break;
			case 'play':
				$rgames->PlayGame();
				break;
			case 'login':
				$roosevelt->RGameLoginSystem();
				break;
				
			case 'welcome':
				$roosevelt->WelcomeUser();
				break;
				
			case 'register':
				$roosevelt->Register();
				break;
				
			case 'search':
				$rgames->GameSearch();
				break;
				
			default:
				$rgames->LatestGames(10);
				$rgames->TopGames(10);
				break;
		}
		
		$roosevelt->LoadSettings();
		require("rskins/{$roosevelt->rsettings['SiteSkin']}/footer.html");
		
	}
	else
	{
		echo "<div align='center'>{$roosevelt->rsettings['SiteOffMesg']}</div>";
	}
}

?>
Return current item: phpGamesCenter