mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-27 04:56:19 +00:00
17 lines
669 B
PHP
17 lines
669 B
PHP
<?php
|
|
requirePHPLib('form');
|
|
|
|
Auth::check() || redirectToLogin();
|
|
UOJBlog::init(UOJRequest::get('id')) || UOJResponse::page404();
|
|
UOJBlog::cur()->belongsToUserBlog() || UOJResponse::page404();
|
|
UOJBlog::cur()->userCanView(Auth::user()) || UOJResponse::page403();
|
|
UOJBlog::cur()->isTypeS() || UOJResponse::page404();
|
|
UOJUserBlog::userIsOwner(Auth::user()) || UOJUser::checkPermission(Auth::user(), 'blogs.view') || UOJResponse::page403();
|
|
|
|
$page_config = UOJContext::pageConfig();
|
|
$page_config += [
|
|
'PageTitle' => HTML::stripTags(UOJBlog::info('title')) . ' - 幻灯片',
|
|
'content' => UOJBlog::cur()->queryContent()['content']
|
|
];
|
|
uojIncludeView('slide', $page_config);
|