Ejemplo n.º 1
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);
 }
Ejemplo n.º 2
0
 public static function call_files($cat, $id = null)
 {
     return \SYSTEM\FILES\files::get($cat, $id, true);
 }