示例#1
0
文件: module.php 项目: MrMiM/sarkesh
 protected function module_login_page()
 {
     //get login panel
     $login_panel = $this->users->login();
     $login_panel[1] = cls_page::show_block($login_panel[0], $login_panel[1], 'BLOCK');
     return $this->module_load($login_panel, true);
 }
示例#2
0
文件: module.php 项目: MrMiM/sarkesh
 protected function module_change_language($e)
 {
     if ($this->obj_localize->set_language($e['lang']['SELECTED'])) {
         //change successfull return 1
         $e['RV']['URL'] = 'R';
     } else {
         $e['RV']['VALUE'] = cls_page::show_block(false, _('message'), _('changing language has some problem! Please try again later.'), 'MODAL', 'type-warning');
     }
     return $e;
 }
示例#3
0
 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)) {
         $plugin = new $this->plugin();
         //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 msg();
             $content = call_user_func(array($plugin, 'msg_404'));
         }
     } else {
         //plugin is not enabled
         //show 404 page not found page
         $plugin = new msg();
         $content = call_user_func(array($plugin, 'msg_404'));
     }
     cls_page::set_page_tittle($content[0]);
     //show header in up of content or else
     if (sizeof($content) == 3 && $content[2] == false) {
         $output_content = cls_page::show_block('', $content[1], 'MAIN');
     } else {
         $output_content = cls_page::show_block($content[0], $content[1], 'MAIN');
     }
     //show content id show_content was set
     if ($show_content) {
         echo $output_content;
     }
     return $content;
 }
示例#4
0
 public function btn_signup_onclick($e)
 {
     //if this action requested by content mode i should reject that
     if ($e == 'content') {
         cls_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'] = cls_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);
     }
 }
示例#5
0
文件: module.php 项目: MrMiM/sarkesh
 protected function module_btn_reset_password_onclick($e)
 {
     $e['RV']['MODAL'] = cls_page::show_block(1, 1, 'MODAL', 'type-warning');
     return $e;
 }
示例#6
0
 public function upload_error()
 {
     return cls_page::show_block(_('System message !'), _('Upload file is not successful! refresh page and try again.'), 'MODAL', 'type-warning');
 }
示例#7
0
 public function btn_onclick($e)
 {
     $a = $e['textbox']['VALUE'];
     $e['RV']['MODAL'] = cls_page::show_block('title', $a, 'MODAL', 'type-danger');
     return $e;
 }