updated to new system

This commit is contained in:
Ulf Gebhardt 2015-05-18 12:39:52 +02:00
parent eb1104ad7c
commit aabb0b061f
22 changed files with 38 additions and 53 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "lib/system"]
path = lib/system
url = git@mojotrollz.eu:system.git

12
api.php
View File

@ -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 'friseurteam/autoload.inc.php'; //Project Classes
require_once 'lib/system/autoload.inc'; //SYSTEM Classes
require_once 'friseurteam/autoload.inc.php'; //Project Classes
require_once '/home/web/web/config/get_config.php';
require_once 'config.php';
\SYSTEM\system::start($friseurteam_config);
\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','api_friseurteam',array_merge($_POST,$_GET));
new \SYSTEM\LOG\COUNTER("API was called sucessfully.");

View File

@ -1,18 +0,0 @@
<?php
$friseurteam_config = array( array(config_ids::SYS_CONFIG_ERRORREPORTING, E_ALL | E_STRICT),
array(config_ids::SYS_CONFIG_PATH_BASEURL, 'http://www.friseur-zwingenberg.de/'),
array(config_ids::SYS_CONFIG_PATH_BASEPATH, '/home/web/webdir/friseurteam/'),
array(config_ids::SYS_CONFIG_DB_TYPE, SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE_MYS),
array(config_ids::SYS_CONFIG_DB_HOST, '127.0.0.1'),
array(config_ids::SYS_CONFIG_DB_PORT, ''),
array(config_ids::SYS_CONFIG_DB_USER, 'mojotrolls_mysql'),
array(config_ids::SYS_CONFIG_DB_PASSWORD, 'dajsabeaisvd345'),
array(config_ids::SYS_CONFIG_DB_DBNAME, 'host_friseurteam'),
array(config_ids::SYS_SAI_CONFIG_NAVIMG, '/web/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(config_ids::SYS_SAI_CONFIG_BASEURL, 'http://www.friseur-zwingenberg.de/sai.php?'),
array(config_ids::SYS_SAI_CONFIG_TITLE, 'Friseur Team - Admin Area'),
array(config_ids::SYS_SAI_CONFIG_COPYRIGHT, '<a href="http://www.friseur-zwingenberg.de/" target="_blank">Friseur Team</a>, &copy; WebCraft Media 2014'),
array(config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL, 'system/'),
array(config_ids::SYS_CONFIG_LANGS, array('deDE', 'enUS')),
array(config_ids::SYS_CONFIG_DEFAULT_LANG, 'deDE'),
array(config_ids::WEBCRAFT_BILLING_TOKEN, 'FRISEURTEAMjadhfivdaafzkkdsa'));

View File

@ -1,3 +1,2 @@
<?php
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/qq','DBD');
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/tbl','DBD');

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

View File

@ -2,6 +2,6 @@
class default_content extends SYSTEM\PAGE\Page {
public function html() {
$text = \SYSTEM\locale::getStrings(\DBD\locale_string::CATEGORY_FRISEURTEAM_TEXT);
$text = \SYSTEM\PAGE\text::tag('friseurteam');
return $text['default_content'];}
}

View File

@ -10,15 +10,16 @@ class default_page extends SYSTEM\PAGE\Page {
'<script type="text/javascript" src="'.\SYSTEM\WEBPATH(new PPAGE(),'default_page/default_page.js').'"></script>'.
'<script type="text/javascript" src="'.\SYSTEM\WEBPATH(new PPAGE(),'default_page/map.js').'"></script>';
}
public function html() {
public function html($_escaped_fragment_ = NULL) {
$vars = array();
$vars['js'] = self::js();
$vars['js'] = '';
if(!$_escaped_fragment_){
$vars['js'] = self::js();}
$vars['css'] = self::css();
$vars['default_gallery'] = saimod_webcraft_gallery::getGalleryGalleria(1);
$vars['default_content'] = (new default_content())->html();
$vars = array_merge($vars, \SYSTEM\locale::getStrings(\DBD\locale_string::CATEGORY_FRISEURTEAM_TEXT),
\SYSTEM\locale::getStrings(\DBD\locale_string::CATEGORY_FRISEURTEAM_PAGE),
\SYSTEM\locale::getStrings(\DBD\locale_string::VALUE_CATEGORY_BASIC));
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('friseurteam'),
\SYSTEM\PAGE\text::tag('basic'));
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PPAGE(),'default_page/friseurteam.tpl'), $vars);
}

View File

@ -2,7 +2,7 @@
class default_preise extends SYSTEM\PAGE\Page {
public function html() {
$text = \SYSTEM\locale::getStrings(\DBD\locale_string::CATEGORY_FRISEURTEAM_TEXT);
$text = \SYSTEM\PAGE\text::tag('friseurteam');
$vars = array();
$vars['default_gallery'] = saimod_webcraft_gallery::getGalleryGalleria(2);
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PPAGE(),'default_preise/default_preise.tpl'), $vars);}

View File

@ -2,6 +2,6 @@
class default_team extends SYSTEM\PAGE\Page {
public function html() {
$text = \SYSTEM\locale::getStrings(\DBD\locale_string::CATEGORY_FRISEURTEAM_TEXT);
$text = \SYSTEM\PAGE\text::tag('friseurteam');
return $text['default_team'];}
}

View File

@ -1,14 +1,14 @@
<?php
class page_friseurteam extends \SYSTEM\API\api_default {
public static function default_page(){
return new default_page();}
public static function default_page($_escaped_fragment_ = NULL){
return (new default_page())->html($_escaped_fragment_);}
public static function page_default_content(){
return new default_content();}
return (new default_content())->html();}
public static function page_default_team(){
return new default_team();}
return (new default_team())->html();}
public static function page_default_galerie(){
return new default_galerie();}
return (new default_galerie())->html();}
public static function page_default_preise(){
return new default_preise();}
return (new default_preise())->html();}
}

View File

@ -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 'friseurteam/autoload.inc.php'; //Project Classes
require_once 'lib/system/autoload.inc'; //SYSTEM Classes
require_once 'friseurteam/autoload.inc.php'; //Project Classes
require_once '/home/web/web/config/get_config.php';
require_once 'config.php';
\SYSTEM\system::start($friseurteam_config);
\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_friseurteam', array_merge($_POST,$_GET), 1, false, true)->html();
echo \SYSTEM\API\api::run('\SYSTEM\API\verify', 'page_friseurteam', array_merge($_POST,$_GET), 1, false, true);
new \SYSTEM\LOG\COUNTER("Page was called sucessfully.");

1
lib/system Submodule

@ -0,0 +1 @@
Subproject commit a1f44597a70dcd1d5ce74c35a8ce824159e9e3a2

12
sai.php
View File

@ -1,13 +1,13 @@
<?php
require_once 'system/autoload.inc.php'; //SYSTEM Classes
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
require_once 'friseurteam/autoload.inc.php'; //Project Classes
require_once 'lib/system/autoload.inc'; //SYSTEM Classes
require_once 'friseurteam/autoload.inc.php'; //Project Classes
require_once '/home/web/web/config/get_config.php';
require_once 'config.php'; //Server config
SYSTEM\system::start($friseurteam_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)
SYSTEM\system::register_errorhandler_jsonoutput(); //print errors as json to caller
$sai = new SYSTEM\SAI\saigui();
echo $sai->html();

1
system

@ -1 +0,0 @@
Subproject commit 548040ec3c51110b0dd7b0285424edf68fdb635d