protected function module_login_page() { //get login panel $login_panel = $this->users->login(); $login_panel[1] = browser\page::show_block($login_panel[0], $login_panel[1], 'BLOCK'); return $this->module_load($login_panel, true); }
public function show_content($show_content = true) { //this function run from page class. // this function load plugin and run controller //checking for that plugin is enabled if ($this->obj_plugin->is_enabled($this->plugin)) { $PluginName = '\\core\\plugin\\' . $this->plugin; $plugin = new $PluginName(); //run action directly if (method_exists($plugin, $this->action)) { $content = call_user_func(array($plugin, $this->action), 'content'); } else { if (method_exists($plugin, 'default')) { $content = call_user_func(array($plugin, 'default'), 'content'); } //show 404 page not found page $plugin = new plugin\msg(); $content = call_user_func(array($plugin, 'msg_404')); //jump user to 404 page $this->jump_page(array('service', '1', 'plugin', 'msg', 'action', 'msg404')); } } else { //plugin is not enabled //show 404 page not found page $plugin = new plugin\msg(); $content = call_user_func(array($plugin, 'msg_404')); //jump user to 404 page $this->jump_page(array('service', '1', 'plugin', 'msg', 'action', 'msg404')); } browser\page::set_page_tittle($content[0]); //show header in up of content or else if (sizeof($content) == 3 && $content[2] == false) { $output_content = browser\page::show_block('', $content[1], 'MAIN'); } else { $output_content = browser\page::show_block($content[0], $content[1], 'MAIN'); } //show content id show_content was set if ($show_content) { echo $output_content; } return $content; }
protected function module_btn_reset_password_onclick($e) { $e['RV']['MODAL'] = browser\page::show_block(1, 1, 'MODAL', 'type-warning'); return $e; }
public function btn_signup_onclick($e) { //if this action requested by content mode i should reject that if ($e == 'content') { core\router::jump_page(SiteDomain); } //check input if ($e['txt_username']['VALUE'] == '' || $e['txt_email']['VALUE'] == '' || $e['txt_password']['VALUE'] == '' || $e['txt_repassword']['VALUE'] == '') { //invalid field $e['RV']['MODAL'] = browser\page::show_block(_('Message'), _('Please fill out all the field that are marked with an asterisk (*).'), 'MODAL', 'type-warning'); return $e; } else { return $this->module_btn_signup_onclick($e); } }