もー!!
このコミットが含まれているのは:
コミット
d0fe3a82a9
|
@ -100,7 +100,7 @@ class Content {
|
|||
return view('pages.site.content.add', ['res' => $res, 'menu' => $this->menu, 'user' => $this->user, 'err' => $err, 'frm' => $frm]);
|
||||
}
|
||||
|
||||
return redirect('');
|
||||
return view('pages.site.notallowed', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
}
|
||||
|
||||
public function delete (Request $r) {
|
||||
|
@ -115,6 +115,7 @@ class Content {
|
|||
public function edit (Request $r) {
|
||||
if ($this->user && ($this->user->perm['blg_editpost'] || $this->user->perm['blg_editpage'])) {
|
||||
$frm = DB::table('blg_content')->where('slug', $r->slug)->first();
|
||||
if (!$frm) return view('pages.site.notfound', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
$err = '';
|
||||
$res = '';
|
||||
|
||||
|
@ -180,6 +181,6 @@ class Content {
|
|||
return view('pages.site.content.edit', ['res' => $res, 'menu' => $this->menu, 'user' => $this->user, 'err' => $err, 'frm' => $frm]);
|
||||
}
|
||||
|
||||
return redirect('');
|
||||
return view('pages.site.notallowed', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ class Index {
|
|||
if ($this->valid['blg_editpage'] == 0) $res = $res->where('public_status', 0);
|
||||
$res = $res->where('isPost', 0)->where('slug', $slug)->orderBy('sortorder', 'asc')->first();
|
||||
|
||||
if (!$res) return notfound($this->menu, $this->user, $res);
|
||||
if (!$res) return view('pages.site.notfound', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
return view('pages.site.page', ['res' => $res, 'menu' => $this->menu, 'user' => $this->user]);
|
||||
}
|
||||
|
||||
|
@ -42,6 +42,7 @@ class Index {
|
|||
$get = DB::table('blg_content');
|
||||
if ($this->valid['blg_editpost'] == 0) $get = $get->where('public_status', 0);
|
||||
$get = $get->where('isPost', 1)->where('slug', $slug)->first();
|
||||
if (!$get) return view('pages.site.notfound', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
|
||||
$ucol = $this->objUser->getGroupColours();
|
||||
setlocale(LC_ALL, 'ja_JP.utf8');
|
||||
|
@ -96,7 +97,6 @@ class Index {
|
|||
$get->post_date = strftime('%Y/%m/%d(%a) %H:%M:%S %Z', $get->post_date);
|
||||
$get->publish_date = strftime('%Y/%m/%d(%a) %H:%M:%S %Z', $get->publish_date);
|
||||
|
||||
if (!$get) return notfound($this->menu, $this->user, $get);
|
||||
return view('pages.site.post', ['res' => $get, 'menu' => $this->menu, 'user' => $this->user]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class Profile {
|
|||
}
|
||||
|
||||
public function index ($id, $kero) {
|
||||
if (!$this->get) return notfound($this->menu, $this->user, $this->get);
|
||||
if (!$this->get) return view('pages.site.notfound', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
return view('pages.site.profile', ['res' => $this->get, 'menu' => $this->menu, 'user' => $this->user]);
|
||||
}
|
||||
|
||||
|
@ -63,6 +63,10 @@ class Profile {
|
|||
$err = '';
|
||||
$suc = '';
|
||||
|
||||
$valid = $this->auth->getPermissions($this->user->kero_token);
|
||||
$user = $this->user->id;
|
||||
if (($valid['usr_editother'] == 0 && $user != $id)) return view('pages.site.notallowed', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
|
||||
if (isset($r->submit)) {
|
||||
if (!is_null($r->password)) {
|
||||
if ($r->password != $r->password_check) $err = '「パスワード」と「パスワード確認」が異なります。';
|
||||
|
@ -104,7 +108,8 @@ class Profile {
|
|||
}
|
||||
}
|
||||
|
||||
if (!$this->get) return view('pages.site.notfound', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
if ($this->user) return view('pages.site.profileedit', ['res' => $this->get, 'menu' => $this->menu, 'user' => $this->user, 'suc' => $suc, 'err' => $err, 'cnt' => $this->cntr]);
|
||||
return redirect('');
|
||||
return view('pages.site.notfound', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ class UserController extends Controller {
|
|||
$cols = $this->getGroupColours()->toArray();
|
||||
|
||||
$get = DB::table('users')->where('id', $id)->first();
|
||||
if (!$get) return false;
|
||||
$get->details = DB::table('usr_details')->where('user_id', $id)->first();
|
||||
$get->profile = DB::table('usr_profile')->where('user_id', $id)->first();
|
||||
$get->contacts = DB::table('usr_contacts')->where('user_id', $id)->first();
|
||||
|
|
|
@ -64,7 +64,7 @@ class Game {
|
|||
return view('pages.site.video.game.add', ['res' => $res, 'menu' => $this->menu, 'user' => $this->user, 'err' => $err, 'frm' => $frm]);
|
||||
}
|
||||
|
||||
return redirect('');
|
||||
return view('pages.site.notallowed', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
}
|
||||
|
||||
public function delete (Request $r) {
|
||||
|
@ -78,6 +78,7 @@ class Game {
|
|||
public function edit (Request $r) {
|
||||
if ($this->user && $this->user->perm['blg_addpost']) {
|
||||
$frm = DB::table('vid_game')->where('slug', $r->slug)->first();
|
||||
if (!$frm) return view('pages.site.notfound', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
$err = '';
|
||||
$res = '';
|
||||
|
||||
|
@ -108,6 +109,6 @@ class Game {
|
|||
return view('pages.site.video.game.edit', ['res' => $res, 'menu' => $this->menu, 'user' => $this->user, 'err' => $err, 'frm' => $frm]);
|
||||
}
|
||||
|
||||
return redirect('');
|
||||
return view('pages.site.notallowed', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,9 @@ class Prayer {
|
|||
|
||||
public function index ($vid) {
|
||||
$res = DB::table('vid_video')->where('vid', $vid)->first();
|
||||
if (!$res) return view('pages.site.notfound', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
$game = DB::table('vid_game')->where('id', $res->game_id)->first();
|
||||
if (!$game) return view('pages.site.notfound', ['menu' => $this->menu, 'user' => $this->user]);
|
||||
|
||||
$res->gametitle = explode('】', $res->title);
|
||||
$res->title = $res->gametitle[1];
|
||||
|
@ -59,7 +61,6 @@ class Prayer {
|
|||
$res->user = userDetail(null, $this->cook);
|
||||
$res->comments = $comments;
|
||||
|
||||
if (!$res) return notfound($this->menu, $this->user, $res);
|
||||
return view('pages.site.video.prayer', ['res' => $res, 'menu' => $this->menu, 'user' => $this->user]);
|
||||
}
|
||||
|
||||
|
|
|
@ -63,8 +63,4 @@ function userDetail ($id, $kero=null) {
|
|||
return array();
|
||||
}
|
||||
|
||||
function notfound ($m, $u, $r) {
|
||||
return view('pages.site.notfound', ['res' => $r, 'menu' => $m, 'user', $u]);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
バイナリファイルは表示されません。
変更後 幅: | 高さ: | サイズ: 10 KiB |
|
@ -122,7 +122,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-md">
|
||||
@if (isset($user->perm) && ($user->perm['blg_editpost'] || $user->perm['blg_editpage'] || $user->perm['blg_delpost'] || $user->perm['blg_delpage']))
|
||||
@if (isset($user->perm) && isset($res) && ($user->perm['blg_editpost'] || $user->perm['blg_editpage'] || $user->perm['blg_delpost'] || $user->perm['blg_delpage']))
|
||||
<?php
|
||||
$current = '';
|
||||
$slug = '';
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
@extends('layouts.site')
|
||||
|
||||
@section('content')
|
||||
<div class="within">
|
||||
<div class="bar">関係者以外立入禁止</div>
|
||||
<div class="back" style="text-align: center; padding-top: 0px;">
|
||||
残念!許可がねぇやん!!
|
||||
<div><img src="/img/kerokinsi.webp" alt="残念!" /></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
|
@ -17,18 +17,18 @@ Route::get('/profile/{id}/edit', 'UserController@editProfile');
|
|||
Route::post('/profile/{id}/edit', 'UserController@editProfile');
|
||||
Route::get('/profile/{id}', 'UserController@profile');
|
||||
|
||||
Route::get('/video', 'VideoController@index');
|
||||
Route::get('/video/{slug}', 'VideoController@table');
|
||||
Route::get('/video/play/{vid}', 'VideoController@prayer');
|
||||
|
||||
Route::get('/video/game/add', 'VideoController@addGame');
|
||||
Route::post('/video/game/add', 'VideoController@addGame');
|
||||
Route::get('/video/game/{slug}/edit', 'VideoController@editGame');
|
||||
Route::post('/video/game/{slug}/edit', 'VideoController@editGame');
|
||||
|
||||
Route::get('/video/play/add', 'VideoController@addVideo');
|
||||
Route::post('/video/play/add', 'VideoController@addVideo');
|
||||
Route::get('/video/play/{slug}/edit', 'VideoController@editVideo');
|
||||
Route::post('/video/play/{slug}/edit', 'VideoController@editVideo');
|
||||
Route::get('/video/add', 'VideoController@addVideo');
|
||||
Route::post('/video/add', 'VideoController@addVideo');
|
||||
Route::get('/video/{vid}/edit', 'VideoController@editVideo');
|
||||
Route::post('/video/{vid}/edit', 'VideoController@editVideo');
|
||||
|
||||
Route::get('/video', 'VideoController@index');
|
||||
Route::get('/video/{slug}', 'VideoController@table');
|
||||
Route::get('/video/play/{vid}', 'VideoController@prayer');
|
||||
|
||||
Route::get('/{slug}', 'HomeController@page');
|
||||
|
|
新しいイシューから参照