当前位置: 首页>>代码示例>>PHP>>正文


PHP View::layout方法代码示例

本文整理汇总了PHP中View::layout方法的典型用法代码示例。如果您正苦于以下问题:PHP View::layout方法的具体用法?PHP View::layout怎么用?PHP View::layout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在View的用法示例。


在下文中一共展示了View::layout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Market

 function __construct()
 {
     $model = new Market();
     //header("Content-type:text/xml");
     View::$layout = 'empty';
     View::render('market/list', $model->getList());
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:7,代码来源:MarketController.php

示例2: forgot

    function forgot()
    {
        if ($_POST) {
            DB::escapePost();
            $sql = '
				SELECT * FROM {{users}} WHERE login=\'' . $_POST['login'] . '\'
			';
            $return = DB::getRow($sql);
            if ($return) {
                $pass = Funcs::generate_password(8);
                $sql = '
					UPDATE {{users}}
					SET pass=MD5(\'' . $pass . '\')
					WHERE login=\'' . $_POST['login'] . '\'
				';
                DB::exec($sql);
                $text = '
					Здравствуйте, ' . $return["login"] . '.<br />
					Ваш новый пароль ' . $pass . '.<br />
					Сменить пароль Вы можете в личном кабинете. 
				';
                $mail = new Email();
                $mail->To($return['email']);
                $mail->Subject('Восстановление пароля на сайте www.' . str_replace("www.", "", $_SERVER["HTTP_HOST"]));
                $mail->Text($text);
                $mail->Send();
            }
            $this->redirect('/');
        } else {
            View::$layout = 'empty';
            View::render('site/forgot');
        }
    }
开发者ID:sov-20-07,项目名称:billing,代码行数:33,代码来源:LoginController.php

示例3: home

 private function home()
 {
     $data = array();
     $data['title'] = "View demo";
     View::layout('master');
     View::render('home.view.php', $data);
 }
开发者ID:laiello,项目名称:cootheme2,代码行数:7,代码来源:HomeController.php

示例4: array

 function __construct()
 {
     if (News::tryDelSubscribers()) {
         News::delSubscribers();
         View::$layout = 'empty';
         View::render('site/redirect', array('text' => 'Вы успешно отписаны от рассылки', 'href' => '/'));
     }
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:8,代码来源:ConfirmController.php

示例5: debugAndLayout

 public static function debugAndLayout()
 {
     if (!self::hasDebug()) {
         return;
     }
     Core::$debug = true;
     View::$layout = true;
 }
开发者ID:jjechev,项目名称:phpTdConvert,代码行数:8,代码来源:DebugController.php

示例6: getsearch

 public function getsearch()
 {
     if (trim($_POST['q'])) {
         $model = new Tree();
         $tree = $model->getSearch();
         View::$layout = 'empty';
         View::render('tree/search', array('tree' => $tree));
     }
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:9,代码来源:TreeController.php

示例7: upload

 public function upload()
 {
     if ($_SESSION['iuser']['id']) {
         if ($_POST['act'] == 'step1') {
             $model = new Upload();
             $model->step1();
             $this->redirect('/fotobook/upload/step2/');
         } elseif ($_POST['act'] == 'step2') {
             $model = new Upload();
             $model->step2();
             $this->redirect('/fotobook/upload/step3/');
         } elseif ($_POST['act'] == 'step3') {
             $model = new Upload();
             $model->step3();
             View::$layout = 'empty';
             View::render('fotobook/upload/step3done');
         } elseif ($_POST['act'] == 'step3return') {
             $model = new Upload();
             $model->step3return();
             //$this->redirect('/fotobook/upload/step4/');
         } elseif ($_POST['act'] == 'step4') {
             $model = new Upload();
             $data = $model->step4();
             $this->redirect('/fotobook/upload/thanks/', $data);
         } elseif (Funcs::$uri[2] == '') {
             $this->redirect('/fotobook/upload/step1/');
         } elseif (Funcs::$uri[2] == 'step1') {
             $tree = Tree::getTreeByUrl('wide');
             Funcs::setMeta($tree);
             View::render('fotobook/upload/step1', $tree);
         } elseif (Funcs::$uri[2] == 'step2') {
             $tree = Tree::getTreeByUrl('wide');
             Funcs::setMeta($tree);
             View::render('fotobook/upload/step2', $tree);
         } elseif (Funcs::$uri[2] == 'step3') {
             $tree = Tree::getTreeByUrl('wide');
             Funcs::setMeta($tree);
             View::render('fotobook/upload/step3', $tree);
         } elseif (Funcs::$uri[2] == 'step3show') {
             View::$layout = 'empty';
             View::render('fotobook/upload/step3show');
         } elseif (Funcs::$uri[2] == 'step4') {
             $tree = Tree::getTreeByUrl('wide');
             Funcs::setMeta($tree);
             View::render('fotobook/upload/step4', $tree);
         } elseif (Funcs::$uri[2] == 'thanks') {
             $tree = Tree::getTreeByUrl('wide');
             Funcs::setMeta($tree);
             View::render('fotobook/upload/thanks', $tree);
         }
     } else {
         $tree = Tree::getTreeByUrl('wide');
         Funcs::setMeta($tree);
         View::render('fotobook/upload/page', $tree);
     }
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:56,代码来源:FotobookController.php

示例8: relyFile

 static function relyFile()
 {
     $styles_arr = array('core.Bracket.style#default', 'core.Bracket.bootstrap#min', 'core.Bracket.bootstrap-override', 'core.Bracket.weather-icons#min', 'core.Bracket.animate#delay', 'core.Bracket.select2', 'core.Bracket.toggles', 'core.Bracket.animate#min', 'core.Bracket.lato', 'core.Bracket.roboto', 'core.Bracket.jquery-ui-1#10#3', 'core.Bracket.font-awesome#min', 'core.Bracket.search-slide');
     //   core.Bracket.
     $scripts_arr = array('core.Bracket.jquery-1#11#1#min', 'core.Bracket.jquery-migrate-1#2#1#min', 'core.Bracket.jquery-ui-1#10#3#min', 'core.Bracket.jquery#cookies', 'core.Bracket.bootstrap#min', 'core.Bracket.modernizr#min', 'core.Bracket.jquery#sparkline#min', 'core.Bracket.toggles#min', 'core.Bracket.retina#min', 'core.Bracket.custom', 'core.Bracket.search-slide', 'core.Bracket.message');
     View::assign('scriptTml', '<script>jQuery(document).ready(function (){%s})</script>');
     View::l_assign('styles', $styles_arr, 1);
     View::assign('scripts', $scripts_arr, 1);
     return View::layout('core.Html5.baseRelyFile');
 }
开发者ID:beelibrary820145,项目名称:tanxiongfeng,代码行数:10,代码来源:Html5BaseRelyAction.class.php

示例9: getOne

 public function getOne($id)
 {
     if ($_POST) {
         if (Spage::send($id)) {
             View::$layout = 'empty';
             View::render('site/redirect', array('href' => '/vacancy/', 'text' => 'Заявка принята!\\nМы свяжемся с Вами в ближайшее время'));
         }
     }
     $field = Fields::getFieldsByTree($id, 'wide');
     return $field;
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:11,代码来源:SpageModel.php

示例10: basket

 public function basket()
 {
     $model = new Orders();
     if (isset($_POST['q'])) {
         View::$layout = 'empty';
         View::plugin('basketgoods', array('items' => Orders::getBasket(), 'id' => $_POST['id']));
     } else {
         View::$layout = 'empty';
         View::plugin('basket');
     }
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:11,代码来源:OrdersController.php

示例11: sendAllOrder

 public static function sendAllOrder($id)
 {
     $data = Orders::getOrderById($id);
     View::$layout = 'empty';
     $text = View::getRenderFullEmpty('email/order', $data);
     $mail = new Email();
     $mail->mailTo($data['email']);
     $mail->Subject('Статус заказа №' . (str_repeat('0', 6 - strlen($id)) . $id) . ' на сайте ' . $_SERVER['HTTP_HOST'] . ' изменен');
     $mail->From('robot@' . str_replace('www.', '', $_SERVER["HTTP_HOST"]));
     $mail->Text($text);
     $mail->Send();
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:12,代码来源:SendorderModel.php

示例12: run

 function run()
 {
     $id = 1;
     if (is_numeric(Funcs::$uri[2])) {
         $id = Funcs::$uri[2];
     } elseif (is_numeric($_GET['parent'])) {
         $id = $_GET['parent'];
     } elseif (is_numeric($_GET['id'])) {
         $sql = 'SELECT parent FROM {{tree}} WHERE id=' . $_GET['id'];
         $id = DB::getOne($sql);
     }
     View::$layout = 'empty';
     View::render('tree/tree', array('tree' => TreeWidget::getTree($id)));
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:14,代码来源:SiteWidget.php

示例13: sendMailback

 public function sendMailback()
 {
     DB::escapePost();
     $text .= '<b>Имя:</b> ' . $_POST['name'] . '<br />';
     $text .= '<b>Телефон:</b> ' . $_POST['phone'] . '<br />';
     $text .= '<b>Email:</b> ' . $_POST['email'] . '<br />';
     $text .= '<b>Сообщение:</b> ' . nl2br($_POST['message']) . '<br />';
     View::$layout = 'empty';
     $text = View::getRender('email/callback', array('text' => $text));
     $mail = new Email();
     $mail->mailTo(Funcs::$conf['email']['callback']);
     $mail->Subject('Обратная связь на сайте ' . $_SERVER['HTTP_HOST']);
     $mail->Text($text);
     $mail->Send();
 }
开发者ID:sov-20-07,项目名称:billing,代码行数:15,代码来源:PopupModel.php

示例14: execute

 /**
  * Runs the context.
  *
  * @param render If true the context will print the output to php://stdout and exit. Defaults to true.
  *
  * @returns A string of data. Dig it?
  */
 public function execute()
 {
     $document = new Document();
     $controller = Request::$controller . '_Controller';
     $controller = new $controller($document);
     // See if this is a valid context for this controller
     $valid_context = in_array('*', $controller->context_availability);
     if (in_array(Request::$context, $controller->context_availability)) {
         $valid_context = true;
     } else {
         if (array_key_exists(Request::$method, $controller->context_availability) and (in_array(Request::$context, $controller->context_availability[Request::$method]) or in_array('*', $controller->context_availability[Request::$method]))) {
             $valid_context = true;
         }
     }
     // Check exclusion list...
     if (array_key_exists(Request::$method, $controller->context_exclusion) and (in_array(Request::$context, $controller->context_exclusion[Request::$method]) or in_array('*', $controller->context_exclusion[Request::$method]))) {
         $valid_context = false;
     }
     if (!$valid_context) {
         die("Invalid Context!");
     }
     // Try context specific method first...
     if (is_callable(array($controller, Request::$method . '_' . Request::$context))) {
         if (false === call_user_func_array(array(&$controller, Request::$method . '_' . Request::$context), Request::$arguments)) {
             die("Error Calling Method for " . Request::$controller . ": " . Request::$method . '_' . Request::$context);
         }
     } else {
         if (!is_callable(array($controller, Request::$method))) {
             die("Bad Method for " . Request::$controller . ": " . Request::$method);
         }
         if (false === call_user_func_array(array(&$controller, Request::$method), Request::$arguments)) {
             die("Error Calling Method for " . Request::$controller . ": " . Request::$method);
         }
     }
     $layout = View::layout(Request::$context);
     $output = $layout->render($document);
     return $output;
 }
开发者ID:jmhobbs,项目名称:NodeRegator,代码行数:45,代码来源:context.php

示例15: _import_options

 protected function _import_options($options)
 {
     if (is_array($options)) {
         foreach ($options as $option => $value) {
             switch ($option) {
                 case 'partial':
                     $this->_is_partial = TRUE;
                     /* no break, follows down */
                 /* no break, follows down */
                 case 'action':
                 case 'template':
                 case 'file':
                     $file = $this->_origfile = strtolower((string) $value);
                     break;
                 case 'inline':
                 case 'haml':
                     $this->_is_inline = TRUE;
                     $this->_inline_haml = (string) $value;
                     $this->_viewfile = '';
                     break;
                 case 'locals':
                     if (is_array($value) || $value instanceof Traversable) {
                         $this->set($value);
                     }
                     break;
                 case 'format':
                     $this->_format = strtolower($value);
                     break;
                 case 'basedir':
                     $this->_basedir = static::$_last_basedir = strtolower(rtrim((string) $value, '/') . '/');
                     break;
                 case 'layout':
                     View::layout($value);
                     break;
             }
         }
     } else {
         $file = $this->_origfile = (string) $options;
     }
     if (isset($file)) {
         $this->_viewfile = $this->prepare_view_filename($file);
     }
 }
开发者ID:alshabalin,项目名称:kohana-advanced-view,代码行数:43,代码来源:View.php


注:本文中的View::layout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。