$folder){ $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((new \SYSTEM\PSAI('modules/saimod_sys_files/tpl/saimod_sys_files.tpl'))->SERVERPATH(), $vars); } /** * Generate the HTML for the one Files Directory * * @param string $name Name of the Files Directory * @return string Returns HTML */ public static function sai_mod__SYSTEM_SAI_saimod_sys_files_action_tab($name = 'sai'){ $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' => './files/'.$name.'/'.$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);} /** * Generate
  • Menu for the Saimod * * @return string Returns
  • Menu for the Saimod */ public static function menu(){ return new sai_module_menu( 2, sai_module_menu::POISITION_LEFT, sai_module_menu::DIVIDER_NONE, \SYSTEM\PAGE\replace::replaceFile((new \SYSTEM\PSAI('modules/saimod_sys_files/tpl/menu.tpl'))->SERVERPATH()));} /** * Returns if the Saimod is public(access for everyone) * * @return boolean Returns if the Saimod is public(true) or not(false) */ public static function right_public(){return false;} /** * Returns if the requesting user has the required rights to access the Saimod * * @return boolean Returns true if the user can access */ public static function right_right(){return \SYSTEM\SECURITY\security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI) && \SYSTEM\SECURITY\security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_FILES);} /** * Get all js System Paths required for this Saimod * * @return array Returns array of Pathobjects pointing to the saimods js */ public static function js(){ return array(new \SYSTEM\PSAI('modules/saimod_sys_files/js/saimod_sys_files.js'));} }