S2OJ/web/app/controllers/subdomain/blog/slide.php

17 lines
669 B
PHP
Raw Permalink Normal View History

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