updated system reference, made site response
This commit is contained in:
parent
456142f8fe
commit
664974def8
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -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
|
||||
|
||||
25
api.php
25
api.php
@ -1,20 +1,13 @@
|
||||
<?php
|
||||
require_once 'system/autoload.inc.php'; //SYSTEM Classes
|
||||
require_once 'mojotrollz/autoload.inc.php'; //Project Classes
|
||||
require_once 'lib/system/autoload.inc'; //SYSTEM Classes
|
||||
require_once 'mojotrollz/autoload.inc'; //Project Classes
|
||||
require_once '/home/web/web/config/get_config.php';
|
||||
|
||||
require_once 'config.php'; //Server config
|
||||
SYSTEM\system::start($mojotrollz_config); //Start System time + config
|
||||
SYSTEM\system::include_ExceptionShortcut(); //allow ERROR() instead of \SYSTEM\LOG\ERROR()
|
||||
SYSTEM\system::include_ResultShortcut(); //allow JsonResult() instead of \SYSTEM\LOG\JsonResult()
|
||||
SYSTEM\system::register_errorhandler_dbwriter(); //write errors to database (must be first errorhandler to register)
|
||||
SYSTEM\system::register_errorhandler_jsonoutput(); //print errors as json to caller
|
||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
||||
\SYSTEM\system::include_ExceptionShortcut();
|
||||
\SYSTEM\system::include_ResultShortcut();
|
||||
\SYSTEM\system::register_errorhandler_dbwriter();
|
||||
\SYSTEM\system::register_errorhandler_jsonoutput();
|
||||
|
||||
//Direct JSON Input
|
||||
$json = json_decode(file_get_contents("php://input"), true);
|
||||
if(!$json){
|
||||
$json = array_merge($_POST,$_GET);}
|
||||
|
||||
//Construct the api with the dasense specific ApiVerfy Class and the call handler for da-sense api-calls ApiClass
|
||||
//ApiClass contains all stuff you would seek in the index -> 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.");
|
||||
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
$mojotrollz_config = array( array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING, E_ALL | E_STRICT),
|
||||
//array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL, 'http://www.mojotrollz.eu/'),
|
||||
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL, 'http://www.mojotrollz.eu/web/mojotrollz/'),
|
||||
//array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH, '/home/mojotrolls/mojo_zero/src/web/'),
|
||||
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH, '/home/web/webdir/mojotrollz/'),
|
||||
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT, SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT_JSON),
|
||||
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE, SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE_MYS),
|
||||
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST, '127.0.0.1'),
|
||||
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PORT, ''),
|
||||
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_USER, 'mojotrolls_dev'),
|
||||
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PASSWORD, 'dsjgfasudzfsvad'),
|
||||
array(SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME, 'host_mojotrollz'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL, 'system/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_NAVIMG, 'http://www.mojotrollz.eu/system/sai/page/img/logo.png'),//not working, cuz paths are not set yet! \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/default_page/img/logo.png')),
|
||||
//array(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_BASEURL, 'http://mojotrollz.eu/sai.php?'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_BASEURL, 'http://www.mojotrollz.eu/web/mojotrollz/sai.php?'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_TITLE, 'mojotrollz - Admin Area'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_COPYRIGHT, '<a href="http://www.mojotrollz.eu/" target="_blank">mojotrollz</a>, © 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/'));
|
||||
16
index.php
16
index.php
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
require_once 'system/autoload.inc.php'; //SYSTEM Classes
|
||||
\SYSTEM\system::register_errorhandler_dbwriter();
|
||||
\SYSTEM\system::register_errorhandler_jsonoutput();
|
||||
require_once 'mojotrollz/autoload.inc.php'; //Project Classes
|
||||
|
||||
require_once 'config.php';
|
||||
SYSTEM\system::start($mojotrollz_config);
|
||||
require_once 'lib/system/autoload.inc'; //SYSTEM Classes
|
||||
require_once 'mojotrollz/autoload.inc'; //Project Classes
|
||||
require_once '/home/web/web/config/get_config.php';
|
||||
|
||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
||||
\SYSTEM\system::include_ExceptionShortcut();
|
||||
\SYSTEM\system::include_ResultShortcut();
|
||||
\SYSTEM\system::register_errorhandler_dbwriter();
|
||||
\SYSTEM\system::register_errorhandler_jsonoutput();
|
||||
|
||||
echo \SYSTEM\API\api::run('\SYSTEM\API\verify','page_mojotrollz',array_merge($_POST,$_GET),1,false,true)->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.");
|
||||
1
lib/system
Submodule
1
lib/system
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit bb73e4d8a5547ba56f433c65fb70f2cd765e1a06
|
||||
@ -17,16 +17,17 @@ class default_page extends SYSTEM\PAGE\Page {
|
||||
return '<link href="'.SYSTEM\WEBPATH(new PLIB(),'bootstrap/css/bootstrap.css').'" rel="stylesheet">'.
|
||||
'<link href="'.SYSTEM\WEBPATH(new PPAGE(),'default_page/css/default_page.css').'" rel="stylesheet">';}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -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();}
|
||||
}
|
||||
8
sai.php
8
sai.php
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
require_once 'system/autoload.inc.php'; //SYSTEM Classes
|
||||
require_once 'mojotrollz/autoload.inc.php'; //Project Classes
|
||||
require_once 'lib/system/autoload.inc'; //SYSTEM Classes
|
||||
require_once 'mojotrollz/autoload.inc'; //Project Classes
|
||||
require_once '/home/web/web/config/get_config.php';
|
||||
|
||||
require_once 'config.php'; //Server config
|
||||
SYSTEM\system::start($mojotrollz_config); //Start System time + config
|
||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
||||
SYSTEM\system::include_ExceptionShortcut(); //allow ERROR() instead of \SYSTEM\LOG\ERROR()
|
||||
SYSTEM\system::include_ResultShortcut(); //allow JsonResult() instead of \SYSTEM\LOG\JsonResult()
|
||||
SYSTEM\system::register_errorhandler_dbwriter(); //write errors to database (must be first errorhandler to register)
|
||||
|
||||
1
system
1
system
@ -1 +0,0 @@
|
||||
Subproject commit 54491390805ded4ca366f355f746c2ee84ae4cbf
|
||||
10
test.php
10
test.php
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
require_once '../system/autoload.inc.php'; //SYSTEM Classes
|
||||
\SYSTEM\system::register_errorhandler_dbwriter();
|
||||
\SYSTEM\system::register_errorhandler_jsonoutput();
|
||||
require_once 'mojotrollz/autoload.inc.php'; //Project Classes
|
||||
|
||||
require_once 'config.php';
|
||||
SYSTEM\system::start($mojotrollz_config);
|
||||
|
||||
\SYSTEM\DOCU\code_docu::generate();
|
||||
Loading…
x
Reference in New Issue
Block a user