update
This commit is contained in:
61
Server/index.php
Normal file
61
Server/index.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?
|
||||
#echo $_SERVER["argv"][1];
|
||||
|
||||
//ini_set('default_charset','UTF-8');
|
||||
|
||||
#die();
|
||||
ini_set("display_errors" ,true);
|
||||
include('../core/core.php');
|
||||
|
||||
Core::Init(PageType::SERVER);
|
||||
|
||||
include("../Strona/routes.php");
|
||||
|
||||
|
||||
|
||||
if(isset($_SERVER["argv"][1])) {
|
||||
$action = $_SERVER["argv"][1];
|
||||
} else if (isset($_REQUEST['action'])) {
|
||||
$action = $_REQUEST['action'];
|
||||
} else {
|
||||
$action = "Index";
|
||||
}
|
||||
|
||||
if (isset($_SERVER['argv'][2])) {
|
||||
$controller = $_SERVER['argv'][2];
|
||||
} else if (isset($_REQUEST['controller'])) {
|
||||
$controller = $_REQUEST['controller'];
|
||||
} else {
|
||||
$controller = 'Server';
|
||||
}
|
||||
|
||||
$controller = ucfirst($controller."Controller");
|
||||
$action = ucfirst($action."Action");
|
||||
|
||||
|
||||
echo 'aaaa';
|
||||
|
||||
/**
|
||||
* Autoloader klas
|
||||
*
|
||||
* @param unknown_type $className
|
||||
*/
|
||||
function __autoload($className) {
|
||||
Core::LoadClass($className);
|
||||
}
|
||||
|
||||
include_once(Config::Get('PATH_MAIN') . 'controller' . DIRECTORY_SEPARATOR . $controller . '.php');
|
||||
|
||||
$cnt = new $controller();
|
||||
$cnt->GenerateModelAction(array());
|
||||
|
||||
//Core::LoadSmarty();
|
||||
|
||||
//$front = new FrontController();
|
||||
|
||||
//$front->Dispatch();
|
||||
|
||||
Core::Garbage();
|
||||
|
||||
//echo "CronScript";
|
||||
?>
|
||||
Reference in New Issue
Block a user