protected function render($view_file)
 {
     // load skin according to user role
     $config = $this->mSiteConfig['adminlte'];
     $this->mViewData['body_class'] = $config['skins'][$this->mUser->role];
     parent::render($view_file);
 }
Exemple #2
0
 public function index()
 {
     if ($this->is_post()) {
         ini_set('post_max_size', '200M');
         ini_set('upload_max_filesize', '200M');
         set_time_limit(600);
         $file = $_FILES['upload'];
         $file_upload = $this->downloadfile($file);
         if ($file_upload) {
             // Отправка письма пользователю
             $email = $this->input->post('email');
             $name = $this->input->post("name");
             $subject = "Спасибо вам за ваш заказ";
             $text = "Спасибо вам за ваш заказ";
             $this->sendmailer->setSenderLabel('PSDTOHTML4YOU');
             $this->sendmailer->setRecipient($email, $name);
             $this->sendmailer->send($subject, $text);
             // Письмо администратору
             $subject = "Новый заказ на верстку проекта от " . $name;
             $text = "Пришел заказ на верстку с почты <a href='mailto:{$email}'>{$email}</a> от {$name}";
             $this->sendmailer->setSenderLabel('PSDTOHTML4YOU');
             $this->sendmailer->setRecipient($this->config->item('email_user'), "Администратор");
             $this->sendmailer->addAttachment($file_upload);
             $this->sendmailer->send($subject, $text);
             unlink($file_upload);
         }
         redirect('/');
     } else {
         parent::render('index');
     }
 }
 protected function render($view_file, $layout = 'default')
 {
     // load skin according to user role
     $config = $this->mSiteConfig['adminlte'][$this->mUserMainGroup];
     $this->mBodyClass = $config['skin'];
     // additional view data
     $this->mViewData['useful_links'] = $this->mUsefulLinks;
     parent::render($view_file);
 }
 protected function render($view_file)
 {
     // load skin according to user role
     $config = $this->mSiteConfig['authorized_groups'][$this->mUserMainGroup];
     $this->mViewData['body_class'] = $config['adminlte_skin'];
     // additional view data
     $this->mViewData['useful_links'] = $this->mUsefulLinks;
     parent::render($view_file);
 }
Exemple #5
0
 protected function render($the_view = NULL, $template = 'public_master')
 {
     $this->load->library('menus');
     $this->data['top_menu'] = $this->menus->get_menu('top-menu', $this->current_lang, 'just_link');
     parent::render($the_view, $template);
 }
 protected function render($the_view = NULL, $template = 'admin_master')
 {
     parent::render($the_view, $template);
 }
Exemple #7
0
 public function render($the_view = NULL, $template = 'admin_master')
 {
     # code...
     parent::render($the_view, $template);
 }
 protected function render($the_view = NULL, $template = 'public_master')
 {
     /* load a generic language file (this language file will be used across many pages - like in the footer of pages) */
     $this->load->language('app_lang', $this->langs[$this->current_lang]['language_directory']);
     /* you can load a specific language file inside the controller constructor with $this->language_file = ''.
        The file will be loaded from the app_files directory inside specific language directory */
     if (!isset($this->language_file)) {
         $uri = explode('/', uri_string());
         $calling_class = get_class($this);
         $url = array();
         foreach ($uri as $key => $value) {
             if (trim(strlen($value) > 0)) {
                 if (is_numeric($value) || $value == $this->current_lang) {
                     unset($uri[$key]);
                 } else {
                     $url[$key] = str_replace('-', '_', $value);
                 }
             }
         }
         $methods = debug_backtrace();
         foreach ($methods as $method) {
             if ($method['function'] !== 'render' && method_exists($calling_class, $method['function'])) {
                 $current_method = $method['function'];
             }
         }
         $method_key = array_search($current_method, $url);
         $language_file_array = array_slice($url, 0, $method_key + 1);
         $calling_class = strtolower($calling_class);
         if (!in_array($calling_class, $language_file_array)) {
             $language_file_array[] = $calling_class;
         }
         if (!in_array($current_method, $language_file_array)) {
             $language_file_array[] = $current_method;
         }
         $this->language_file = implode('_', $language_file_array);
     }
     /* verify if a language file specific to the method exists. If it does, load it. If it doesn't, simply do not load anything */
     if (file_exists(APPPATH . 'language/' . $this->langs[$this->current_lang]['language_directory'] . '/app_files/' . strtolower($this->language_file) . '_lang.php')) {
         $this->lang->load('app_files/' . strtolower($this->language_file) . '_lang', $this->langs[$this->current_lang]['language_directory']);
     }
     $this->load->library('menus_creator');
     $this->data['top_menu'] = $this->menus_creator->get_menu('top-menu', $this->current_lang, 'bootstrap_menu');
     parent::render($the_view, $template);
 }
Exemple #9
0
 protected function render($views = NULL, $template = 'admin')
 {
     parent::render($views, $template);
 }
Exemple #10
0
 protected function render($content = null, $layout = '')
 {
     parent::render(THEMES_DIR . '/' . $this->theme . '/' . $content, $this->layout);
 }
 protected function render($view_file)
 {
     // (optional) change color scheme according to login user role
     $this->mViewData['body_class'] = 'skin-blue';
     parent::render($view_file);
 }
Exemple #12
0
 protected function render($the_view = NULL, $template = 'public_master')
 {
     //$this->load->library('menus');
     //$this->data['top_menu'] = $this->menus->get_menu('top-menu','bootstrap_menu');
     parent::render($the_view, $template);
 }
Exemple #13
0
 protected function render($the_view = NULL, $template = 'public/public_master')
 {
     parent::render($the_view, $template);
 }