本文整理匯總了PHP中Error404函數的典型用法代碼示例。如果您正苦於以下問題:PHP Error404函數的具體用法?PHP Error404怎麽用?PHP Error404使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了Error404函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: load_nickname
protected static function load_nickname($id = null)
{
if (!$id) {
$id = $_GET['id'];
}
$nickname = BadNickname::find_by_id($id);
if ($nickname) {
return $nickname;
} else {
Error404();
}
}
示例2: load_slideshow
protected static function load_slideshow($id = null)
{
if (!$id) {
$id = $_GET['id'];
}
$slideshow = Slideshow::find_by_id($id);
if ($slideshow) {
return $slideshow;
} else {
Error404();
}
}
示例3: load_group
protected static function load_group($id = null)
{
if (isset($_GET['id'])) {
$id = $_GET['id'];
}
$id = mysql_real_escape_string($id);
$group = Group::find_by_id($id);
if ($group) {
return $group;
}
Error404();
}
示例4: load_gameserver
protected function load_gameserver($id = null)
{
if (!$id) {
$id = $_GET['id'];
}
$id = mysql_real_escape_string($id);
$server = GameServer::find_by_id($id);
if ($server && $server->online) {
return $server;
}
Error404();
}
示例5: load_content
protected static function load_content($permalink = null, $external_only = false)
{
if (!$permalink) {
$permalink = $_GET['permalink'];
}
$content = Content::find_by_permalink($permalink, $external_only);
if ($content) {
return $content;
} else {
Error404();
}
}
示例6: load_game
protected static function load_game($id = null)
{
if (!$id) {
$id = mysql_real_escape_string($_GET['game_id']);
}
$game = Game::find_by_id($id);
if ($game) {
return $game;
} else {
Error404();
}
}
示例7: load_event
protected static function load_event($permalink = null)
{
if (!$permalink) {
$permalink = $_GET['permalink'];
}
$event = Event::find_by_permalink($permalink);
if ($event) {
return $event;
} else {
Error404();
}
}
示例8: load_gameserver
protected static function load_gameserver($id = null)
{
if (!$id) {
$id = $_GET['id'];
}
$server = GameServer::find_by_id($id);
if ($server) {
return $server;
} else {
Error404();
}
}
示例9: load_user
protected function load_user($nickname = null)
{
if (!$nickname) {
$nickname = $this->GetData('nickname');
}
$user = User::find_by_nickname($nickname);
if ($user) {
return $user;
} else {
Error404();
}
}
示例10: load_tag
protected static function load_tag($tagname = null)
{
if (!$tagname) {
$tagname = $_GET['tag'];
}
$tag = Tag::find_by_permalink($tagname);
if ($tag) {
return $tag;
} else {
Error404();
}
}
示例11: UfuInit
/**
* Инициализация ЧПУ и разбор текущего адреса страницы.
* @since 1.4.1
*/
function UfuInit()
{
if (System::config('general/ufu')) {
if (isset($_GET['ufu'])) {
$Path = trim($_GET['ufu']);
if ($Path != '') {
$_GET = UfuRewrite($_GET['ufu']);
if ($_GET === false) {
Error404();
}
}
}
}
}
示例12: load_event
protected static function load_event($permalink = null)
{
if (!$permalink) {
$permalink = $_GET['permalink'];
}
$event = Event::find_by_permalink($permalink);
if ($event) {
if (!$event->visible && !$event->advertised) {
//self::restrict("admin");
throw new Error404();
}
if (!$event->check_user(Site::CurrentUser())) {
Error404();
}
return $event;
} else {
Error404();
}
}
示例13: show
public function show($id = null)
{
if (isset($_GET['id'])) {
$id = $_GET['id'];
}
$script = Script::find_by_id($id);
if (!$script) {
Error404();
}
$page = 1;
if (isset($_GET['page'])) {
$page = $_GET['page'];
}
$id = mysql_real_escape_string($script->id);
$paginate = ScriptLog::paginate("scripts.id = '{$id}'", "scriptlogs.created_at DESC, scriptlogs.id DESC", $page, 50);
$this->assign("page", $paginate);
$this->assign("script", $script);
$this->title = "Scheduled Scripts :: {$script->name} :: Logs";
$this->render("scriptlog/show.tpl");
}
示例14: show
public function show($id = null)
{
if (isset($_GET['id'])) {
$id = $_GET['id'];
}
if (!$id) {
Error404();
}
$payment = PaymentTransaction::find_by_id($id);
if (!$payment) {
Error404();
}
$cart = Cart::find_by_id($payment->cart_id);
if ($cart) {
$user = User::find_by_id($cart->user_id);
$this->assign("user", $user);
$this->assign("cart", $cart);
}
$this->assign("payment", $payment);
$this->title = "Payment {$payment->id}";
$this->render("paymenttransaction/show.tpl");
}
示例15: process
public function process($id = null)
{
if ($_GET['key'] == md5("winbarmint")) {
if (!$id) {
$id = mysql_real_escape_string($_GET['id']);
}
$topup = Topup::find_by_id($id);
if ($topup) {
$topup->processed = true;
if ($topup->save()) {
echo "OK";
} else {
echo "Fail";
}
die;
} else {
Error404();
}
} else {
Error403();
}
}