diff --git a/.gitmodules b/.gitmodules index eecb835..bdc4572 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "system"] path = system url = git@mojotrollz.eu:system.git +[submodule "lib/system"] + path = lib/system + url = git@mojotrollz.eu:system.git diff --git a/api.php b/api.php index 79bc426..e464986 100644 --- a/api.php +++ b/api.php @@ -1,20 +1,13 @@ look there -echo \SYSTEM\API\api::run('\SYSTEM\API\verify', 'api_mojotrollz_beta',$json); +echo \SYSTEM\API\api::run('\SYSTEM\API\verify','api_mojotrollz_beta',array_merge($_POST,$_GET)); new \SYSTEM\LOG\COUNTER("API was called sucessfully."); \ No newline at end of file diff --git a/config.dist.php b/config.dist.php deleted file mode 100644 index 3543f8c..0000000 --- a/config.dist.php +++ /dev/null @@ -1,23 +0,0 @@ -mojotrollz, © WebCraft Media 2013'), - array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS, array('deDE', 'enUS')), - array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG, 'enUS'), - array(\SYSTEM\CONFIG\config_ids::SYS_CRON_LOG2SQLITE_PATH, '/home/web/webdir/mojotrollz/mojotrollz/files/log/')); \ No newline at end of file diff --git a/index.php b/index.php index c5a999f..92f0927 100644 --- a/index.php +++ b/index.php @@ -1,13 +1,13 @@ html(); +echo \SYSTEM\API\api::run('\SYSTEM\API\verify', 'page_mojotrollz', array_merge($_POST,$_GET), 1, false, true); new \SYSTEM\LOG\COUNTER("Page was called sucessfully."); \ No newline at end of file diff --git a/lib/system b/lib/system new file mode 160000 index 0000000..bb73e4d --- /dev/null +++ b/lib/system @@ -0,0 +1 @@ +Subproject commit bb73e4d8a5547ba56f433c65fb70f2cd765e1a06 diff --git a/mojotrollz/autoload.inc.php b/mojotrollz/autoload.inc similarity index 100% rename from mojotrollz/autoload.inc.php rename to mojotrollz/autoload.inc diff --git a/mojotrollz/page/default_page/default_page.php b/mojotrollz/page/default_page/default_page.php index 76e6913..f8457b7 100644 --- a/mojotrollz/page/default_page/default_page.php +++ b/mojotrollz/page/default_page/default_page.php @@ -17,16 +17,17 @@ class default_page extends SYSTEM\PAGE\Page { return ''. '';} - public function html(){ - $vars = array(); - $vars['js'] = $this->js(); + public function html($_escaped_fragment_ = NULL){ + $vars = array(); + $vars['js'] = ''; + if(!$_escaped_fragment_){ + $vars['js'] = $this->js();} $vars['css'] = $this->css(); $vars['PICPATH'] = \SYSTEM\FILES\files::getURL('default_page'); $vars['copyright'] = ''; $vars['inprint'] = ''; - $vars = array_merge($vars, \SYSTEM\locale::getStrings(DBD\locale_string::VALUE_CATEGORY_MAINPAGE), - \SYSTEM\locale::getStrings(DBD\locale_string::VALUE_CATEGORY_WOW_SERVERINFO), - \SYSTEM\locale::getStrings(DBD\locale_string::VALUE_CATEGORY_BASIC)); + $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('mojotrollz'), + \SYSTEM\PAGE\text::tag('basic')); return \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/default_page.tpl'), $vars); } } \ No newline at end of file diff --git a/mojotrollz/page/page_mojotrollz.php b/mojotrollz/page/page_mojotrollz.php index 72c9df1..294c400 100644 --- a/mojotrollz/page/page_mojotrollz.php +++ b/mojotrollz/page/page_mojotrollz.php @@ -2,86 +2,86 @@ class page_mojotrollz extends \SYSTEM\API\api_default { - public static function default_page(){ + public static function default_page($_escaped_fragment_ = NULL){ if(\SYSTEM\SECURITY\Security::isLoggedIn()){ - return new user_default();} - return new default_page();} + return (new user_default())->html($_escaped_fragment_);} + return (new default_page())->html($_escaped_fragment_);} //Wizard public static function page_wizard_start(){ - return new wizard_start();} + return (new wizard_start())->html();} public static function page_wizard_details(){ - return new wizard_details();} + return (new wizard_details())->html();} public static function page_wizard_visuals(){ - return new wizard_visuals();} + return (new wizard_visuals())->html();} public static function page_wizard_friend(){ - return new wizard_friend();} + return (new wizard_friend())->html();} public static function page_wizard_skills($t = null){ - return new wizard_skills($t);} + return (new wizard_skills($t))->html();} public static function page_wizard_guild(){ - return new wizard_guild();} + return (new wizard_guild())->html();} public static function page_wizard_spawn(){ - return new wizard_spawn();} + return (new wizard_spawn())->html();} public static function page_wizard_summary(){ - return new wizard_summary();} + return (new wizard_summary())->html();} public static function page_wizard_register(){ - return new wizard_register();} + return (new wizard_register())->html();} public static function page_wizard_toolbar($last,$next){ - return new wizard_toolbar($last,$next);} + return (new wizard_toolbar($last,$next))->html();} //Get Info Data public static function page_default_info($id){ - return new default_info($id);} + return (new default_info($id))->html();} //User Area public static function page_user_start(){ if(!\SYSTEM\SECURITY\Security::isLoggedIn()){ throw new ERROR("You need to be logged in to view this ressource.");} - return new user_start();} + return (new user_start())->html();} public static function page_user_character(){ if(!\SYSTEM\SECURITY\Security::isLoggedIn()){ throw new ERROR("You need to be logged in to view this ressource.");} - return new user_character();} + return (new user_character())->html();} public static function page_user_menu(){ if(!\SYSTEM\SECURITY\Security::isLoggedIn()){ throw new ERROR("You need to be logged in to view this ressource.");} - return new user_menu();} + return (new user_menu())->html();} public static function page_user_database(){ if(!\SYSTEM\SECURITY\Security::isLoggedIn()){ throw new ERROR("You need to be logged in to view this ressource.");} - return new user_database();} + return (new user_database())->html();} public static function page_user_nexus_menu(){ if(!\SYSTEM\SECURITY\Security::isLoggedIn()){ throw new ERROR("You need to be logged in to view this ressource.");} - return new user_nexus_menu();} + return (new user_nexus_menu())->html();} public static function page_user_nexus_menu_sub($menu){ if(!\SYSTEM\SECURITY\Security::isLoggedIn()){ throw new ERROR("You need to be logged in to view this ressource.");} - return new user_nexus_menu_sub($menu);} + return (new user_nexus_menu_sub($menu))->html();} public static function page_user_nexus_content($menu, $filter){ if(!\SYSTEM\SECURITY\Security::isLoggedIn()){ throw new ERROR("You need to be logged in to view this ressource.");} - return new user_nexus_content($menu, $filter);} + return (new user_nexus_content($menu, $filter))->html();} public static function page_user_shop_menu(){ if(!\SYSTEM\SECURITY\Security::isLoggedIn()){ throw new ERROR("You need to be logged in to view this ressource.");} - return new user_shop_menu();} + return (new user_shop_menu())->html();} public static function page_user_achievements_menu(){ if(!\SYSTEM\SECURITY\Security::isLoggedIn()){ throw new ERROR("You need to be logged in to view this ressource.");} - return new user_achievements_menu();} + return (new user_achievements_menu())->html();} public static function page_user_achievements_menu_sub($menu){ if(!\SYSTEM\SECURITY\Security::isLoggedIn()){ throw new ERROR("You need to be logged in to view this ressource.");} - return new user_achievements_menu_sub($menu);} + return (new user_achievements_menu_sub($menu))->html();} public static function page_user_achievements_content($menu, $filter){ if(!\SYSTEM\SECURITY\Security::isLoggedIn()){ throw new ERROR("You need to be logged in to view this ressource.");} - return new user_achievements_content($menu, $filter);} + return (new user_achievements_content($menu, $filter))->html();} public static function page_user_logout(){ if(!\SYSTEM\SECURITY\Security::isLoggedIn()){ throw new ERROR("You need to be logged in to view this ressource.");} - return new user_logout();} -} + return (new user_logout())->html();} +} \ No newline at end of file diff --git a/sai.php b/sai.php index d9325fa..4ed6e0c 100644 --- a/sai.php +++ b/sai.php @@ -1,9 +1,9 @@