本文整理汇总了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();
}
}