當前位置: 首頁>>代碼示例>>PHP>>正文


PHP MY_Controller::render方法代碼示例

本文整理匯總了PHP中MY_Controller::render方法的典型用法代碼示例。如果您正苦於以下問題:PHP MY_Controller::render方法的具體用法?PHP MY_Controller::render怎麽用?PHP MY_Controller::render使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在MY_Controller的用法示例。


在下文中一共展示了MY_Controller::render方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: render

 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);
 }
開發者ID:NaszvadiG,項目名稱:codeigniter_boilerplate,代碼行數:7,代碼來源:Admin_Controller.php

示例2: index

 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');
     }
 }
開發者ID:bykoff,項目名稱:html4you,代碼行數:31,代碼來源:main.php

示例3: render

 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);
 }
開發者ID:TowerX,項目名稱:ci_bootstrap_3,代碼行數:9,代碼來源:Admin_Controller.php

示例4: render

 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);
 }
開發者ID:jothamhernandez,項目名稱:PT_HIFI,代碼行數:9,代碼來源:Admin_Controller.php

示例5: render

 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);
 }
開發者ID:32x32,項目名稱:spaghescript,代碼行數:6,代碼來源:MY_Controller.php

示例6: render

 protected function render($the_view = NULL, $template = 'admin_master')
 {
     parent::render($the_view, $template);
 }
開發者ID:vhugodev,項目名稱:Codeigniter,代碼行數:4,代碼來源:MY_Controller.php

示例7: render

 public function render($the_view = NULL, $template = 'admin_master')
 {
     # code...
     parent::render($the_view, $template);
 }
開發者ID:sundarkid,項目名稱:AGS,代碼行數:5,代碼來源:MY_Controller.php

示例8: render

 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);
 }
開發者ID:kamekun,項目名稱:CodeIgniter-multilanguage-site,代碼行數:44,代碼來源:MY_Controller.php

示例9: render

 protected function render($views = NULL, $template = 'admin')
 {
     parent::render($views, $template);
 }
開發者ID:nhanh2301,項目名稱:cxo,代碼行數:4,代碼來源:Admin_Controller.php

示例10: render

 protected function render($content = null, $layout = '')
 {
     parent::render(THEMES_DIR . '/' . $this->theme . '/' . $content, $this->layout);
 }
開發者ID:csiber,項目名稱:ci-blog,代碼行數:4,代碼來源:MY_Controller.php

示例11: render

 protected function render($view_file)
 {
     // (optional) change color scheme according to login user role
     $this->mViewData['body_class'] = 'skin-blue';
     parent::render($view_file);
 }
開發者ID:rooyzhang,項目名稱:ci_bootstrap_3,代碼行數:6,代碼來源:Admin_Controller.php


注:本文中的MY_Controller::render方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。