本文整理汇总了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);
}
示例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');
}
}
示例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);
}
示例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);
}
示例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);
}
示例6: render
protected function render($the_view = NULL, $template = 'admin_master')
{
parent::render($the_view, $template);
}
示例7: render
public function render($the_view = NULL, $template = 'admin_master')
{
# code...
parent::render($the_view, $template);
}
示例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);
}
示例9: render
protected function render($views = NULL, $template = 'admin')
{
parent::render($views, $template);
}
示例10: render
protected function render($content = null, $layout = '')
{
parent::render(THEMES_DIR . '/' . $this->theme . '/' . $content, $this->layout);
}
示例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);
}