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


PHP Theme::theme方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     $this->action = null;
     $this->params = null;
     $this->request = $this->getRouter()->getCurrentRequest();
     $this->title = ucfirst(last($this->request->segments()));
     $this->theme = \Theme::theme(config('site.theme', 'semui'))->layout($this->layout);
 }
开发者ID:spetross,项目名称:ugvoice,代码行数:8,代码来源:AppController.php

示例2: initialize

 /**
  * initialize theme
  * @param  string $theme forcing theme to load used in the admin
  * @return void        
  */
 public static function initialize($theme = NULL)
 {
     //we are not forcing the view of other theme
     if ($theme === NULL) {
         //first we check if it's a mobile device
         if (($mobile_theme = self::is_mobile()) !== FALSE) {
             $theme = $mobile_theme;
         } else {
             $theme = Core::config('appearance.theme');
         }
         //if we allow the user to select the theme, perfect for the demo
         if (Core::config('appearance.allow_query_theme') == '1') {
             if (Core::get('theme') !== NULL) {
                 $theme = Core::get('theme');
             } elseif (Cookie::get('theme') !== '') {
                 $theme = Cookie::get('theme');
             }
         }
         //we save the cookie for next time
         Cookie::set('theme', $theme, Core::config('auth.lifetime'));
     }
     //check the theme exists..
     if (!file_exists(self::theme_init_path($theme))) {
         $theme = Core::config('appearance.theme');
     }
     //load theme init.php like in module, to load default JS and CSS for example
     self::$theme = $theme;
     Kohana::load(self::theme_init_path(self::$theme));
     self::load();
 }
开发者ID:Wildboard,项目名称:WbWebApp,代码行数:35,代码来源:theme.php

示例3:

			<h2 class="form-signin-heading"><?php 
    echo FORGOT_PASS;
    ?>
</h2>
			<div class="form-group">
				<label><?php 
    echo FILLIN_USERNAME;
    ?>
</label>
				<input type="text" name="username" class="form-control" placeholder="<?php 
    echo USERNAME;
    ?>
" required autofocus>
			</div>
			<input type="hidden" name="token" value="<?php 
    echo TOKEN;
    ?>
">
			<button class="btn btn-lg btn-success btn-block" name="forgotpass" type="submit"><?php 
    echo REQUEST_PASS;
    ?>
</button>
		</form>
	</div>
</div>
<?php 
} else {
    echo "<div class=\"alert alert-info\">You're already Logged In. <br /><a href=\"logout.php\">Logout</a></div>";
}
Theme::theme('footer');
System::Zipped();
开发者ID:vdanelia,项目名称:GeniXCMS,代码行数:31,代码来源:forgotpassword.php

示例4: array

* @copyright 2014-2015 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/
$post = "";
$data['max'] = Options::get('post_perpage');
if (isset($_GET['paging'])) {
    $paging = Typo::int($_GET['paging']);
    if ($paging > 0) {
        $offset = ($paging - 1) * $data['max'];
    } else {
        $offset = 0;
    }
    $pagingtitle = " - Page {$paging}";
} else {
    $offset = 0;
    $paging = 1;
    $pagingtitle = "";
}
//echo $paging;
$data['sitetitle'] = Site::$slogan . $pagingtitle;
$data['posts'] = Db::result(sprintf("SELECT * FROM `posts` \n                            WHERE `type` = 'post' \n                            AND `status` = '1'\n                            ORDER BY `date` \n                            DESC LIMIT %d, %d", $offset, $data['max']));
$data['num'] = Db::$num_rows;
$url = SMART_URL ? Site::$url : Site::$url . '/index.php?';
$paging = array('paging' => $paging, 'table' => 'posts', 'where' => '`type` = \'post\'', 'max' => $data['max'], 'url' => $url, 'type' => Options::get('pagination'));
$data['paging'] = Paging::create($paging, SMART_URL);
Theme::theme('header', $data);
Theme::theme('index', $data);
Theme::footer();
/* End of file default.control.php */
/* Location: ./inc/lib/Control/Frontend/default.control.php */
开发者ID:vdanelia,项目名称:GeniXCMS,代码行数:31,代码来源:default.control.php

示例5: set_theme

 /** 
  * Sets the theme
  *
  * @access	public
  * @param	string	The theme folder
  */
 public static function set_theme($t)
 {
     self::$theme = $t;
     // Add current theme path to Finder searching path
     Finder::add_path(self::get_theme_path());
 }
开发者ID:pompalini,项目名称:emngo,代码行数:12,代码来源:Theme.php

示例6: foreach

<div class="col-sm-8 blog-main">
<?php 
foreach ($data['posts'] as $p) {
    # code...
    echo "\n        <div class=\"blog-post\">\n            <h2 class=\"blog-post-title\">{$p->title}</h2>\n           \n           " . Typo::Xclean($p->content) . "\n        </div>\n            ";
}
?>
</div>
<?php 
Theme::theme('rightside', $data);
开发者ID:vdanelia,项目名称:GeniXCMS,代码行数:10,代码来源:page.php

