コード例 #1
0
ファイル: litepress.php プロジェクト: nirix-old/litepress
 public function before()
 {
     $this->theme = new Theme(array('paths' => array(APPPATH . 'themes/'), 'active' => $this->_render['theme'], 'view_ext' => '.php'));
     $this->template = $this->theme->view('layouts/' . $this->_render['layout']);
     $this->template->set_global('title', array(LitePress::setting('title')));
     $this->template->set_global('theme', $this->theme);
     $this->_get_user();
     return parent::before();
 }
コード例 #2
0
ファイル: default.php プロジェクト: nirix-old/litepress
		<link rel="stylesheet" href="<?php 
echo Uri::create('assets/css/print.css');
?>
" media="print">
		<?php 
echo Asset::js('http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js');
?>
		<?php 
echo Asset::js('master.js');
?>
	</head>
	<body>
		<div id="wrapper">
			<header id="header">
				<h1><?php 
echo Html::anchor('/', LitePress::setting('title'));
?>
</h1>
				<nav id="nav">
					<ul>
					<?php 
if ($current_user->group->is_admin or $current_user->group->is_author) {
    ?>
						<li><?php 
    echo Html::anchor('-admin', 'AdminCP');
    ?>
</li>
					<?php 
}
?>
					<?php 
コード例 #3
0
ファイル: index.php プロジェクト: nirix-old/litepress
    } else {
        if ($setting['type'] == 'select') {
            ?>
		<?php 
            echo Form::select("settings[{$id}]", LitePress::setting($id), $setting['options'], array('id' => "settings[{$id}]"));
            ?>
	<?php 
        } else {
            if ($setting['type'] == 'yes_no') {
                ?>
		<?php 
                echo Form::radio("settings[{$id}]", 1, LitePress::setting($id) ? array('checked') : array());
                ?>
 Yes
		<?php 
                echo Form::radio("settings[{$id}]", 0, !LitePress::setting($id) ? array('checked') : array());
                ?>
 No
	<?php 
            }
        }
    }
    ?>
	</div>
<?php 
}
?>
	<div class="group">
		<?php 
echo Form::submit('submit', 'Save');
?>