/** * Форма фхода в админку * @access protected */ public function admin() { $args = request::get(array('user', 'secret')); $data = array('LC' => LC::get()); try { if (!empty($args)) { authenticate::login(); } } catch (Exception $e) { dbg::write($e->getMessage(), LOG_PATH . 'adm_access.log'); $data['errors'] = $e->getMessage(); } if (!authenticate::is_logged()) { $tmpl = new tmpl($this->pwd() . 'login.html'); response::send($tmpl->parse($data), 'html'); } else { response::redirect('/xxx/'); } }
/** * Main Home Tab */ protected function sys_home() { $tmpl = new tmpl($this->pwd() . 'home.js'); response::send($tmpl->parse($this), 'js'); }
/** * Parse tmpl according with THEME INSTANCE OR default options * @access public * @param string $tmpl_name array() $data to parse out * @return parsed template tmpl2 */ public function parse_tmpl($template_file_name, $data) { if ($this->UI_LANG) { $data = array_merge($data, $this->UI_LANG); } if ($tmpl_path = $this->get_resource_path($template_file_name, 'absolute')) { $tmpl = new tmpl($tmpl_path); $html = $tmpl->parse($data); return $html; } else { $dbgs = array_shift(debug_backtrace()); dbg::write("TEMPLATE WAS NOT FOUND at user_interface::parse_tmpl() \nCall from:..... " . $dbgs['file'] . "\nline:.......... " . $dbgs['line'] . "\ntemplate: {$template_file_name}\npath1: {$tmpl_path} \npath2: {$tmpl_path2}"); } return false; }
/** * ExtJs Form */ protected function sys_item_form() { $tmpl = new tmpl($this->pwd() . 'item_form.js'); response::send($tmpl->parse($this), 'js'); }
/** * ExtJS Grid of available entry points */ protected function sys_interfaces() { $tmpl = new tmpl($this->pwd() . 'interfaces.js'); response::send($tmpl->parse($this), 'js'); }
protected function sys_browser() { $tmpl = new tmpl($this->pwd() . 'file_browser.html'); response::send($tmpl->parse($this), 'html'); }
/** * Простой список пользователей, с возможностью выбора */ protected function sys_user_list() { $tmpl = new tmpl($this->pwd() . 'user_list.js'); response::send($tmpl->parse($this), 'js'); }