本文整理匯總了PHP中kernel::load_content方法的典型用法代碼示例。如果您正苦於以下問題:PHP kernel::load_content方法的具體用法?PHP kernel::load_content怎麽用?PHP kernel::load_content使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類kernel
的用法示例。
在下文中一共展示了kernel::load_content方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: kernel
//Loading core of application
require_once "_core/kernel.php";
$kernel = new kernel();
//Loading settings of application
$kernel->load_module("settings");
require_once "_core/rewrite.php";
$kernel->load_module("manager");
$kernel->load_module("ads");
$kernel->load_module("users");
$kernel->load_module("inbox");
//Loading main theme
$page = $kernel->settings;
$theme = $page->load('theme');
$img = $kernel->manager;
$ads = $kernel->ads;
$user = $kernel->users;
$inbox = $kernel->inbox;
$allowed = 'page,theme,img,ads,user,inbox,rewrite';
//Loading functions of user
$user->sessionTools();
if (!$user->verifyLogin()) {
header('Location: ' . $rewrite->login);
exit;
}
//Including header of theme
$kernel->load_content("_themes/" . $theme . "/header.php", $allowed);
//Including content of theme
$kernel->load_content("_themes/" . $theme . "/inbox.php", $allowed);
//Including footer of theme
$kernel->load_content("_themes/" . $theme . "/footer.php", $allowed);
ob_end_flush();
示例2: check
echo $check;
}
} else {
if (isset($_GET['mf'])) {
if (is_numeric($_GET['mf'])) {
$check = check($_GET['mf']);
if ($check == 0) {
if (mysql_query("INSERT INTO `tentego_img_fav` (`object_id`,`user_id`) VALUES (" . $_GET['mf'] . "," . $user->userInfo('id') . ")")) {
echo 'Dodano do ulubionych.';
} else {
echo 'Wystąpił błąd podczas dodawania do ulubionych.';
}
} else {
if (mysql_query("DELETE FROM `tentego_img_fav` WHERE `object_id`=" . $_GET['mf'] . " AND `user_id`=" . $user->userInfo('id'))) {
echo 'Usunięto z ulubionych.';
} else {
echo 'Wystąpił błąd podczas usuwania z ulubionych.';
}
}
}
}
}
exit;
}
//Including header of theme
$kernel->load_content("_themes/" . $theme . "/header.php", $allowed);
//Including content of theme
$kernel->load_content("_themes/" . $theme . "/favorites.php", $allowed);
//Including footer of theme
$kernel->load_content("_themes/" . $theme . "/footer.php", $allowed);
ob_end_flush();
示例3: kernel
<?php
ob_start();
//Loading core of application
require_once "_core/kernel.php";
$kernel = new kernel();
//Loading settings of application
$kernel->load_module("settings");
$kernel->load_module("users");
//Loading main theme
$page = $kernel->settings;
$theme = $page->load('theme');
$user = $kernel->users;
$allowed = 'page,theme,user';
if ($user->userInfo('rank') < 3) {
header('Location: index.php');
}
//Including content of theme
$kernel->load_content("_themes/" . $theme . "/banned.php", $allowed);
ob_end_flush();