<?php
#--------------------------------
# http://www.yourarcadescript.com
#       index.php
#		VERSION 2.4
#		CC BY-ND 3.0(http://creativecommons.org/licenses/by-nd/3.0/) Liscensed
#       
#--------------------------------
session_start();
if (isset($_SESSION['admin']) && $_SESSION['admin'] == "logged") {
	include ("../includes/db_functions.inc.php");
	include ("../includes/config.inc.php");
	if(!isset($_GET['act'])) $_GET['act'] = '';
	if ($_GET['act'] != "mochiall" && $_GET['act'] != "logout")	include ("header.php");
	switch($_GET['act']) {
		case 'manage_users':
			include ("manage_users.php");
			break;
		case 'managegames':
			include ("manage_game.php");
			break;
		case 'uploadgames':
			include ("add_game.php");
			break;
		case 'brokenfiles':
			include ("broken_files.php");
			break;
		case 'cache':
			include ("cache.php");
			break;
		case 'managemochi':
			include ("manage_mochigames.php");
			break;
		case 'managefgdfeed':
			include ("managefgdfeed.php");
			break;
		case 'managefogfeed':
			include ("managefogfeed.php");
			break;
		case 'manageplaytomic':
			include ("manageplaytomic.php");
			break;
		case 'mochifeed':
			include ("mochi_feed.php");
			break;
		case 'memberscomment':
			include ("manage_memberscomment.php");
			break;
		case 'newsblogcomments':
			include ("newsblogcomments.php");
			break;
		case 'newsblogfeed':
			include ("newsblogfeed.php");
			break;
		case 'mochiid':
			include ("id_mochigames.php");
			break;
		case 'mochiall':
			include ("mochi_all.php");
			break;
		case 'addmedia':
			include ("add_media.php");
			break;
		case 'addcode':
			include ("add_code.php");
			break;
		case 'categories':
			include ("manage_category.php");
			break;
		case 'sitemap':
			include ("sitemap.php");
			break;
		case 'rssfeed':
			include ("rssfeed.php");
			break;
		case 'links':
			include ("manage_links.php");
			break;
		case 'antispam':
			include ("antispam.php");
			break;
		case 'addads':
			include ("add_ads.php");
			break;
		case 'addlink':
			include ("add_link.php");
			break;
		case 'news':
			include ("add_news.php");
			break;
		case 'ads':
			include ("manage_ads.php");
			break;
		case 'comments':
			include ("manage_comment.php");
			break;
		case 'logout':
			include ("logout.php");
			break;
		case 'settings':
			include ("settings.php");
			break;
		case 'socialids':
			include ("socialids.php");
			break;
		case 'managedowngame':
			include ("manage_down_game.php");
			break;
		case 'adddownloadgame':
			include ("add_down_game.php");
			break;	
		default:
			include ("general.php");
			break;
	}	
	if ($_GET['act'] != "mochiall" && $_GET['act'] != "logout") include ("footer.php");
} else {
	include ("../includes/db_functions.inc.php");
	include ("../includes/config.inc.php");
	include ("login.php");
}
?>