<?php
define('SCR','mode');
require_once('global.php');
!defined('M_P') && Showmsg('undefined_action');

InitGP(array('q'));
if (strpos($q,'..')!==false) Showmsg('undefined_action');
empty($q) && $q = 'home';
if (CkInArray($pwServer['HTTP_HOST'],$db_modedomain)) {
	$baseUrl	= "mode.php";
	$basename	= "mode.php?";
} else {
	$baseUrl	= "mode.php?m=$m";
	$basename	= "mode.php?m=$m&";
}

if (file_exists(M_P."m_{$q}.php")) {
	if (file_exists(M_P.'require/core.php')) {
		require_once(M_P.'require/core.php');
	}
	require_once Pcv(M_P."m_{$q}.php");
} else {
	Showmsg('undefined_action');
}
?>