2016-07-19 00:39:37 +08:00
|
|
|
<?php
|
2022-11-06 10:26:21 +08:00
|
|
|
requirePHPLib('form');
|
2022-03-17 12:00:03 +08:00
|
|
|
|
2022-11-06 10:26:21 +08:00
|
|
|
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();
|
2022-11-12 07:10:34 +08:00
|
|
|
UOJUserBlog::userIsOwner(Auth::user()) || UOJUser::checkPermission(Auth::user(), 'blogs.view') || UOJResponse::page403();
|
2022-11-06 10:26:21 +08:00
|
|
|
|
|
|
|
$page_config = UOJContext::pageConfig();
|
|
|
|
$page_config += [
|
|
|
|
'PageTitle' => HTML::stripTags(UOJBlog::info('title')) . ' - 幻灯片',
|
|
|
|
'content' => UOJBlog::cur()->queryContent()['content']
|
|
|
|
];
|
|
|
|
uojIncludeView('slide', $page_config);
|