Пример #1
0
 public function __construct($string_id, $code = 0, $previous = NULL, $locale = NULL)
 {
     $message = \SYSTEM\PAGE\text::get($string_id, $locale);
     if (!$message) {
         throw new \SYSTEM\LOG\ERROR("Could not retrive Errortranslation: " . $string_id);
     }
     parent::__construct($message, $code, $previous);
 }
Пример #2
0
 public static function sai_mod__SYSTEM_SAI_saimod_sys_docu()
 {
     $phpdocconfigs = \SYSTEM\DOCU\docu::getAll();
     $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_DOCU);
     $vars['tabopts'] = '';
     foreach ($phpdocconfigs as $config) {
         $vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_docu/tpl/tabopt.tpl'))->SERVERPATH(), array('tab_id' => $config['id'], 'tab_id_pretty' => $config['title']));
     }
     return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_docu/tpl/saimod_sys_docu.tpl'))->SERVERPATH(), $vars);
 }
Пример #3
0
 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((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((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((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((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((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((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((new \SYSTEM\PSAI('modules/saimod_sys_config/tpl/config_database.tpl'))->SERVERPATH(), $vars);
 }
Пример #4
0
 public static function sai_mod__SYSTEM_SAI_saimod_sys_cache()
 {
     $vars = array();
     $vars['count'] = \SYSTEM\SQL\SYS_SAIMOD_CACHE_COUNT::Q1()['count'];
     $vars['entries'] = '';
     $res = \SYSTEM\SQL\SYS_SAIMOD_CACHE::QQ();
     while ($r = $res->next()) {
         $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);
     }
     $vars = array_merge($vars, \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_CACHE));
     return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_cache/tpl/saimod_sys_cache.tpl'))->SERVERPATH(), $vars);
 }
Пример #5
0
 public static function sai_mod__SYSTEM_SAI_saimod_sys_files_action_tab($name = 'sys')
 {
     $result = '';
     $cat = \SYSTEM\FILES\files::get($name);
     $i = 0;
     foreach ($cat as $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((new \SYSTEM\PSAI('modules/saimod_sys_files/tpl/saimod_sys_files_list.tpl'))->SERVERPATH(), $vars);
 }
Пример #6
0
 public function html($_escaped_fragment_ = NULL)
 {
     $vars = array();
     $vars['css'] = self::css();
     $vars['js'] = '';
     if (!$_escaped_fragment_) {
         $vars['js'] = self::js();
     }
     $vars['menu_languages'] = \SYSTEM\SAI\saimod_sys_langswitcher::lang_menu('./sai.php');
     $vars['menu_start'] = self::menu_start();
     $vars['menu_sys'] = self::menu_sys();
     $vars['menu_proj'] = self::menu_proj();
     $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((new \SYSTEM\PSAI('page/tpl/sai.tpl'))->SERVERPATH(), $vars);
 }
Пример #7
0
 public static function sai_mod__SYSTEM_SAI_saimod_sys_cron()
 {
     $vars['content'] = '';
     $vars['last_visit'] = \SYSTEM\time::time_ago_string(strtotime(\SYSTEM\CRON\cron::last_visit()));
     $res = \SYSTEM\SQL\SYS_SAIMOD_CRON::QQ();
     $i = 0;
     while ($r = $res->next()) {
         $r['selected_0'] = $r['selected_1'] = $r['selected_2'] = $r['selected_3'] = '';
         $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((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((new \SYSTEM\PSAI('modules/saimod_sys_cron/tpl/tabs.tpl'))->SERVERPATH(), $vars);
 }
Пример #8
0
 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((new \SYSTEM\PSAI('modules/saimod_sys_git/tpl/saimod_sys_git.tpl'))->SERVERPATH(), $vars);
 }
Пример #9
0
 public static function sai_mod__SYSTEM_SAI_saimod_sys_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));
 }
Пример #10
0
 public static function sai_mod__SYSTEM_SAI_saimod_sys_log()
 {
     $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_LOG);
     $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);
 }
Пример #11
0
 public static function sai_mod__SYSTEM_SAI_saimod_sys_text_action_delete($id, $lang = null)
 {
     return \SYSTEM\PAGE\text::delete($id, $lang) ? \SYSTEM\LOG\JsonResult::ok() : \SYSTEM\LOG\JsonResult::fail();
 }
Пример #12
0
 public static function sai_mod__SYSTEM_SAI_saimod_sys_todo_action_todo($todo)
 {
     $userid = \SYSTEM\SECURITY\Security::getUser()->id;
     $vars = \SYSTEM\SQL\SYS_SAIMOD_TODO_TODO::Q1(array($todo, $userid));
     $vars['trace'] = implode('</br>', array_slice(explode('#', $vars['trace']), 1, -1));
     $vars['display_assign'] = $vars['assignee_id'] != $userid ? '' : 'display: none;';
     $vars['display_deassign'] = $vars['assignee_id'] == $userid ? '' : 'display: none;';
     $vars['assignees'] = '';
     $res = \SYSTEM\SQL\SYS_SAIMOD_TODO_ASSIGNEES::QQ(array($todo, $userid));
     while ($row = $res->next()) {
         $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((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);
 }
Пример #13
0
 public static function sai_mod__system_sai_saimod_sys_api_action_newdialog()
 {
     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));
 }
Пример #14
0
 public static function sai_mod__SYSTEM_SAI_saimod_sys_login_action_registerform()
 {
     $vars = \SYSTEM\PAGE\text::tag(\SYSTEM\SQL\system_text::TAG_SAI_LOGIN);
     return \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_login/tpl/register.tpl'))->SERVERPATH(), $vars);
 }