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


PHP Layout::getLayout方法代码示例

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


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

示例1: render

 public static function render($partial, $data = array())
 {
     $path = self::PARTIAL_BASE . Layout::getLayout() . '/';
     if (!file_exists(dirname(dirname(__FILE__)) . View::VIEW_PATH . Layout::getLayout() . '/' . $path . $partial . View::VIEW_EXT)) {
         $path = self::PARTIAL_BASE . 'main/';
     }
     $partial = new View($path . $partial, $data);
     return $partial->render();
 }
开发者ID:Zandemmer,项目名称:HackThisSite-Old,代码行数:9,代码来源:partial.php

示例2: info

 public function info($arguments)
 {
     if (empty($arguments[0])) {
         return $this->setView('nil');
     }
     $top = dirname(dirname(__FILE__)) . '/views/';
     $place = '/pages/info/' . basename($arguments[0]) . '.php';
     if (!file_exists($top . Layout::getLayout() . $place) && !file_exists($top . 'main' . $place)) {
         return $this->nil();
     }
     $this->setView('pages/info/' . basename($arguments[0]));
 }
开发者ID:Zandemmer,项目名称:HackThisSite-Old,代码行数:12,代码来源:pages.php

示例3: __construct

 public function __construct($viewPath, $data = array(), $driver = self::DRIVER_TRADITIONAL)
 {
     $this->viewPath = dirname(dirname(__FILE__)) . self::VIEW_PATH . Layout::getLayout() . '/' . $viewPath . self::VIEW_EXT;
     if (!file_exists($this->viewPath)) {
         $this->viewPath = dirname(dirname(__FILE__)) . self::VIEW_PATH . 'main/' . $viewPath . self::VIEW_EXT;
     }
     $this->driver = self::DRIVER_PREFIX . $driver . self::VIEW_SUFFIX;
     if (!class_exists($this->driver)) {
         die('Invalid driver.');
     }
     $this->data = $data;
 }
开发者ID:Bren2010,项目名称:BlueElephant,代码行数:12,代码来源:view.php

示例4: __construct

 public function __construct($viewPath, $data = array(), $driver = self::DRIVER_TRADITIONAL)
 {
     // hard code the layout for now, pull
     // later we'll pull the default layout from the config and then check
     // it against user preference.
     Layout::selectLayout(Config::get(self::CONFIG_LAYOUT));
     $this->viewPath = dirname(dirname(__FILE__)) . self::VIEW_PATH . Layout::getLayout() . '/' . $viewPath . self::VIEW_EXT;
     if (!file_exists($this->viewPath)) {
         $this->viewPath = dirname(dirname(__FILE__)) . self::VIEW_PATH . 'main/' . $viewPath . self::VIEW_EXT;
     }
     $this->driver = self::DRIVER_PREFIX . $driver . self::VIEW_SUFFIX;
     if (!class_exists($this->driver)) {
         die('Invalid driver.');
     }
     $this->data = $data;
 }
开发者ID:Zandemmer,项目名称:HackThisSite-Old,代码行数:16,代码来源:view.php

示例5: deliveryResponse

 private static function deliveryResponse()
 {
     $isAjax = Request::isAjax();
     if ($isAjax) {
         if (empty(self::$_reply) || !is_array(self::$_reply)) {
             exit('No reply seted by ajax controller or reply is not an array');
         }
         foreach (self::$_reply as $key => $value) {
             if ($key != 'reply' && !is_numeric($value) && !is_array($value) && $value) {
                 self::$_reply[$key] = Language::translation($value);
             }
         }
         Request::responseHeader();
         echo json_encode(self::$_reply);
     } else {
         Layout::MenuFooterAutoload();
         Layout::replaceTag();
         Layout::translation();
         Request::responseHeader();
         echo Layout::getLayout();
     }
 }
开发者ID:dyonenedi,项目名称:lidiun_framework_v6,代码行数:22,代码来源:render.php

示例6: Layout

//Create objects
$layout = new Layout();
$register = new Validation();
$db = new Db();
?>

<html>
    <head>
        <title>Welcome to OpenRPS</title>

        <link rel="stylesheet" href="openrps_core/css/main.css"/>
        <link rel="stylesheet" href="openrps_core/css/dashboard.css"/>
    </head>
    <body>
        <?php 
$layout->getLayout("header_loggedin");
?>
        <!-- Service listing -->

        <div class="two columns">
        <p><h3>Your Profile</h3></p>
        <p><a href="change_personal_info.php">Change Personal Info</a></p>
        <p><a href="delete_account.php">Delete Your Account</a></p>
        </div>

        <h2>Hi <?php 
print $username;
?>
, Welcome to OpenRPS!</h2>

        <?php 
开发者ID:JackoThe1st,项目名称:OpenRPSDev,代码行数:31,代码来源:profile.php

示例7: Layout

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<?php 
include 'openrps_core/eng/Layout.php';
include 'openrps_core/eng/Validation.php';
include_once 'openrps_core/eng/Db.php';
//Set the title
$title = 'Sign Up for OpenRPS';
//Create objects
$layout = new Layout();
$validation = new Validation();
$db = new Db();
//Render layout
$layout->getLayout("header");
//Set post variables
$username = $_POST['username'];
$password = $_POST['password'];
$password_confirm = $_POST['password_confirm'];
$email = $_POST['email'];
//Validate form
//check passwords
if ($password != $password_confirm) {
    echo "<div class=\"danger alert\">Your passwords don't match!</div>";
    return;
}
$reg_status = $validation->valCheckEmpty($username, $password, $email);
if ($reg_status != 'true') {
    echo "<div class=\"danger alert\">{$reg_status}</div>";
}
if ($reg_status == 'true') {
开发者ID:JackoThe1st,项目名称:OpenRPSDev,代码行数:31,代码来源:process_signup.php

示例8:

?>

<html>
    <head>
        <!-- CSS Libraries -->
        <link rel="stylesheet" href="openrps_core/css/vendor/normalize.css"/>
        <link rel="stylesheet" href="openrps_core/css/vendor/foundation.min.css"/>

        <!-- CSS code -->
        <link rel="stylesheet" href="openrps_core/css/main.css"/>
        <link rel="stylesheet" href="openrps_core/css/promotional.css"/>

    </head>
    <body>
        <?php 
$layout->getLayout("header_notloggedin");
?>
        <section class="hero">
            <div class="hero-text">
                <h1><span class="dark-transparent-bg">Welcome to OpenRPS</span></h1>
                <h3><span class="dark-transparent-bg">The RBE system</span></h3>
            </div>
        </section>
        <section class="row">

            <div class="columns large-4 showcase-card">
                <img src="img/resource_tracking.svg"/>
                <h4>Resource Tracking</h4>
                <p>
                    Tracks the resources real time in any environment.
                </p>
开发者ID:JackoThe1st,项目名称:OpenRPSDev,代码行数:31,代码来源:index.php


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