<?php

/**
 * Football Manager for JohnCMS
 * Переключение режима работы
 * @author Screamer
 */

define('_IN_JOHNCMS', TRUE);
require '../incfiles/core.php';

$actions = array(
	'club',
	'get_club',
	'player',
	'mainpage',
	'users'
);
if (empty($act)) {
	$act = 'mainpage';
}
if (core::$user_id && in_array($act, $actions) && is_file('./includes/' . $act . '.php')) {
	$textl =  'Футбольный менеджер';
	$referer = !empty($_SERVER['HTTP_REFERER']) ? htmlspecialchars($_SERVER['HTTP_REFERER']) : '?';
	require './includes/' . $act . '.php';
} else {
	header('Location: ' . core::$system_set['homeurl'] . '/?err');
	exit;
}