2016-07-19 00:39:37 +08:00
|
|
|
<?php
|
2022-10-07 17:29:26 +08:00
|
|
|
if (!Auth::check() && UOJConfig::$data['switch']['force-login']) {
|
2022-10-06 20:28:43 +08:00
|
|
|
redirectToLogin();
|
2022-03-17 12:00:03 +08:00
|
|
|
}
|
|
|
|
|
2022-10-07 17:29:26 +08:00
|
|
|
if (!isNormalUser($myUser) && UOJConfig::$data['switch']['force-login']) {
|
2022-04-03 18:18:17 +08:00
|
|
|
become403Page();
|
|
|
|
}
|
|
|
|
|
2016-07-19 00:39:37 +08:00
|
|
|
if (!validateUInt($_GET['id']) || !($blog = queryBlog($_GET['id']))) {
|
|
|
|
become404Page();
|
|
|
|
}
|
|
|
|
|
2022-10-20 17:07:43 +08:00
|
|
|
redirectTo(HTML::blog_url($blog['poster'], '/post/'.$_GET['id'] . ($_GET['sub'] ?: '')));
|
2022-09-18 12:58:35 +08:00
|
|
|
?>
|