示例#1
0
 private static function menu_start()
 {
     $mod = \SYSTEM\SAI\sai::getStartModule();
     if (\call_user_func(array($mod, 'right_public')) || \call_user_func(array($mod, 'right_right'))) {
         return \call_user_func(array($mod, 'html_li_menu'));
     }
     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!');
 }
示例#2
0
 public static function get_class($params = NULL)
 {
     if (isset($params[\SYSTEM\SAI\saigui::SAI_MOD_POSTFIELD])) {
         $classname = \str_replace('.', '\\', $params[\SYSTEM\SAI\saigui::SAI_MOD_POSTFIELD]);
         $mods = \SYSTEM\SAI\sai::getAllModules();
         if ($classname && \array_search($classname, $mods) !== false && (\call_user_func(array($classname, 'right_public')) || \call_user_func(array($classname, 'right_right')))) {
             return $classname;
         } else {
             return NULL;
         }
     }
     return self::class;
 }
示例#3
0
 public static function sai_mod__SYSTEM_SAI_saimod_sys_mod_action_project()
 {
     $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_MOD);
     $vars['entries'] = $vars['saistart'] = '';
     $mods = \SYSTEM\SAI\sai::getModules();
     foreach ($mods as $mod) {
         $v = array();
         $v['mod'] = $mod;
         $v['public'] = \call_user_func(array($mod, 'right_public')) ? '<span class="glyphicon glyphicon-ok"></span>' : '<span class="glyphicon glyphicon-remove"></span>';
         $v['you'] = \call_user_func(array($mod, 'right_right')) ? '<span class="glyphicon glyphicon-ok"></span>' : '<span class="glyphicon glyphicon-remove"></span>';
         $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_mod/tpl/mod_tr.tpl'))->SERVERPATH(), $v);
     }
     return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_mod/tpl/mod_table.tpl'))->SERVERPATH(), $vars);
 }
示例#4
0
 public function html()
 {
     //register docu here, we require path so system must be started
     \SYSTEM\DOCU\docu::register(array('id' => 'system', 'inpath' => new \SYSTEM\PSYSTEM(), 'outpath' => new \SYSTEM\PSYSTEM('docu/system/'), 'inpath_md' => new \SYSTEM\PSYSTEM('docu/system/structure.xml'), 'outpath_md' => new \SYSTEM\PSYSTEM('docu/system_wiki/'), 'cachepath' => new \SYSTEM\PSYSTEM('docu/system/cache/'), 'ignore' => array('lib/animate/*', 'lib/bootstrap/*', 'lib/bootstrap_growl/*', 'lib/git/*', 'lib/jqbootstrapvalidation/*', 'lib/jquery/*', 'lib/lettering/*', 'lib/markdown/*', 'lib/minify/*', 'lib/phpdocumentor/*', 'lib/scssphp/*', 'lib/tablesorter/*', 'lib/texttilate/*', 'lib/tinymce/*'), 'sourcecode' => true, 'parseprivate' => false, 'title' => 'SYSTEM - PHP Framework'));
     \SYSTEM\SECURITY\Security::isLoggedIn();
     // refresh session
     //Direct JSON Input
     $pg = json_decode(file_get_contents("php://input"), true);
     if (!$pg) {
         $pg = array_merge($_POST, $_GET);
     }
     if (isset($pg[self::SAI_MOD_POSTFIELD])) {
         $classname = \str_replace('.', '\\', $pg[self::SAI_MOD_POSTFIELD]);
         $pg[self::SAI_MOD_POSTFIELD] = \str_replace('.', '_', $pg[self::SAI_MOD_POSTFIELD]);
         $mods = \SYSTEM\SAI\sai::getAllModules();
         if ($classname && \array_search($classname, $mods) !== false && (\call_user_func(array($classname, 'right_public')) || \call_user_func(array($classname, 'right_right')))) {
             return \SYSTEM\API\api::run('\\SYSTEM\\API\\verify', $classname, $pg, 42, true, false);
         } else {
             return '<meta http-equiv="refresh" content="0; url=./sai.php">You are no longer logged in. Page reload in 5sec...';
         }
     } else {
         return \SYSTEM\API\api::run('\\SYSTEM\\API\\verify', '\\SYSTEM\\SAI\\SaiModule', $pg, 42, false, true);
     }
 }