本文整理汇总了PHP中controller::view方法的典型用法代码示例。如果您正苦于以下问题:PHP controller::view方法的具体用法?PHP controller::view怎么用?PHP controller::view使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类controller
的用法示例。
在下文中一共展示了controller::view方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: appAutoload
<?php
require_once "../app-controller/app-controller.php";
$appAutoload = new appAutoload();
$c = new controller();
set_error_handler('errorManagerExec');
extract($_POST);
extract($_GET);
$c->view($app, $view);
示例2: controller
Jarifa is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Jarifa. If not, see <http://www.gnu.org/licenses/>.
*/
require_once "inc/html.inc";
require_once "views/default.inc";
require_once "controller/controller.inc";
$ctr = new controller("es_ES.utf8");
// If the user has not been authenticated and there is not any action, the login screen must be shown
if (!isset($_SESSION['userid']) and (empty($_POST) and empty($_GET))) {
$ctr->view("login");
}
// If the user has not been authenticated and the action is to authenticate, the controller tries to validate the user. If
// the user is a right one, it shows the start page, else it shows the login screen again.
if (!isset($_SESSION['userid']) and $_POST['action'] == 'auth') {
if ($ctr->authenticate($_POST['userid'], $_POST['password'])) {
$_GET['action'] = 'start';
} else {
$ctr->view("login");
}
}
// If the user has been authenticated, then the actions can be parsed:
if (isset($_SESSION['userid'])) {
switch ($_GET['action']) {
// Default screen
case 'start':
示例3: url
$c->header();
?>
<!-- START CONTENT -->
<div class="page cover bgp bg-fixed" style="background-image: url(<?php
echo WEB_USERS . "/1/bg-3.jpg";
?>
);">
<?php
$c->page();
?>
</div>
<!-- END CONTENT -->
<!-- START SIDEBARD -->
<?php
$c->quicksidebar();
?>
<!-- END SIDEBARD -->
<!-- MODAL Include -->
<?php
$c->view("app", "bootstrap/modal");
?>
<?php
$c->view("app", "footer");
?>
<i id="bodyProtect" class="icomoon-warning2 "></i>
<?php
$c->autoload->getJs();
?>
</body>
</html>
示例4: __construct
public function __construct()
{
if (!self::$view) {
self::$view = mPHP::$view;
}
}