diff --git a/.gitmodules b/.gitmodules index a37a6b8..a17de5d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -31,3 +31,9 @@ [submodule "lib/jqbootstrapvalidation"] path = lib/jqbootstrapvalidation url = ../lib_jqbootstrapvalidation.git +[submodule "lib/scssphp"] + path = lib/scssphp + url = ../lib_scssphp +[submodule "lib/minify"] + path = lib/minify + url = ../lib_minify.git diff --git a/api/api_system.php b/api/api_system.php index 64fd869..7c70678 100644 --- a/api/api_system.php +++ b/api/api_system.php @@ -19,7 +19,13 @@ class api_system extends api_login{ \SYSTEM\locale::set($lang);} public static function static__result($result){ \SYSTEM\CONFIG\config::set(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT, $result);} + public static function static__($_){ + //cache avoidance + } public static function call_bug($message,$data){ return \SYSTEM\SAI\saimod_sys_todo::report($message,$data);} + + public static function call_cache($id,$ident){ + return \SYSTEM\CACHE\cache::get($id, $ident,true);} } \ No newline at end of file diff --git a/autoload.inc b/autoload.inc index a5e809b..50353fd 100644 --- a/autoload.inc +++ b/autoload.inc @@ -1,6 +1,6 @@ SERVERPATH().';';} + return sha1($ident); + } + public static function url($files){ + $ident = self::ident($files); + if(!\SYSTEM\CACHE\cache_css::get($ident)){ + \LIB\lib_minify::php(); + $minifier = new \MatthiasMullie\Minify\CSS(); + foreach($files as $f){ + $minifier->add($f->SERVERPATH());} + \SYSTEM\CACHE\cache_css::put($ident, $minifier->minify());} + return './api.php?call=cache&id='.self::CACHE_CSS.'&ident='.$ident; + } +} \ No newline at end of file diff --git a/cache/cache_filemask.php b/cache/cache_filemask.php new file mode 100644 index 0000000..e9c08c9 --- /dev/null +++ b/cache/cache_filemask.php @@ -0,0 +1,14 @@ +SERVERPATH().';';} + return sha1($ident); + } + public static function url($files){ + $ident = self::ident($files); + if(!\SYSTEM\CACHE\cache_js::get($ident)){ + \LIB\lib_minify::php(); + $minifier = new \MatthiasMullie\Minify\JS(); + foreach($files as $f){ + $minifier->add($f->SERVERPATH());} + \SYSTEM\CACHE\cache_js::put($ident, $minifier->minify());} + return './api.php?call=cache&id='.self::CACHE_JS.'&ident='.$ident; + } +} \ No newline at end of file diff --git a/cache/cache_scss.php b/cache/cache_scss.php new file mode 100644 index 0000000..d2bfd0b --- /dev/null +++ b/cache/cache_scss.php @@ -0,0 +1,18 @@ +SERVERPATH())){ + \LIB\lib_scssphp::php(); + \SYSTEM\CACHE\cache_scss::put($file->SERVERPATH(), (new \Leafo\ScssPhp\Compiler())->compile(file_get_contents($file->SERVERPATH())));} + return './api.php?call=cache&id='.self::CACHE_SCSS.'&ident='.self::ident($file->SERVERPATH()); + } +} \ No newline at end of file diff --git a/cache/qq/SYS_CACHE_CHECK.php b/cache/qq/SYS_CACHE_CHECK.php index e010c5c..836b16b 100644 --- a/cache/qq/SYS_CACHE_CHECK.php +++ b/cache/qq/SYS_CACHE_CHECK.php @@ -2,9 +2,13 @@ namespace SYSTEM\SQL; class SYS_CACHE_CHECK extends \SYSTEM\DB\QP { public static function get_class(){return \get_class();} - public static function pgsql(){return + public static function pTsql(){return 'SELECT "data" FROM system.cache'. ' WHERE "CacheID" = $1 AND'. ' "Ident" = $2;'; - } + } + public static function mysql(){return +'SELECT * FROM system_cache'. +' WHERE cache = ? AND ident = ?;'; + } } \ No newline at end of file diff --git a/cache/qq/SYS_CACHE_PUT.php b/cache/qq/SYS_CACHE_PUT.php index 64bc1da..394ea58 100644 --- a/cache/qq/SYS_CACHE_PUT.php +++ b/cache/qq/SYS_CACHE_PUT.php @@ -2,8 +2,12 @@ namespace SYSTEM\SQL; class SYS_CACHE_PUT extends \SYSTEM\DB\QP { public static function get_class(){return \get_class();} - public static function pgsql(){return + public static function pTsql(){return 'INSERT INTO system.cache ("CacheID", "Ident", "data")'. ' VALUES ($1,$2,$3);'; } + public static function mysql(){return +'REPLACE INTO system_cache (cache, ident, type, data)'. +' VALUES (?,?,?,?);'; + } } \ No newline at end of file diff --git a/files/files.php b/files/files.php index 47e707b..d4c75aa 100644 --- a/files/files.php +++ b/files/files.php @@ -10,7 +10,7 @@ class files { public static function get($cat = null, $id = null, $returnasjson = false) { if (!$cat) { return $returnasjson ? \SYSTEM\LOG\JsonResult::toString(self::$folders) : self::$folders;} - + if (!array_key_exists($cat, self::$folders)) { throw new \SYSTEM\LOG\ERROR("No matching Cat '" . $cat . "' found.");} diff --git a/html/html.php b/html/html.php index bf52a06..1f19e56 100644 --- a/html/html.php +++ b/html/html.php @@ -5,4 +5,6 @@ class html{ return '';} public static function script($src,$type = 'text/javascript',$rel = 'stylesheet', $language = 'JavaScript', $script = ''){ return '';} + public static function style($style){ + return '';} } diff --git a/lib/animate b/lib/animate index 6665446..b117ce5 160000 --- a/lib/animate +++ b/lib/animate @@ -1 +1 @@ -Subproject commit 666544655bf5365e4f77aec0fa0f497673f6e69a +Subproject commit b117ce583f21c3258d73c0e336b5c511f5fe90a3 diff --git a/lib/autoload.inc b/lib/autoload.inc index 1b369e5..4999dbf 100644 --- a/lib/autoload.inc +++ b/lib/autoload.inc @@ -11,4 +11,6 @@ require_once dirname(__FILE__).'/animate/autoload.inc'; require_once dirname(__FILE__).'/lettering/autoload.inc'; require_once dirname(__FILE__).'/bootstrap_growl/autoload.inc'; require_once dirname(__FILE__).'/git/autoload.inc'; -require_once dirname(__FILE__).'/jqbootstrapvalidation/autoload.inc'; \ No newline at end of file +require_once dirname(__FILE__).'/jqbootstrapvalidation/autoload.inc'; +require_once dirname(__FILE__).'/scssphp/autoload.inc'; +require_once dirname(__FILE__).'/minify/autoload.inc'; \ No newline at end of file diff --git a/lib/bootstrap b/lib/bootstrap index 7ec24da..61480a2 160000 --- a/lib/bootstrap +++ b/lib/bootstrap @@ -1 +1 @@ -Subproject commit 7ec24da73d3de379567f8cf27f4c5e860b1a724a +Subproject commit 61480a2725cc6663f7edecfbffbc1f2983137cb6 diff --git a/lib/bootstrap_growl b/lib/bootstrap_growl index 5940b96..aa913c9 160000 --- a/lib/bootstrap_growl +++ b/lib/bootstrap_growl @@ -1 +1 @@ -Subproject commit 5940b96a932d940580ccf0d3ba46b4c381f90c08 +Subproject commit aa913c90511b035125888fe45e41521f85dfbb56 diff --git a/lib/jqbootstrapvalidation b/lib/jqbootstrapvalidation index fed52e4..1f6f4ea 160000 --- a/lib/jqbootstrapvalidation +++ b/lib/jqbootstrapvalidation @@ -1 +1 @@ -Subproject commit fed52e48a2d1185b1700f3d6901cc10c24b2ed86 +Subproject commit 1f6f4ea7e6eab0f9c0a740530e957d3d73851d14 diff --git a/lib/jquery b/lib/jquery index 24eb1a0..5cbffcf 160000 --- a/lib/jquery +++ b/lib/jquery @@ -1 +1 @@ -Subproject commit 24eb1a096cb4509a1d9643292f846295d6903a33 +Subproject commit 5cbffcf4e9a888ee0a80addaf2a68006cc8a7124 diff --git a/lib/lettering b/lib/lettering index 8a7a337..fa77e99 160000 --- a/lib/lettering +++ b/lib/lettering @@ -1 +1 @@ -Subproject commit 8a7a3377e82231ecf09d40732c75e8bee032228e +Subproject commit fa77e997e3fec513cf55416c9f21ce57abcdece4 diff --git a/lib/minify b/lib/minify new file mode 160000 index 0000000..dcdc55c --- /dev/null +++ b/lib/minify @@ -0,0 +1 @@ +Subproject commit dcdc55caa503283a66a5a9a1325f3f27b1475f6c diff --git a/lib/scssphp b/lib/scssphp new file mode 160000 index 0000000..bac779a --- /dev/null +++ b/lib/scssphp @@ -0,0 +1 @@ +Subproject commit bac779a7b9ef053b8253d4d76c594b03b19157aa diff --git a/files/sys/system.css b/lib/system/lib/system.css similarity index 100% rename from files/sys/system.css rename to lib/system/lib/system.css diff --git a/files/sys/system.js b/lib/system/lib/system.js similarity index 100% rename from files/sys/system.js rename to lib/system/lib/system.js diff --git a/lib/system/lib_system.php b/lib/system/lib_system.php index 0d4205e..1a0fa2f 100644 --- a/lib/system/lib_system.php +++ b/lib/system/lib_system.php @@ -4,9 +4,9 @@ class lib_system extends \LIB\lib_jscss{ public static function get_class(){ return self::class;} public static function js_path(){ - return './sai.php?call=files&cat=sys&id=system.js';} + return new \SYSTEM\PLIB('/system/lib/system.js');} public static function css_path(){ - return './sai.php?call=files&cat=sys&id=system.css';} + return new \SYSTEM\PLIB('/system/lib/system.css');} public static function version(){ return 'pre alpha';} } diff --git a/lib/tablesorter b/lib/tablesorter index 54f8142..f8158bf 160000 --- a/lib/tablesorter +++ b/lib/tablesorter @@ -1 +1 @@ -Subproject commit 54f81421b3002be930ab53e560cb658e5c11bcfa +Subproject commit f8158bfdea25f8fae9687e5f999d2258a05f1965 diff --git a/lib/textillate b/lib/textillate index 45ded03..4ca4373 160000 --- a/lib/textillate +++ b/lib/textillate @@ -1 +1 @@ -Subproject commit 45ded03fc9c45bb3e9fce61dd700a2acabc0b9db +Subproject commit 4ca4373942cce18aa11b59c7c5ddfd31181f757e diff --git a/lib/tinymce b/lib/tinymce index 84856bd..6a3078b 160000 --- a/lib/tinymce +++ b/lib/tinymce @@ -1 +1 @@ -Subproject commit 84856bd3b982d11942ae84cfe3cb8cc27c273fe8 +Subproject commit 6a3078b3f22b6d2189fdc3d5ddec49365120bc39 diff --git a/log/error_handler/error_handler_dbwriter.php b/log/error_handler/error_handler_dbwriter.php index 100fa0a..e9d4c89 100644 --- a/log/error_handler/error_handler_dbwriter.php +++ b/log/error_handler/error_handler_dbwriter.php @@ -9,7 +9,7 @@ class error_handler_dbwriter extends \SYSTEM\LOG\error_handler { try{ if(\property_exists(get_class($E), 'logged') && $E->logged){ return false;} //alrdy logged(this prevents proper thrown value for every system exception) - \SYSTEM\SQL\SYS_LOG_INSERT::Q1( /*array( get_class($E), $E->getMessage(), $E->getCode(), $E->getFile(), $E->getLine(), $E->getTraceAsString(), + $result = \SYSTEM\SQL\SYS_LOG_INSERT::QI( /*array( get_class($E), $E->getMessage(), $E->getCode(), $E->getFile(), $E->getLine(), $E->getTraceAsString(), getenv('REMOTE_ADDR'),round(microtime(true) - \SYSTEM\time::getStartTime(),5), $_SERVER["SERVER_NAME"],$_SERVER["SERVER_PORT"],$_SERVER['REQUEST_URI'], serialize($_POST), array_key_exists('HTTP_REFERER', $_SERVER) ? $_SERVER['HTTP_REFERER'] : null, @@ -20,10 +20,14 @@ class error_handler_dbwriter extends \SYSTEM\LOG\error_handler { $_SERVER["SERVER_NAME"],$_SERVER["SERVER_PORT"],$_SERVER['REQUEST_URI'], serialize($_POST), array_key_exists('HTTP_REFERER', $_SERVER) ? $_SERVER['HTTP_REFERER'] : null, array_key_exists('HTTP_USER_AGENT',$_SERVER) ? $_SERVER['HTTP_USER_AGENT'] : null, - ($user = \SYSTEM\SECURITY\Security::getUser()) ? $user->id : null,$thrown ? 1 : 0)); + ($user = \SYSTEM\SECURITY\Security::getUser()) ? $user->id : null,$thrown ? 1 : 0)); + if(\property_exists(get_class($E), 'logged')){ $E->logged = true;} //we just did log - } catch (\Exception $E){return false;} //Error -> Ignore + } catch (\Exception $E){ + //Dump the Error + echo \SYSTEM\LOG\JsonResult::toString((array)$E); + return false;} //Error -> Ignore return false; //We just log and do not handle the error! } diff --git a/page/State.php b/page/State.php index 51a995a..7c6aa50 100644 --- a/page/State.php +++ b/page/State.php @@ -31,9 +31,16 @@ class State { $row['css'] = $row['js'] = array(); if(\class_exists($row['php_class']) && \method_exists($row['php_class'], 'css') && \is_callable($row['php_class'].'::css')){ $row['css'] = array_merge($row['css'], \call_user_func($row['php_class'].'::css'));} + $row['css'] = count($row['css']) > 0 ? array(\SYSTEM\CACHE\cache_css::url($row['css'])) : array(); + if(\class_exists($row['php_class']) && \method_exists($row['php_class'], 'scss') && \is_callable($row['php_class'].'::scss')){ + $scss = \call_user_func($row['php_class'].'::scss'); + foreach($scss as $s){ + $row['css'][] = \SYSTEM\CACHE\cache_scss::url($s);} + } if(\class_exists($row['php_class']) && \method_exists($row['php_class'], 'js') && \is_callable($row['php_class'].'::js')){ $row['js'] = array_merge($row['js'], \call_user_func($row['php_class'].'::js'));} - $row['php_class'] = ''; + $row['js'] = count($row['js']) > 0 ? array(\SYSTEM\CACHE\cache_js::url($row['js'])) : array(); + unset($row['php_class']); $skip = false; for($i=0;$ibasepath = $basepath; + $this->path = $path; + $this->subpath = $subpath; + } + public function SERVERPATH(){ + return $this->basepath->SERVERPATH().$this->path.$this->subpath;} + function WEBPATH($mask = true){ + if($mask){ + $path = $this->basepath->SERVERPATH().$this->path.$this->subpath; + \SYSTEM\CACHE\cache_filemask::put($path); + return './api.php?call=cache&id='.\SYSTEM\CACHE\cache_filemask::CACHE_FILEMASK.'&ident='.\SYSTEM\CACHE\cache_filemask::ident($path); + } else { + return $this->basepath->WEBPATH($mask).$this->path.$this->subpath; + } + } +} + +class PROOT extends PATH { + public function __construct($subpath = '') { + $this->subpath = $subpath;} + public function SERVERPATH(){ + return \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH).$this->subpath;} + function WEBPATH($mask = true){ + if($mask){ + $path = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).$this->subpath; + \SYSTEM\CACHE\cache_filemask::put($path); + return './api.php?call=cache&id='.\SYSTEM\CACHE\cache_filemask::CACHE_FILEMASK.'&ident='.\SYSTEM\CACHE\cache_filemask::ident($path); + } else { + return \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).$this->subpath; + } + } +} + +class PSYSTEM extends PATH { + public function __construct($subpath = '') { + parent::__construct(new \SYSTEM\PROOT(), \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL), $subpath);} +} + +class PSAI extends PATH { + public function __construct($subpath = '') { + parent::__construct(new \SYSTEM\PSYSTEM(), 'sai/', $subpath);} +} + +class PLIB extends PATH { + public function __construct($subpath = '') { + parent::__construct(new \SYSTEM\PSYSTEM(), 'lib/', $subpath);} +} + +class PSQL extends PATH { + public function __construct($subpath = '') { + parent::__construct(new \SYSTEM\PSYSTEM(), 'sql/', $subpath);} +} \ No newline at end of file diff --git a/sai/modules/saimod_sys_api/saimod_sys_api.php b/sai/modules/saimod_sys_api/saimod_sys_api.php index eba27ba..01b672a 100644 --- a/sai/modules/saimod_sys_api/saimod_sys_api.php +++ b/sai/modules/saimod_sys_api/saimod_sys_api.php @@ -8,8 +8,8 @@ class saimod_sys_api extends \SYSTEM\SAI\SaiModule { $res = \SYSTEM\SQL\SYS_SAIMOD_API_GROUPS::QQ(); while($r = $res->next()){ - $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/tabopt.tpl'), array( 'tab_id' => $r['group']));} - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/saimod_sys_api.tpl'), $vars); + $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_api/tpl/tabopt.tpl'))->SERVERPATH(), array( 'tab_id' => $r['group']));} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_api/tpl/saimod_sys_api.tpl'))->SERVERPATH(), $vars); } public static function sai_mod__system_sai_saimod_sys_api_action_list($group=null){ @@ -21,19 +21,19 @@ class saimod_sys_api extends \SYSTEM\SAI\SaiModule { $tab['tab_id'] = $r['group']; $r['tr_class'] = self::tablerow_class($r['type']); $r['type'] = self::type_names($r['type']); - $tab['content'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/list_entry.tpl'), $r); + $tab['content'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_api/tpl/list_entry.tpl'))->SERVERPATH(), $r); } $tab = array_merge($tab,\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_API)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/saimod_sys_api_list.tpl'), $tab); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_api/tpl/saimod_sys_api_list.tpl'))->SERVERPATH(), $tab); } public static function sai_mod__system_sai_saimod_sys_api_action_deletedialog($ID,$group){ $res = \SYSTEM\SQL\SYS_SAIMOD_API_SINGLE_SELECT::Q1(array($ID,$group)); $res = array_merge($res,\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_API)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/delete_dialog.tpl'), $res); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_api/tpl/delete_dialog.tpl'))->SERVERPATH(), $res); } public static function sai_mod__system_sai_saimod_sys_api_action_newdialog(){ - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/new_dialog.tpl'),\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_API));} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_api/tpl/new_dialog.tpl'))->SERVERPATH(),\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_API));} public static function sai_mod__system_sai_saimod_sys_api_action_addcall($ID,$group,$type,$parentID,$parentValue,$name,$verify){ if(!\SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_API)){ @@ -77,7 +77,7 @@ class saimod_sys_api extends \SYSTEM\SAI\SaiModule { public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI) && \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_API);} public static function css(){ - return array(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/css/saimod_sys_api.css'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_api/css/saimod_sys_api.css'));} public static function js(){ - return array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/js/saimod_sys_api.js'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_api/js/saimod_sys_api.js'));} } \ No newline at end of file diff --git a/sai/modules/saimod_sys_cache/qq/SYS_SAIMOD_CACHE.php b/sai/modules/saimod_sys_cache/qq/SYS_SAIMOD_CACHE.php index 466eed6..01a0d48 100644 --- a/sai/modules/saimod_sys_cache/qq/SYS_SAIMOD_CACHE.php +++ b/sai/modules/saimod_sys_cache/qq/SYS_SAIMOD_CACHE.php @@ -2,10 +2,10 @@ namespace SYSTEM\SQL; class SYS_SAIMOD_CACHE extends \SYSTEM\DB\QQ { public static function get_class(){return \get_class();} - public static function pgsql(){return + public static function pTsql(){return 'SELECT *, encode(data,\'base64\') FROM system.cache ORDER BY "ID" ASC LIMIT 100;'; } public static function mysql(){return -'SELECT * FROM system_cache ORDER BY ID ASC LIMIT 100;'; +'SELECT * FROM system_cache LIMIT 100;'; } } \ No newline at end of file diff --git a/sai/modules/saimod_sys_cache/saimod_sys_cache.php b/sai/modules/saimod_sys_cache/saimod_sys_cache.php index cda82a6..a64fe09 100644 --- a/sai/modules/saimod_sys_cache/saimod_sys_cache.php +++ b/sai/modules/saimod_sys_cache/saimod_sys_cache.php @@ -7,9 +7,9 @@ class saimod_sys_cache extends \SYSTEM\SAI\SaiModule { $vars['entries'] = ''; $res = \SYSTEM\SQL\SYS_SAIMOD_CACHE::QQ(); while($r = $res->next()){ - $r['class'] = self::tablerow_class($r['CacheID']); - $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cache/tpl/saimod_sys_cache_entry.tpl'), $r);} - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl'), $vars); + $r['class'] = self::tablerow_class($r['cache']); + $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_cache/tpl/saimod_sys_cache_entry.tpl'))->SERVERPATH(), $r);} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl'))->SERVERPATH(), $vars); } private static function tablerow_class($cacheID){ diff --git a/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl b/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl index 5044a08..87d2be3 100644 --- a/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl +++ b/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl @@ -2,9 +2,9 @@ Entries: ${count} showing 100 - - + + ${entries} diff --git a/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache_entry.tpl b/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache_entry.tpl index e4bf11e..865ecf7 100644 --- a/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache_entry.tpl +++ b/sai/modules/saimod_sys_cache/tpl/saimod_sys_cache_entry.tpl @@ -1,6 +1,6 @@ - - - + + + \ No newline at end of file diff --git a/sai/modules/saimod_sys_config/saimod_sys_config.php b/sai/modules/saimod_sys_config/saimod_sys_config.php index 022e4f6..cd7b91e 100644 --- a/sai/modules/saimod_sys_config/saimod_sys_config.php +++ b/sai/modules/saimod_sys_config/saimod_sys_config.php @@ -4,145 +4,145 @@ class saimod_sys_config extends \SYSTEM\SAI\SaiModule { public static function sai_mod__SYSTEM_SAI_saimod_sys_config(){ $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_CONFIG); $vars['basics'] = $vars['database'] = $vars['sai'] = ''; - $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING))); - $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL))); - $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH))); - $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL))); - $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT))); - $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS', 'value' =>implode(',',\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS)))); - $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG))); - $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE))); - $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST))); - $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PORT, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PORT', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PORT))); - $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_USER, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_USER', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_USER))); - $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PASSWORD, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PASSWORD', 'value' =>'<hidden>')); - $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME))); - $vars['sai'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['sai'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_PROJECT, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_PROJECT', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_PROJECT))); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config.tpl'),$vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config.tpl'))->SERVERPATH(),$vars); } //public static function html_li_menu(){return '
  • ${sai_menu_config}
  • ';} public static function sai_mod__SYSTEM_SAI_saimod_sys_config_action_basics(){ $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_CONFIG); $vars['basics'] = $vars['database'] = $vars['sai'] = ''; - $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING))); - $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL))); - $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH))); - $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL))); - $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT))); - $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS', 'value' =>implode(',',\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS)))); - $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['basics'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG))); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_basics.tpl'),$vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_basics.tpl'))->SERVERPATH(),$vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_config_action_database(){ $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_CONFIG); $vars['database'] = ''; - $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE))); - $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST))); - $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PORT, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PORT', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PORT))); - $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_USER, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_USER', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_USER))); - $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PASSWORD, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PASSWORD', 'value' =>'<hidden>')); - $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['database'] .=\SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME))); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_database.tpl'),$vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_database.tpl'))->SERVERPATH(),$vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_config_action_sai(){ $vars['sai'] = ''; - $vars['sai'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_tr.tpl'), + $vars['sai'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_tr.tpl'))->SERVERPATH(), array( 'id' =>\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_PROJECT, 'name' =>'\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_PROJECT', 'value' =>\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_PROJECT))); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_sai.tpl'),$vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_sai.tpl'))->SERVERPATH(),$vars); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/tpl/config_database.tpl'),$vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_database.tpl'))->SERVERPATH(),$vars); } public static function html_li_menu(){return '
  • ';} public static function right_public(){return false;} public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);} public static function js(){ - return array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_config/js/saimod_sys_config.js'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_config/js/saimod_sys_config.js'));} //public static function css(){} } \ No newline at end of file diff --git a/sai/modules/saimod_sys_cron/saimod_sys_cron.php b/sai/modules/saimod_sys_cron/saimod_sys_cron.php index b974cd4..af62d48 100644 --- a/sai/modules/saimod_sys_cron/saimod_sys_cron.php +++ b/sai/modules/saimod_sys_cron/saimod_sys_cron.php @@ -12,9 +12,9 @@ class saimod_sys_cron extends \SYSTEM\SAI\SaiModule { $r['next'] = date('Y-m-d H:i:s',\SYSTEM\CRON\cron::next($r['class'])); $r['selected_'.$r['status']] = 'selected'; $r['i'] = $i++; - $vars['content'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cron/tpl/list_entry.tpl'), $r);} + $vars['content'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_cron/tpl/list_entry.tpl'))->SERVERPATH(), $r);} $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_CRON), \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_TIME)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cron/tpl/tabs.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_cron/tpl/tabs.tpl'))->SERVERPATH(), $vars); } public static function sai_mod__system_sai_saimod_sys_cron_action_change($cls,$status){ @@ -45,7 +45,7 @@ class saimod_sys_cron extends \SYSTEM\SAI\SaiModule { public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_CRON);} public static function css(){ - return array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cron/css/saimod_sys_cron.css'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_cron/css/saimod_sys_cron.css'));} public static function js(){ - return array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_cron/js/saimod_sys_cron.js'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_cron/js/saimod_sys_cron.js'));} } \ No newline at end of file diff --git a/sai/modules/saimod_sys_docu/saimod_sys_docu.php b/sai/modules/saimod_sys_docu/saimod_sys_docu.php index a52a082..4567655 100644 --- a/sai/modules/saimod_sys_docu/saimod_sys_docu.php +++ b/sai/modules/saimod_sys_docu/saimod_sys_docu.php @@ -7,8 +7,8 @@ class saimod_sys_docu extends \SYSTEM\SAI\SaiModule { $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_DOCU); $vars['tabopts'] = ''; foreach($documents as $cat => $docs){ - $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_docu/tpl/tabopt.tpl'), array( 'tab_id' => str_replace(' ', '_', $cat),'tab_id_pretty' => $cat));} - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_docu/tpl/saimod_sys_docu.tpl'), $vars); + $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_docu/tpl/tabopt.tpl'))->SERVERPATH(), array( 'tab_id' => str_replace(' ', '_', $cat),'tab_id_pretty' => $cat));} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_docu/tpl/saimod_sys_docu.tpl'))->SERVERPATH(), $vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_docu_action_cat($cat = 'System'){ @@ -16,12 +16,12 @@ class saimod_sys_docu extends \SYSTEM\SAI\SaiModule { $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_DOCU); $vars['tabopts'] = ''; foreach($documents as $doc){ - $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_docu/tpl/tabopt2.tpl'), + $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_docu/tpl/tabopt2.tpl'))->SERVERPATH(), array( 'tab_id' => str_replace(' ', '_', $cat), 'doc_id' => str_replace(array('.',' '), '_', basename($doc)), 'doc_id_pretty' => basename($doc))); } - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_docu/tpl/saimod_sys_docu_cat.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_docu/tpl/saimod_sys_docu_cat.tpl'))->SERVERPATH(), $vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_docu_action_doc($cat = 'System',$doc = '1_system_md'){ @@ -41,5 +41,5 @@ class saimod_sys_docu extends \SYSTEM\SAI\SaiModule { //public static function css(){} public static function js(){ - return array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_docu/js/saimod_sys_docu.js'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_docu/js/saimod_sys_docu.js'));} } \ No newline at end of file diff --git a/sai/modules/saimod_sys_files/js/saimod_sys_files.js b/sai/modules/saimod_sys_files/js/saimod_sys_files.js index 177b328..98b99fb 100644 --- a/sai/modules/saimod_sys_files/js/saimod_sys_files.js +++ b/sai/modules/saimod_sys_files/js/saimod_sys_files.js @@ -67,3 +67,6 @@ function files_menu(){ $('#menu_folder_sys').parent().addClass('active');} } +function saimod_sys_files_tooltip(elementId, pictureId, pictureCategory) { + $( "#elementId" ).tooltip({ content: '' }); +} \ No newline at end of file diff --git a/sai/modules/saimod_sys_files/saimod_sys_files.php b/sai/modules/saimod_sys_files/saimod_sys_files.php index 83fa7a5..fba02f8 100644 --- a/sai/modules/saimod_sys_files/saimod_sys_files.php +++ b/sai/modules/saimod_sys_files/saimod_sys_files.php @@ -27,9 +27,9 @@ class saimod_sys_files extends \SYSTEM\SAI\SaiModule { $res = \SYSTEM\FILES\files::get(); foreach($res as $name=>$folder){ - $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_files/tpl/saimod_sys_files_tabopt.tpl'), array( 'name' => $name));} + $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_files/tpl/saimod_sys_files_tabopt.tpl'))->SERVERPATH(), array( 'name' => $name));} $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_FILES)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_files/tpl/saimod_sys_files.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_files/tpl/saimod_sys_files.tpl'))->SERVERPATH(), $vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_files_action_tab($name = 'sys'){ @@ -37,11 +37,11 @@ class saimod_sys_files extends \SYSTEM\SAI\SaiModule { $cat = \SYSTEM\FILES\files::get($name); $i = 0; foreach($cat as $file){ - $result .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_files/tpl/saimod_sys_files_list_entry.tpl'), array('i' => $i++, 'cat' => $name, 'name' => $file, 'extension' => substr($file,-3,3), 'url' => 'api.php?call=files&cat='.$name.'&id='.$file));} + $result .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_files/tpl/saimod_sys_files_list_entry.tpl'))->SERVERPATH(), array('i' => $i++, 'cat' => $name, 'name' => $file, 'extension' => substr($file,-3,3), 'url' => 'api.php?call=files&cat='.$name.'&id='.$file));} $vars['cat'] = $name; $vars['content'] = $result; $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_FILES)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_files/tpl/saimod_sys_files_list.tpl'), $vars);} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_files/tpl/saimod_sys_files_list.tpl'))->SERVERPATH(), $vars);} //public static function html_li_menu(){return '
  • ${sai_menu_files}
  • ';} public static function html_li_menu(){return '
  • ';} @@ -50,5 +50,5 @@ class saimod_sys_files extends \SYSTEM\SAI\SaiModule { //public static function css(){} public static function js(){ - return array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_files/js/saimod_sys_files.js'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_files/js/saimod_sys_files.js'));} } \ No newline at end of file diff --git a/sai/modules/saimod_sys_files/tpl/saimod_sys_files.tpl b/sai/modules/saimod_sys_files/tpl/saimod_sys_files.tpl index c704698..2c01d1b 100644 --- a/sai/modules/saimod_sys_files/tpl/saimod_sys_files.tpl +++ b/sai/modules/saimod_sys_files/tpl/saimod_sys_files.tpl @@ -1,4 +1,5 @@

    ${sai_files_title}

    +
    ${sai_files_title_warning}

    IDCacheIDCache IdentType Data
    ${ID}${CacheID}${Ident}${cache}${ident}${type}
    ${name} ${extension} - ${url} + ${url} diff --git a/sai/modules/saimod_sys_git/saimod_sys_git.php b/sai/modules/saimod_sys_git/saimod_sys_git.php index 61ee0c1..d7affdf 100644 --- a/sai/modules/saimod_sys_git/saimod_sys_git.php +++ b/sai/modules/saimod_sys_git/saimod_sys_git.php @@ -5,7 +5,7 @@ class saimod_sys_git extends \SYSTEM\SAI\SaiModule { public static function sai_mod__SYSTEM_SAI_saimod_sys_git(){ $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_GIT); $vars = array_merge($vars,self::getGitInfo()); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_git/tpl/saimod_sys_git.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_git/tpl/saimod_sys_git.tpl'))->SERVERPATH(), $vars); } public static function getGitInfo(){ diff --git a/sai/modules/saimod_sys_langswitcher/saimod_sys_langswitcher.php b/sai/modules/saimod_sys_langswitcher/saimod_sys_langswitcher.php index 72da105..5ce391d 100644 --- a/sai/modules/saimod_sys_langswitcher/saimod_sys_langswitcher.php +++ b/sai/modules/saimod_sys_langswitcher/saimod_sys_langswitcher.php @@ -13,7 +13,7 @@ class saimod_sys_langswitcher extends \SYSTEM\SAI\SaiModule { $result = ''; $langs = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS); foreach($langs as $lang){ - $result .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_langswitcher/tpl/language.tpl'),array('lang' => $lang,'endpoint' => $endpoint));} + $result .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_langswitcher/tpl/language.tpl'))->SERVERPATH(),array('lang' => $lang,'endpoint' => $endpoint));} return $result; } diff --git a/sai/modules/saimod_sys_log/saimod_sys_log.php b/sai/modules/saimod_sys_log/saimod_sys_log.php index abec10c..8a998aa 100644 --- a/sai/modules/saimod_sys_log/saimod_sys_log.php +++ b/sai/modules/saimod_sys_log/saimod_sys_log.php @@ -22,7 +22,7 @@ class saimod_sys_log extends \SYSTEM\SAI\SaiModule { $vars['page_value'] = \round( $vars['log_today']+$vars['ip_today']*10+$vars['user_today']*100+ ($vars['log_week']+$vars['ip_week']*10+$vars['user_week']*100)/7+ ($vars['log_month']+$vars['ip_month']*10+$vars['user_week']*100)/31,0); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_analytics.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_log/tpl/saimod_sys_log_analytics.tpl'))->SERVERPATH(), $vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_log_action_stats(){ @@ -32,11 +32,11 @@ class saimod_sys_log extends \SYSTEM\SAI\SaiModule { file_exists(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CRON_LOG2SQLITE_PATH))){ $scanned_directory = array_diff(scandir(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CRON_LOG2SQLITE_PATH)), array('..', '.')); foreach($scanned_directory as $file){ - $vars['dbfile_entries'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_stats_menu.tpl'), array('file' => $file));} + $vars['dbfile_entries'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_log/tpl/saimod_sys_log_stats_menu.tpl'))->SERVERPATH(), array('file' => $file));} } //positioning problem //$vars['analytics'] = self::analytics(); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_stats.tpl'), $vars);} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_log/tpl/saimod_sys_log_stats.tpl'))->SERVERPATH(), $vars);} public static function sai_mod__SYSTEM_SAI_saimod_sys_log_action_stats_name_class_system($filter,$db){ $result = array(); @@ -309,30 +309,30 @@ class saimod_sys_log extends \SYSTEM\SAI\SaiModule { $r['time'] = \SYSTEM\time::time_ago_string(strtotime($r['time'])); $r['message'] = htmlspecialchars(substr($r['message'],0,255)); $r['request_uri'] = htmlspecialchars($r['request_uri']); - $vars['table'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_table_row.tpl'),$r); + $vars['table'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_log/tpl/saimod_sys_log_table_row.tpl'))->SERVERPATH(),$r); $count_filtered++; } $vars['pagination'] = ''; $vars['page_last'] = ceil($count/100)-1; for($i=0;$i < ceil($count/100);$i++){ $data = array('page' => $i,'search' => $search, 'filter' => $filter, 'active' => ($i == $page) ? 'active' : ''); - $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_pagination.tpl'), $data); + $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_log/tpl/saimod_sys_log_pagination.tpl'))->SERVERPATH(), $data); } $vars['count'] = $count_filtered.'/'.$count; $vars['error_filter'] = ''; $res = \SYSTEM\SQL\SYS_SAIMOD_LOG_FILTERS::QQ(); while($row = $res->next()){ $data = array('active' => ($filter == $row['class'] ? 'active' : ''), 'filter' => $row['class'], 'search' => $search); - $vars['error_filter'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_error_filter.tpl'),$data);} + $vars['error_filter'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_log/tpl/saimod_sys_log_error_filter.tpl'))->SERVERPATH(),$data);} $vars['active'] = ($filter == '%' ? 'active' : ''); $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_LOG)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl'),$vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_log/tpl/saimod_sys_log_filter.tpl'))->SERVERPATH(),$vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_log(){ $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_LOG); - $vars['PICPATH'] = \SYSTEM\WEBPATH(new \SYSTEM\PSAI(), 'modules/saimod_sys_log/img/'); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/tpl/saimod_sys_log.tpl'), $vars); + $vars['PICPATH'] = (new \SYSTEM\PSAI('modules/saimod_sys_log/img/'))->WEBPATH(false); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_log/tpl/saimod_sys_log.tpl'))->SERVERPATH(), $vars); } public static function tablerow_class($class){ @@ -358,5 +358,5 @@ class saimod_sys_log extends \SYSTEM\SAI\SaiModule { //public static function css(){} public static function js(){ - return array(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/js/saimod_sys_log.js'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_log/js/saimod_sys_log.js'));} } \ No newline at end of file diff --git a/sai/modules/saimod_sys_login/saimod_sys_login.php b/sai/modules/saimod_sys_login/saimod_sys_login.php index 2fa3ef0..2029658 100644 --- a/sai/modules/saimod_sys_login/saimod_sys_login.php +++ b/sai/modules/saimod_sys_login/saimod_sys_login.php @@ -12,9 +12,9 @@ class saimod_sys_login extends \SYSTEM\SAI\SaiModule { $vars['isadmin'] = \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI) ? "yes" : "no"; if(\SYSTEM\SECURITY\Security::isLoggedIn()){ - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_login/tpl/logout.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_login/tpl/logout.tpl'))->SERVERPATH(), $vars); } else { - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_login/tpl/login.tpl'), $vars);} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_login/tpl/login.tpl'))->SERVERPATH(), $vars);} } public static function sai_mod__SYSTEM_SAI_saimod_sys_login_action_logout(){ @@ -45,8 +45,8 @@ class saimod_sys_login extends \SYSTEM\SAI\SaiModule { //public static function css(){} public static function js(){ return array( \LIB\lib_jqbootstrapvalidation::js(), - \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_login/js/sai_sys_login_submit.js'), - \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'js/crypto/jquery.md5.js'), - \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'js/crypto/jquery.sha1.js')); + new \SYSTEM\PSAI('modules/saimod_sys_login/js/sai_sys_login_submit.js'), + new \SYSTEM\PSAI('js/crypto/jquery.md5.js'), + new \SYSTEM\PSAI('js/crypto/jquery.sha1.js')); } } \ No newline at end of file diff --git a/sai/modules/saimod_sys_mod/saimod_sys_mod.php b/sai/modules/saimod_sys_mod/saimod_sys_mod.php index 76fac79..998a5bd 100644 --- a/sai/modules/saimod_sys_mod/saimod_sys_mod.php +++ b/sai/modules/saimod_sys_mod/saimod_sys_mod.php @@ -1,6 +1,5 @@ ' : ''; $v['you'] = \call_user_func(array($mod, 'right_right')) ? '' : ''; - $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_mod/tpl/mod_tr.tpl'),$v); + $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_mod/tpl/mod_tr.tpl'))->SERVERPATH(),$v); } $mod = \SYSTEM\SAI\sai::getStartModule(); $start = array(); $start['start_class'] = $mod; $start['start_public'] = \call_user_func(array($mod, 'right_public')) ? '' : ''; $start['start_access'] = \call_user_func(array($mod, 'right_right')) ? '' : ''; - $vars['saistart'] = \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_mod/tpl/saistart.tpl'),$start); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_mod/tpl/mod_table.tpl'),$vars); + $vars['saistart'] = \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_mod/tpl/saistart.tpl'))->SERVERPATH(),$start); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_mod/tpl/mod_table.tpl'))->SERVERPATH(),$vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_mod_action_project(){ @@ -31,9 +30,9 @@ class saimod_sys_mod extends \SYSTEM\SAI\SaiModule { $v['mod'] = $mod; $v['public'] = \call_user_func(array($mod, 'right_public')) ? '' : ''; $v['you'] = \call_user_func(array($mod, 'right_right')) ? '' : ''; - $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_mod/tpl/mod_tr.tpl'),$v); + $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_mod/tpl/mod_tr.tpl'))->SERVERPATH(),$v); } - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_mod/tpl/mod_table.tpl'),$vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_mod/tpl/mod_table.tpl'))->SERVERPATH(),$vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_mod_action_lib(){ @@ -50,14 +49,14 @@ class saimod_sys_mod extends \SYSTEM\SAI\SaiModule { (\array_search('LIB\lib_css', $parents) ? 'css, ' : ''). (\array_search('LIB\lib_jscss', $parents) ? 'js, css, ' : ''); $vars2['interface'] = \substr($vars2['interface'],0,-2); - $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_mod/tpl/lib_tr.tpl'),$vars2); + $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_mod/tpl/lib_tr.tpl'))->SERVERPATH(),$vars2); } - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_mod/tpl/lib_table.tpl'),$vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_mod/tpl/lib_table.tpl'))->SERVERPATH(),$vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_mod(){ - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_mod/tpl/mods.tpl'),\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_MOD));} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_mod/tpl/mods.tpl'))->SERVERPATH(),\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_MOD));} //public static function html_li_menu(){return '
  • ${sai_menu_mod}
  • ';} public static function html_li_menu(){return '
  • ';} @@ -66,5 +65,5 @@ class saimod_sys_mod extends \SYSTEM\SAI\SaiModule { //public static function css(){} public static function js(){ - return array(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_mod/js/saimod_sys_mod.js'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_mod/js/saimod_sys_mod.js'));} } \ No newline at end of file diff --git a/sai/modules/saimod_sys_page/saimod_sys_page.php b/sai/modules/saimod_sys_page/saimod_sys_page.php index e618b90..e9467a4 100644 --- a/sai/modules/saimod_sys_page/saimod_sys_page.php +++ b/sai/modules/saimod_sys_page/saimod_sys_page.php @@ -7,8 +7,8 @@ class saimod_sys_page extends \SYSTEM\SAI\SaiModule { $res = \SYSTEM\SQL\SYS_SAIMOD_PAGE_GROUPS::QQ(); while($r = $res->next()){ - $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_page/tpl/tabopt.tpl'), array( 'tab_id' => $r['group']));} - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_page/tpl/saimod_sys_page.tpl'), $vars); + $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_page/tpl/tabopt.tpl'))->SERVERPATH(), array( 'tab_id' => $r['group']));} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_page/tpl/saimod_sys_page.tpl'))->SERVERPATH(), $vars); } public static function sai_mod__system_sai_saimod_sys_page_action_list($group=null){ @@ -21,18 +21,18 @@ class saimod_sys_page extends \SYSTEM\SAI\SaiModule { $tab['tab_id'] = $r['group']; $r['tr_class'] = self::tablerow_class($r['type']); $r['type'] = self::type_names($r['type']); - $tab['content'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_page/tpl/list_entry.tpl'), $r); + $tab['content'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_page/tpl/list_entry.tpl'))->SERVERPATH(), $r); } - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_page/tpl/saimod_sys_page_list.tpl'), $tab); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_page/tpl/saimod_sys_page_list.tpl'))->SERVERPATH(), $tab); } public static function sai_mod__system_sai_saimod_sys_page_action_deletedialog($ID,$group){ $res = \SYSTEM\SQL\SYS_SAIMOD_PAGE_SINGLE_SELECT::Q1(array($ID,$group)); $res = array_merge($res,\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_PAGE)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_page/tpl/delete_dialog.tpl'), $res); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_page/tpl/delete_dialog.tpl'))->SERVERPATH(), $res); } public static function sai_mod__system_sai_saimod_sys_page_action_newdialog(){ - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_page/tpl/new_dialog.tpl'),\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_PAGE));} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_page/tpl/new_dialog.tpl'))->SERVERPATH(),\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_PAGE));} public static function sai_mod__system_sai_saimod_sys_page_action_addcall($ID,$group,$type,$parentID,$parentValue,$name,$verify){ if(!\SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_API)){ @@ -72,7 +72,7 @@ class saimod_sys_page extends \SYSTEM\SAI\SaiModule { public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI) && \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_API);} public static function css(){ - return array(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_page/css/saimod_sys_page.css'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_page/css/saimod_sys_page.css'));} public static function js(){ - return array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_page/js/saimod_sys_page.js'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_page/js/saimod_sys_page.js'));} } \ No newline at end of file diff --git a/sai/modules/saimod_sys_security/saimod_sys_security.php b/sai/modules/saimod_sys_security/saimod_sys_security.php index a1e9311..3f6604c 100644 --- a/sai/modules/saimod_sys_security/saimod_sys_security.php +++ b/sai/modules/saimod_sys_security/saimod_sys_security.php @@ -4,25 +4,25 @@ namespace SYSTEM\SAI; class saimod_sys_security extends \SYSTEM\SAI\SaiModule { public static function sai_mod__SYSTEM_SAI_saimod_sys_security_action_groups(){ - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_groups.tpl'),\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_SECURITY));} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_groups.tpl'))->SERVERPATH(),\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_SECURITY));} public static function sai_mod__SYSTEM_SAI_saimod_sys_security_action_newright(){ - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_newright.tpl'),\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_SECURITY));} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_newright.tpl'))->SERVERPATH(),\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_SECURITY));} public static function sai_mod__SYSTEM_SAI_saimod_sys_security_action_rights(){ $rows = ''; $res = \SYSTEM\SQL\SYS_SAIMOD_SECURITY_RIGHTS::QQ(); while($r = $res->next()){ $r['right_edit_btn'] = \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_SECURITY_RIGHTS_EDIT) ? - \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/right_edit.tpl'),array('id' => $r['ID'])) : - \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/missing_edit_right.tpl')); - $rows .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_right.tpl'),$r);} + \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/right_edit.tpl'))->SERVERPATH(),array('id' => $r['ID'])) : + \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/missing_edit_right.tpl'))->SERVERPATH()); + $rows .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_right.tpl'))->SERVERPATH(),$r);} $vars['rows'] = $rows; $vars['addright_btn'] = \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_SECURITY_RIGHTS_EDIT) ? - \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/right_add.tpl')): - \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/missing_remove_right.tpl')); + \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/right_add.tpl'))->SERVERPATH()): + \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/missing_remove_right.tpl'))->SERVERPATH()); $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_SECURITY)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_rights.tpl'),$vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_rights.tpl'))->SERVERPATH(),$vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_security_action_deleterightuser($rightid,$userid){ @@ -49,7 +49,7 @@ class saimod_sys_security extends \SYSTEM\SAI\SaiModule { if(!\SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_SECURITY_RIGHTS_EDIT)){ return false;} $vars = \SYSTEM\SQL\SYS_SAIMOD_SECURITY_RIGHT_CHECK::Q1(array($id)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_deleteright.tpl'),$vars);} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_deleteright.tpl'))->SERVERPATH(),$vars);} public static function sai_mod__SYSTEM_SAI_saimod_sys_security_action_deleteright($id){ if(!\SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_SECURITY_RIGHTS_EDIT)){ @@ -65,13 +65,13 @@ class saimod_sys_security extends \SYSTEM\SAI\SaiModule { $r['class_row'] = \SYSTEM\SAI\saimod_sys_log::tablerow_class($r['class']); $r['time'] = \SYSTEM\time::time_ago_string(strtotime($r['time'])); $r['message'] = substr($r['message'],0,255); - $table .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_user_actions_row.tpl'),$r); + $table .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_user_actions_row.tpl'))->SERVERPATH(),$r); } $vars = array(); $vars['count'] = $count['count']; $vars['table'] = $table; $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_SECURITY)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_user_actions.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_user_actions.tpl'))->SERVERPATH(), $vars); } private static function user_rights($userid){ @@ -80,11 +80,11 @@ class saimod_sys_security extends \SYSTEM\SAI\SaiModule { while($r = $res->next()){ $r['user_id'] = $userid; $r['remove_btn'] = \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_SECURITY_RIGHTS_EDIT) ? - \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/right_remove.tpl'),array('id' => $r['ID'])) : - \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/missing_edit_right.tpl')); - $vars['user_rights_table'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_user_right.tpl'), $r);} + \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/right_remove.tpl'))->SERVERPATH(),array('id' => $r['ID'])) : + \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/missing_edit_right.tpl'))->SERVERPATH()); + $vars['user_rights_table'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_user_right.tpl'))->SERVERPATH(), $r);} - $vars['user_rights_add'] = \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/missing_add_right.tpl')); + $vars['user_rights_add'] = \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/missing_add_right.tpl'))->SERVERPATH()); if(\SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_SECURITY_RIGHTS_EDIT)){ $opts = ''; $res = \SYSTEM\SQL\SYS_SAIMOD_SECURITY_RIGHTS::QQ(); @@ -92,18 +92,18 @@ class saimod_sys_security extends \SYSTEM\SAI\SaiModule { while($r = $res->next()){ $r['selected'] = $b ? 'selected="selected"' : ''; $b = false; - $opts .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_user_right_add.tpl'), $r);} + $opts .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_user_right_add.tpl'))->SERVERPATH(), $r);} $v = array(); $v['user_id'] = $userid; $v['right_options'] = $opts; - $vars['user_rights_add'] = \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_user_rights_add.tpl'), $v); + $vars['user_rights_add'] = \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_user_rights_add.tpl'))->SERVERPATH(), $v); } $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_SECURITY)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_user_rights.tpl'), $vars);} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_user_rights.tpl'))->SERVERPATH(), $vars);} public static function sai_mod__SYSTEM_SAI_saimod_sys_security_action_stats(){ - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_stats.tpl'),\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_SECURITY)); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_stats.tpl'))->SERVERPATH(),\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_SECURITY)); } public static function sai_mod__SYSTEM_SAI_saimod_sys_security_action_user($username){ @@ -112,7 +112,7 @@ class saimod_sys_security extends \SYSTEM\SAI\SaiModule { $vars['user_rights'] = array_key_exists('id', $vars) ? self::user_rights($vars['id']) : ''; $vars['user_actions'] = array_key_exists('id', $vars) ? self::user_actions($vars['id']) : ''; $vars = array_merge($vars,\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_SECURITY)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_user_view.tpl'),$vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_user_view.tpl'))->SERVERPATH(),$vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_security_action_users($filter = "all",$search="%",$page=0){ @@ -130,30 +130,30 @@ class saimod_sys_security extends \SYSTEM\SAI\SaiModule { while(($r = $res->next()) && ($count_filtered < 100)){ $r['class'] = self::tablerow_class($r['last_active']); $r['time_elapsed'] = \SYSTEM\time::time_ago_string($r['last_active']); - $vars['table'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_user.tpl'),$r); + $vars['table'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_user.tpl'))->SERVERPATH(),$r); $count_filtered++; } $vars['pagination'] = ''; $vars['page_last'] = ceil($count/100)-1; for($i=0;$i < ceil($count/100);$i++){ $data = array('page' => $i,'search' => $search, 'filter' => $filter, 'active' => ($i == $page) ? 'active' : ''); - $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_pagination.tpl'), $data); + $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_pagination.tpl'))->SERVERPATH(), $data); } $vars['count'] = $count_filtered.'/'.$count; $vars['right_filter'] = ''; $res = \SYSTEM\SQL\SYS_SAIMOD_SECURITY_RIGHTS::QQ(); while($row = $res->next()){ $data = array('active' => ($filter == $row['ID'] ? 'active' : ''), 'filter' => $row['ID'], 'search' => $search, 'name' => $row['name']); - $vars['right_filter'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_right_filter.tpl'),$data);} + $vars['right_filter'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_right_filter.tpl'))->SERVERPATH(),$data);} $vars['active'] = ($filter == 'all' ? 'active' : ''); $vars = array_merge($vars,\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_SECURITY)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security_users.tpl'),$vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security_users.tpl'))->SERVERPATH(),$vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_security(){ $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_SECURITY); - $vars['PICPATH'] = \SYSTEM\WEBPATH(new \SYSTEM\PSAI(), 'modules/saimod_sys_log/img/'); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/tpl/saimod_sys_security.tpl'), $vars);} + $vars['PICPATH'] = (new \SYSTEM\PSAI('modules/saimod_sys_log/img/'))->WEBPATH(false); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_security/tpl/saimod_sys_security.tpl'))->SERVERPATH(), $vars);} private static function tablerow_class($last_active){ $time = time() - $last_active; @@ -173,7 +173,7 @@ class saimod_sys_security extends \SYSTEM\SAI\SaiModule { public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI) && \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_SECURITY);} public static function css(){ - return array(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/css/saimod_sys_security.css'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_security/css/saimod_sys_security.css'));} public static function js(){ - return array(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_security/js/saimod_sys_security.js'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_security/js/saimod_sys_security.js'));} } \ No newline at end of file diff --git a/sai/modules/saimod_sys_text/saimod_sys_text.php b/sai/modules/saimod_sys_text/saimod_sys_text.php index bc637b4..224815e 100644 --- a/sai/modules/saimod_sys_text/saimod_sys_text.php +++ b/sai/modules/saimod_sys_text/saimod_sys_text.php @@ -12,19 +12,19 @@ class saimod_sys_text extends \SYSTEM\SAI\SaiModule { $r['style'] = ''; if(substr($r['tag'],0,3) == 'sai'){ $r['style'] = 'display:none;';} - $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/tabopt.tpl'), $r);} - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text.tpl'), $vars); + $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_text/tpl/tabopt.tpl'))->SERVERPATH(), $r);} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_text/tpl/saimod_sys_text.tpl'))->SERVERPATH(), $vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_text_action_notag(){ $res = \SYSTEM\SQL\SYS_SAIMOD_TEXT_GETTEXTS_NOTAG::QQ(); $entries = ''; while($r = $res->next()){ - $entries .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl'), $r); + $entries .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl'))->SERVERPATH(), $r); } $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_TEXT); $vars['entries'] = $entries; - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_list.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_text/tpl/saimod_sys_text_list.tpl'))->SERVERPATH(), $vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_text_action_tag($tag = 'all',$filter = "all",$search="%",$page=0){ @@ -64,23 +64,23 @@ class saimod_sys_text extends \SYSTEM\SAI\SaiModule { $count_filtered = 0; $res->seek(100*$page); while(($r = $res->next()) && ($count_filtered < 100)){ - $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl'), $r); + $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_text/tpl/saimod_sys_text_list_entry.tpl'))->SERVERPATH(), $r); $count_filtered++;} $vars['pagination'] = ''; $vars['page_last'] = ceil($count/100)-1; for($i=0;$i < ceil($count/100);$i++){ $data = array('page' => $i,'search' => $search, 'filter' => $filter, 'active' => ($i == $page) ? 'active' : '', 'tag' => $tag); - $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_pagination.tpl'), $data); + $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_text/tpl/saimod_sys_text_pagination.tpl'))->SERVERPATH(), $data); } $vars['count'] = $count_filtered.'/'.$count; $vars['lang_filter'] = ''; $res = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS); foreach($res as $lang){ $data = array('active' => ($filter == $lang ? 'active' : ''), 'filter' => $lang, 'search' => $search, 'name' => $lang, 'tag' => $tag); - $vars['lang_filter'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_lang_filter.tpl'),$data);} + $vars['lang_filter'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_text/tpl/saimod_sys_text_lang_filter.tpl'))->SERVERPATH(),$data);} $vars['active'] = ($filter == 'all' ? 'active' : ''); $vars = array_merge($vars,\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_TEXT)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_list.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_text/tpl/saimod_sys_text_list.tpl'))->SERVERPATH(), $vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_text_action_edittext($id,$lang){ @@ -92,9 +92,9 @@ class saimod_sys_text extends \SYSTEM\SAI\SaiModule { $vars2['id'] = $id; $vars2['lang'] = $l; $vars2['default'] = ($l == $lang ? 'menu_lang_default' : ''); - $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/tabopt2.tpl'), $vars2); + $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_text/tpl/tabopt2.tpl'))->SERVERPATH(), $vars2); } - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_edit_langs.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_text/tpl/saimod_sys_text_edit_langs.tpl'))->SERVERPATH(), $vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_text_action_editor($id, $lang){ @@ -107,7 +107,7 @@ class saimod_sys_text extends \SYSTEM\SAI\SaiModule { foreach($tags as $tag){ $vars['tags'] .= $tag['tag'].', '; } - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/tpl/saimod_sys_text_edit_editor.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_text/tpl/saimod_sys_text_edit_editor.tpl'))->SERVERPATH(), $vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_text_action_save($id, $new_id, $lang, $tags, $text){ @@ -122,7 +122,7 @@ class saimod_sys_text extends \SYSTEM\SAI\SaiModule { public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI) && \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_LOCALE);} public static function css(){ - return array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/css/saimod_sys_text.css'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_text/css/saimod_sys_text.css'));} public static function js(){ - return array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_text/js/saimod_sys_text.js'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_text/js/saimod_sys_text.js'));} } \ No newline at end of file diff --git a/sai/modules/saimod_sys_todo/saimod_sys_todo.php b/sai/modules/saimod_sys_todo/saimod_sys_todo.php index 27b8469..1941d8f 100644 --- a/sai/modules/saimod_sys_todo/saimod_sys_todo.php +++ b/sai/modules/saimod_sys_todo/saimod_sys_todo.php @@ -40,13 +40,13 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { public static function sai_mod__SYSTEM_SAI_saimod_sys_todo(){ $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_TODO); - $vars['PICPATH'] = \SYSTEM\WEBPATH(new \SYSTEM\PSAI(), 'modules/saimod_sys_log/img/'); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/saimod_sys_todo.tpl'), $vars); + $vars['PICPATH'] = (new \SYSTEM\PSAI('modules/saimod_sys_log/img/'))->WEBPATH(false); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_todo/tpl/saimod_sys_todo.tpl'))->SERVERPATH(), $vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_todo_action_new(){ $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_TODO); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/saimod_sys_todo_new.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_todo/tpl/saimod_sys_todo_new.tpl'))->SERVERPATH(), $vars); } public static function sai_mod__SYSTEM_SAI_saimod_sys_todo_action_todolist($filter='all',$search='%',$page=0){ @@ -113,19 +113,19 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { $row['request_uri'] = htmlspecialchars($row['request_uri']); $row['openclose'] = $state == \SYSTEM\SQL\system_todo::FIELD_STATE_OPEN ? 'close' : 'open'; $row['message'] = str_replace("\n", '
    ', $row['message']); - $vars['todo_list_elements'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_user_list_element.tpl'), $row); + $vars['todo_list_elements'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_todo/tpl/todo_user_list_element.tpl'))->SERVERPATH(), $row); $count_filtered++; } $vars['pagination'] = ''; $vars['page_last'] = ceil($count/100)-1; for($i=0;$i < ceil($count/100);$i++){ $data = array('page' => $i,'search' => $search, 'filter' => $filter, 'active' => ($i == $page) ? 'active' : ''); - $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_list_pagination.tpl'), $data); + $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_todo/tpl/todo_list_pagination.tpl'))->SERVERPATH(), $data); } $vars['count'] = $count_filtered.'/'.$count; $vars['state'] = $state == \SYSTEM\SQL\system_todo::FIELD_STATE_OPEN ? 'todo' : 'todo(doto)'; $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_TODO)); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_list.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_todo/tpl/todo_list.tpl'))->SERVERPATH(), $vars); } public static function statistics(){ @@ -152,15 +152,15 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { $vars = array_merge($vars,\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_TODO)); $vars['entries'] = ''; foreach($vars['data'] as $stat){ - $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_stats_entry.tpl'), $stat); + $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_todo/tpl/todo_stats_entry.tpl'))->SERVERPATH(), $stat); } $vars['userstats'] = ''; $userstats = \SYSTEM\SQL\SYS_SAIMOD_TODO_STATS_USERS::QQ(); while($stat = $userstats->next()){ $stat['perc'] = sprintf("%.2f",($stat['state_closed'] / ($stat['state_open']+$stat['state_closed']))*100); - $vars['userstats'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_stats_users_entry.tpl'), $stat); + $vars['userstats'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_todo/tpl/todo_stats_users_entry.tpl'))->SERVERPATH(), $stat); } - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_stats.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_todo/tpl/todo_stats.tpl'))->SERVERPATH(), $vars); } private static function state($state){ @@ -219,12 +219,12 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { $vars['assignees'] = ''; $res = \SYSTEM\SQL\SYS_SAIMOD_TODO_ASSIGNEES::QQ(array($todo,$userid)); while($row = $res->next()){ - $vars['assignees'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user_assignee.tpl'), $row); + $vars['assignees'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user_assignee.tpl'))->SERVERPATH(), $row); } $vars = array_merge($vars,\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_TODO)); return $vars[\SYSTEM\SQL\system_todo::FIELD_TYPE] == \SYSTEM\SQL\system_todo::FIELD_TYPE_USER ? - \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user.tpl'), $vars) : - \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/saimod_sys_todo_todo.tpl'), $vars);} + \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user.tpl'))->SERVERPATH(), $vars) : + \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_todo/tpl/saimod_sys_todo_todo.tpl'))->SERVERPATH(), $vars);} public static function html_li_menu(){return '
  • ';} public static function right_public(){return false;} @@ -232,7 +232,7 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule { //public static function css(){} public static function js(){ - return array(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/js/saimod_sys_todo.js'));} + return array(new \SYSTEM\PSAI('modules/saimod_sys_todo/js/saimod_sys_todo.js'));} public static function report($message,$data){ $_POST = $data; //save data in post diff --git a/sai/modules/saistart_sys_sai/saistart_sys_sai.php b/sai/modules/saistart_sys_sai/saistart_sys_sai.php index dc34633..e992a8c 100644 --- a/sai/modules/saistart_sys_sai/saistart_sys_sai.php +++ b/sai/modules/saistart_sys_sai/saistart_sys_sai.php @@ -5,18 +5,18 @@ class saistart_sys_sai extends \SYSTEM\SAI\SaiModule { public static function sai_mod__SYSTEM_SAI_saistart_sys_sai(){ $vars = array_merge(array( 'content' => self::html_content()), \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_START)); - return \SYSTEM\PAGE\replace::replaceFile( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/tpl/saistart.tpl'),$vars);} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saistart_sys_sai/tpl/saistart.tpl'))->SERVERPATH(),$vars);} //public static function html_li_menu(){return '
  • ${sai_menu_start}
  • ';} public static function html_li_menu(){return '
  • ';} public static function right_public(){return true;} public static function right_right(){return true;} public static function css(){ - return array(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/css/saistart_sys_sai.css'));} + return array(new \SYSTEM\PSAI('modules/saistart_sys_sai/css/saistart_sys_sai.css'));} public static function js(){ - return array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/js/saistart_sys_sai.js'), - \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'js/crypto/jquery.md5.js'), - \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'js/crypto/jquery.sha1.js'), + return array( new \SYSTEM\PSAI('modules/saistart_sys_sai/js/saistart_sys_sai.js'), + new \SYSTEM\PSAI('js/crypto/jquery.md5.js'), + new \SYSTEM\PSAI('js/crypto/jquery.sha1.js'), \LIB\lib_jqbootstrapvalidation::js()); } @@ -26,7 +26,7 @@ class saistart_sys_sai extends \SYSTEM\SAI\SaiModule { $date = date("l M Y", time()); if(!\SYSTEM\SECURITY\Security::isLoggedIn() || !\SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI)){ - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/tpl/content.tpl'));} + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saistart_sys_sai/tpl/content.tpl'))->SERVERPATH());} $vars = array(); $vars['week_number'] = $week_number; $vars['date'] = $date; @@ -41,12 +41,12 @@ class saistart_sys_sai extends \SYSTEM\SAI\SaiModule { $userstats = \SYSTEM\SQL\SYS_SAIMOD_TODO_STATS_USERS::QQ(); while($stat = $userstats->next()){ $stat['perc'] = round($stat['state_closed'] / ($stat['state_open']+$stat['state_closed']),2)*100; - $vars['userstats'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_todo/tpl/todo_stats_users_entry.tpl'), $stat); + $vars['userstats'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_todo/tpl/todo_stats_users_entry.tpl'))->SERVERPATH(), $stat); } $vars = array_merge( $vars, \SYSTEM\SAI\saimod_sys_todo::statistics(), \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_START), \SYSTEM\SAI\saimod_sys_git::getGitInfo()); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/tpl/content_loggedin.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saistart_sys_sai/tpl/content_loggedin.tpl'))->SERVERPATH(), $vars); } } \ No newline at end of file diff --git a/sai/page/default_page.php b/sai/page/default_page.php index 004c18e..6ecc663 100644 --- a/sai/page/default_page.php +++ b/sai/page/default_page.php @@ -31,26 +31,25 @@ class default_page extends \SYSTEM\PAGE\Page { throw new \SYSTEM\LOG\ERROR('Your SAI-Start-Module haz a Problem - either it does not exist or it is not public - which is required!');} private static function css(){ - $result = ''. - ''. - ''. - ''. - ''; - return $result; + return \SYSTEM\HTML\html::link(\LIB\lib_bootstrap::css()->WEBPATH(false)). + \SYSTEM\HTML\html::link(\LIB\lib_tablesorter::css()->WEBPATH(false)). + \SYSTEM\HTML\html::link(\SYSTEM\CACHE\cache_css::url( + array( \LIB\lib_system::css(), + new \SYSTEM\PSAI('page/css/sai_classes.css'), + new \SYSTEM\PSAI('page/css/sai.css')))); } private static function js(){ - $result = ''. - ''. - ''. - ''. - ''. - ''. - ''. - //''. - ''. - ''; - return $result; + return \SYSTEM\HTML\html::script(\LIB\lib_jquery::js()->WEBPATH()). + \SYSTEM\HTML\html::script(\LIB\lib_bootstrap::js()->WEBPATH()). + \SYSTEM\HTML\html::script(\LIB\lib_tablesorter::js()->WEBPATH()). + \SYSTEM\HTML\html::script(\LIB\lib_bootstrap_growl::js()->WEBPATH()). + \SYSTEM\HTML\html::script(\LIB\lib_tinymce::js()->WEBPATH(false)). + \SYSTEM\HTML\html::script( \SYSTEM\CACHE\cache_js::url( + array( \LIB\lib_system::js(), + new \SYSTEM\PSAI('page/js/sai.js')))). + \SYSTEM\HTML\html::script('https://www.google.com/jsapi'). + ''; } public function html($_escaped_fragment_ = NULL){ @@ -66,6 +65,6 @@ class default_page extends \SYSTEM\PAGE\Page { $vars = array_merge($vars,\SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_DEFAULT), array( 'project' => \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_PROJECT), 'project_url' => \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL))); - return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'page/tpl/sai.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('page/tpl/sai.tpl'))->SERVERPATH(), $vars); } } \ No newline at end of file diff --git a/sql/qt/DATA_SYSTEM_API.php b/sql/qt/DATA_SYSTEM_API.php index 6c79ddc..3c48826 100644 --- a/sql/qt/DATA_SYSTEM_API.php +++ b/sql/qt/DATA_SYSTEM_API.php @@ -3,13 +3,13 @@ namespace SYSTEM\SQL; class DATA_SYSTEM_API extends \SYSTEM\DB\QI { public static function get_class(){return \get_class();} public static function files_pgsql(){ - return array( \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/data/system_api.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/data/system_api_default.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/data/system_sai_api.sql')); + return array( (new \SYSTEM\PSQL('/qt/pgsql/data/system_api.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/pgsql/data/system_api_default.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/pgsql/data/system_sai_api.sql'))->SERVERPATH()); } public static function files_mysql(){ - return array( \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/data/system_api.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/data/system_api_default.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/data/system_sai_api.sql')); + return array( (new \SYSTEM\PSQL('/qt/mysql/data/system_api.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/mysql/data/system_api_default.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/mysql/data/system_sai_api.sql'))->SERVERPATH()); } } \ No newline at end of file diff --git a/sql/qt/DATA_SYSTEM_CRON.php b/sql/qt/DATA_SYSTEM_CRON.php index 0fdf0c9..91b41ad 100644 --- a/sql/qt/DATA_SYSTEM_CRON.php +++ b/sql/qt/DATA_SYSTEM_CRON.php @@ -3,9 +3,9 @@ namespace SYSTEM\SQL; class DATA_SYSTEM_CRON extends \SYSTEM\DB\QI { public static function get_class(){return \get_class();} public static function files_pgsql(){ - return array( \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/data/system_cron.sql')); + return array( (new \SYSTEM\PSQL('/qt/pgsql/data/system_cron.sql'))->SERVERPATH()); } public static function files_mysql(){ - return array( \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/data/system_cron.sql')); + return array( (new \SYSTEM\PSQL('/qt/mysql/data/system_cron.sql'))->SERVERPATH()); } } \ No newline at end of file diff --git a/sql/qt/DATA_SYSTEM_PAGE.php b/sql/qt/DATA_SYSTEM_PAGE.php index 048eb38..ef5f650 100644 --- a/sql/qt/DATA_SYSTEM_PAGE.php +++ b/sql/qt/DATA_SYSTEM_PAGE.php @@ -3,9 +3,9 @@ namespace SYSTEM\SQL; class DATA_SYSTEM_PAGE extends \SYSTEM\DB\QI { public static function get_class(){return \get_class();} public static function files_pgsql(){ - return array( \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/data/system_page.sql')); + return array( (new \SYSTEM\PSQL('/qt/pgsql/data/system_page.sql'))->SERVERPATH()); } public static function files_mysql(){ - return array( \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/data/system_page.sql')); + return array( (new \SYSTEM\PSQL('/qt/mysql/data/system_page.sql'))->SERVERPATH()); } } \ No newline at end of file diff --git a/sql/qt/DATA_SYSTEM_RIGHTS.php b/sql/qt/DATA_SYSTEM_RIGHTS.php index 8d2ed40..5182bd3 100644 --- a/sql/qt/DATA_SYSTEM_RIGHTS.php +++ b/sql/qt/DATA_SYSTEM_RIGHTS.php @@ -3,9 +3,9 @@ namespace SYSTEM\SQL; class DATA_SYSTEM_RIGHTS extends \SYSTEM\DB\QI { public static function get_class(){return \get_class();} public static function files_pgsql(){ - return array( \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/data/system_rights.sql')); + return array( (new \SYSTEM\PSQL('/qt/pgsql/data/system_rights.sql'))->SERVERPATH()); } public static function files_mysql(){ - return array( \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/data/system_rights.sql')); + return array( (new \SYSTEM\PSQL('/qt/mysql/data/system_rights.sql'))->SERVERPATH()); } } \ No newline at end of file diff --git a/sql/qt/DATA_SYSTEM_TEXT.php b/sql/qt/DATA_SYSTEM_TEXT.php index f15bc03..d00ef30 100644 --- a/sql/qt/DATA_SYSTEM_TEXT.php +++ b/sql/qt/DATA_SYSTEM_TEXT.php @@ -3,9 +3,9 @@ namespace SYSTEM\SQL; class DATA_SYSTEM_TEXT extends \SYSTEM\DB\QI { public static function get_class(){return \get_class();} public static function files_pgsql(){ - return array( \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/data/system_text.sql')); + return array( (new \SYSTEM\PSQL('/qt/pgsql/data/system_text.sql'))->SERVERPATH()); } public static function files_mysql(){ - return array( \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/data/system_text.sql')); + return array( (new \SYSTEM\PSQL('/qt/mysql/data/system_text.sql'))->SERVERPATH()); } } \ No newline at end of file diff --git a/sql/qt/SCHEMA_SYSTEM.php b/sql/qt/SCHEMA_SYSTEM.php index 6e76922..2760d35 100644 --- a/sql/qt/SCHEMA_SYSTEM.php +++ b/sql/qt/SCHEMA_SYSTEM.php @@ -3,31 +3,31 @@ namespace SYSTEM\SQL; class SCHEMA_SYSTEM extends \SYSTEM\DB\QI { public static function get_class(){return \get_class();} public static function files_pgsql(){ - return array( \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/schema/system_api.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/schema/system_cache.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/schema/system_cron.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/schema/system_log.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/schema/system_page.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/schema/system_rights.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/schema/system_text.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/schema/system_text_tag.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/schema/system_todo.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/schema/system_todo_assign.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/schema/system_user.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/pgsql/schema/system_user_to_rights.sql')); + return array( (new \SYSTEM\PSQL('/qt/pgsql/schema/system_api.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/pgsql/schema/system_cache.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/pgsql/schema/system_cron.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/pgsql/schema/system_log.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/pgsql/schema/system_page.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/pgsql/schema/system_rights.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/pgsql/schema/system_text.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/pgsql/schema/system_text_tag.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/pgsql/schema/system_todo.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/pgsql/schema/system_todo_assign.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/pgsql/schema/system_user.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/pgsql/schema/system_user_to_rights.sql'))->SERVERPATH()); } public static function files_mysql(){ - return array( \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/schema/system_api.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/schema/system_cache.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/schema/system_cron.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/schema/system_log.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/schema/system_page.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/schema/system_rights.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/schema/system_text.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/schema/system_text_tag.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/schema/system_todo.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/schema/system_todo_assign.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/schema/system_user.sql'), - \SYSTEM\SERVERPATH(new \SYSTEM\PSQL(),'/qt/mysql/schema/system_user_to_rights.sql')); + return array( (new \SYSTEM\PSQL('/qt/mysql/schema/system_api.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/mysql/schema/system_cache.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/mysql/schema/system_cron.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/mysql/schema/system_log.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/mysql/schema/system_page.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/mysql/schema/system_rights.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/mysql/schema/system_text.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/mysql/schema/system_text_tag.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/mysql/schema/system_todo.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/mysql/schema/system_todo_assign.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/mysql/schema/system_user.sql'))->SERVERPATH(), + (new \SYSTEM\PSQL('/qt/mysql/schema/system_user_to_rights.sql'))->SERVERPATH()); } } \ No newline at end of file diff --git a/sql/qt/mysql/data/system_api.sql b/sql/qt/mysql/data/system_api.sql index 8e48fb9..5740001 100644 --- a/sql/qt/mysql/data/system_api.sql +++ b/sql/qt/mysql/data/system_api.sql @@ -28,6 +28,10 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (60, 0, 2, 10, 'bug', 'message', 'STRING'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (61, 0, 2, 10, 'bug', 'data', 'JSON'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (70, 0, 2, 10, 'cache', 'id', 'INT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (71, 0, 2, 10, 'cache', 'ident', 'STRING'); + INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (90, 0, 4, -1, NULL, '_lang', 'LANG'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (91, 0, 4, -1, NULL, '_result', 'RESULT'); -INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (92, 0, 4, -1, NULL, '_escaped_fragment_', 'STRING'); \ No newline at end of file +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (92, 0, 4, -1, NULL, '_escaped_fragment_', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (93, 0, 4, -1, NULL, '_', 'STRING'); \ No newline at end of file diff --git a/sql/qt/mysql/data/system_sai_api.sql b/sql/qt/mysql/data/system_sai_api.sql index 454bc53..1b3c56a 100644 --- a/sql/qt/mysql/data/system_sai_api.sql +++ b/sql/qt/mysql/data/system_sai_api.sql @@ -29,9 +29,12 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (56, 42, 2, 55, NULL, 'group', 'UINT'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (60, 42, 2, 10, 'bug', 'message', 'STRING'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (61, 42, 2, 10, 'bug', 'data', 'JSON'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (70, 42, 2, 10, 'cache', 'id', 'INT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (71, 42, 2, 10, 'cache', 'ident', 'STRING'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (90, 42, 4, -1, NULL, '_lang', 'LANG'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (91, 42, 4, -1, NULL, '_result', 'RESULT'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (92, 42, 4, -1, NULL, '_escaped_fragment_', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (93, 42, 4, -1, NULL, '_', 'STRING'); -- specific stuff for mods INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (100, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_login', 'action', NULL); diff --git a/sql/qt/mysql/data/system_text.sql b/sql/qt/mysql/data/system_text.sql index dedb442..de998ac 100644 --- a/sql/qt/mysql/data/system_text.sql +++ b/sql/qt/mysql/data/system_text.sql @@ -688,11 +688,19 @@ DELETE FROM `system_text` WHERE id = 'sai_files_title'; DELETE FROM `system_text_tag` WHERE id = 'sai_files_title'; INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_files_title', 'deDE', 'System Dateien', 3, 3, '2015-05-16 13:53:33', '2015-05-16 13:53:33'); - INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_files_title', 'enUS', 'System ファイル', 2, 1, '2015-04-20 16:18:27', '2015-04-20 16:18:27'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_files_title', 'enUS', 'System Files', 2, 1, '2015-04-20 16:18:27', '2015-04-20 16:18:27'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_files_title', 'jaJA', 'System ファイル', 2, 1, '2015-04-20 16:18:27', '2015-04-20 16:18:27'); INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_files_title', 'frFR', 'System Fichiers', 3, 3, '2015-04-20 19:15:58', '2015-04-20 19:15:58'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_files_title', 'sai'); INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_files_title', 'sai_files'); + DELETE FROM `system_text` WHERE id = 'sai_files_title_warning'; + DELETE FROM `system_text_tag` WHERE id = 'sai_files_title_warning'; + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_files_title_warning', 'deDE', 'Bitte verkleinern Sie Bilder bevor Sie diese auf Ihrer Seite einbinden!', 3, 3, '2015-05-16 13:53:33', '2015-05-16 13:53:33'); + INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_files_title_warning', 'enUS', 'Please minify pictures before you embed them in your page.', 2, 1, '2015-04-20 16:18:27', '2015-04-20 16:18:27'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_files_title_warning', 'sai'); + INSERT INTO `system_text_tag` (`id`, `tag`) VALUES ('sai_files_title_warning', 'sai_files'); + DELETE FROM `system_text` WHERE id = 'sai_log_latest_entries'; DELETE FROM `system_text_tag` WHERE id = 'sai_log_latest_entries'; INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('sai_log_latest_entries', 'deDE', 'letzten Log Einträge', 0, 0, '2015-04-16 23:26:52', '0000-00-00 00:00:00'); diff --git a/sql/qt/mysql/schema/system_cache.sql b/sql/qt/mysql/schema/system_cache.sql index 18737d4..2708e0c 100644 --- a/sql/qt/mysql/schema/system_cache.sql +++ b/sql/qt/mysql/schema/system_cache.sql @@ -1,9 +1,10 @@ CREATE TABLE `system_cache` ( - `ID` INT(10) NOT NULL AUTO_INCREMENT, - `CacheID` INT(10) NOT NULL, - `Ident` CHAR(255) NOT NULL, - `data` BINARY(255) NOT NULL, - PRIMARY KEY (`ID`) + `cache` INT(10) NOT NULL, + `ident` CHAR(255) NOT NULL, + `type` CHAR(255) NOT NULL, + `data` MEDIUMTEXT NOT NULL, + PRIMARY KEY (`cache`, `ident`) ) COLLATE='utf8_general_ci' -ENGINE=MyISAM; \ No newline at end of file +ENGINE=MyISAM +; \ No newline at end of file diff --git a/system/path.php b/system/path.php deleted file mode 100644 index d013031..0000000 --- a/system/path.php +++ /dev/null @@ -1,46 +0,0 @@ -'; -const C_SUBPATH = ''; - -abstract class PATH { - static public function getPath(){ - throw new \RuntimeException("Not Implemented");} -} - -class PROOT extends PATH { - static public function getPath(){ - return C_ROOT.C_SUBPATH;} -} - -class PSYSTEM extends PATH { - static public function getPath(){ - return C_ROOT.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL).C_SUBPATH;} -} - -class PSAI extends PATH { - static public function getPath(){ - return C_ROOT.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL).'sai/'.C_SUBPATH;} -} - -class PLIB extends PATH { - static public function getPath(){ - return C_ROOT.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL).'lib/'.C_SUBPATH;} -} - -class PSQL extends PATH { - static public function getPath(){ - return C_ROOT.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL).'sql/'.C_SUBPATH;} -} - -function SERVERPATH(\SYSTEM\PATH $basepath, $subpath = ''){ - return str_replace( array(C_ROOT,C_SUBPATH), - array(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH),$subpath), - $basepath->getPath()); -} -function WEBPATH(\SYSTEM\PATH $basepath, $subpath = ''){ - return str_replace( array(C_ROOT,C_SUBPATH), - array(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL) ,$subpath), - $basepath->getPath()); -} \ No newline at end of file