示例7: die

<?php

if (!defined('GX_LIB')) {
    die("Direct Access Not Allowed!");
}
/**
* GeniXCMS - Content Management System
* 
* PHP Based Content Management System and Framework
*
* @package GeniXCMS
* @since 0.0.1 build date 20150219
* @version 0.0.6
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2015 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/
header("HTTP/1.0 403 Forbidden");
if (Theme::exist('403')) {
    Theme::theme('403');
} else {
    echo "<center>\n        <h1>Ooops!!</h1>\n        <h2 style=\"font-size: 20em\">403</h2>\n        <h3>Forbidden</h3>\n        Back to <a href=\"" . Options::get('siteurl') . "\">" . Options::get('sitename') . "</a>\n        </center>\n        ";
    Site::footer();
}
开发者ID:vdanelia,项目名称:GeniXCMS,代码行数:27,代码来源:403.control.php

示例8: die

    die("Direct Access Not Allowed!");
}
/**
* GeniXCMS - Content Management System
* 
* PHP Based Content Management System and Framework
*
* @package GeniXCMS
* @since 0.0.1 build date 20141006
* @version 0.0.6
* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2015 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/
$post = $_GET[$vars];
$data['posts'] = Db::result(sprintf("SELECT * FROM `posts` \n                            WHERE `id` = '%d' \n                            AND `type` = 'post'\n                            AND `status` = '1' \n                            LIMIT 1", $post));
if (Db::$num_rows > 0) {
    Theme::theme('header', $data);
    Theme::theme('single', $data);
    Theme::footer();
    Stats::addViews($post);
    exit;
} else {
    Control::error('404');
    exit;
}
/* End of file post.control.php */
/* Location: ./inc/lib/Control/Frontend/post.control.php */
开发者ID:vdanelia,项目名称:GeniXCMS,代码行数:31,代码来源:post.control.php

示例9: set_theme

 /** 
  * Sets the theme
  *
  * @access	public
  * @param	string	The theme folder
  */
 public static function set_theme($t)
 {
     self::$theme = $t;
 }
开发者ID:asonweb,项目名称:mycicms,代码行数:10,代码来源:Theme.php

示例10: switch

* @link https://github.com/semplon/GeniXCMS
* @link http://genixcms.org
* @author Puguh Wijayanto (www.metalgenix.com)
* @copyright 2014-2015 Puguh Wijayanto
* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/
switch ($_GET['page']) {
    case 'sitemap':
        # code...
        Sitemap::create();
        exit;
        break;
    default:
        # code...
        $page = Typo::cleanX(Typo::strip($_GET['page']));
        $data['posts'] = Db::result(sprintf("SELECT * FROM `posts` \n                                    WHERE (`id` = '%d' OR `slug` = '%s')\n                                    AND `type` = 'page'\n                                    AND `status` = '1'\n                                    LIMIT 1", $page, $page));
        if (Db::$num_rows > 0) {
            Theme::theme('header', $data);
            Theme::theme('page', $data);
            Theme::footer();
            Stats::addViews($page);
            exit;
        } else {
            Control::error('404');
            exit;
        }
        break;
}
/* End of file page.control.php */
/* Location: ./inc/lib/Control/Frontend/page.control.php */
开发者ID:vdanelia,项目名称:GeniXCMS,代码行数:31,代码来源:page.control.php

示例11: array

* @license http://www.opensource.org/licenses/mit-license.php MIT
*
*/
$post = "";
$cat = Db::escape(Typo::Xclean($_GET['cat']));
$data['max'] = Options::get('post_perpage');
if (isset($_GET['paging'])) {
    $paging = Typo::int($_GET['paging']);
    if ($paging > 0) {
        $offset = ($paging - 1) * $data['max'];
    } else {
        $offset = 0;
    }
    $pagingtitle = " - Page {$paging}";
} else {
    $offset = 0;
    $paging = 1;
    $pagingtitle = "";
}
$data['sitetitle'] = "Category: " . Categories::name($cat) . $pagingtitle;
$data['posts'] = Db::result(sprintf("SELECT * FROM `posts` \n                    WHERE `type` = 'post' \n                    AND `cat` = '%d'\n                    AND `status` = '1'\n                    ORDER BY `date` \n                    DESC LIMIT %d, %d", $cat, $offset, $data['max']));
$data['num'] = Db::$num_rows;
$url = Url::cat($_GET['cat']);
$paging = array('paging' => $paging, 'table' => 'posts', 'where' => '`type` = \'post\' AND `cat` = \'' . $cat . '\'', 'max' => $data['max'], 'url' => $url, 'type' => Options::get('pagination'));
$data['paging'] = Paging::create($paging, SMART_URL);
Theme::theme('header', $data);
Theme::theme('cat', $data);
Theme::footer();
exit;
/* End of file cat.control.php */
/* Location: ./inc/lib/Control/Frontend/cat.control.php */
开发者ID:vdanelia,项目名称:GeniXCMS,代码行数:31,代码来源:cat.control.php


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