当前位置: 首页>>代码示例>>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;未经允许,请勿转载。