|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* rmarchiv.tk |
|
5
|
|
|
* (c) 2016-2017 by Marcel 'ryg' Hering |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
namespace App\Http\Controllers; |
|
9
|
|
|
|
|
10
|
|
|
use App\Helpers\DatabaseHelper; |
|
11
|
|
|
|
|
12
|
|
|
class MsgBoxController extends Controller |
|
13
|
|
|
{ |
|
14
|
|
|
public function submit_logo() |
|
15
|
|
|
{ |
|
16
|
|
|
$msg = [ |
|
17
|
|
|
'title' => trans('app.msgbox.logo.title'), |
|
18
|
|
|
'msg' => trans('app.msgbox.logo.msg'), |
|
19
|
|
|
'redirect' => trans('app.msgbox.logo.redirect'), |
|
20
|
|
|
'redirect_to' => url('logo/vote'), |
|
21
|
|
|
]; |
|
22
|
|
|
|
|
23
|
|
|
return view('msgbox', $msg); |
|
24
|
|
|
} |
|
25
|
|
|
|
|
26
|
|
|
public function comment_add($type, $id) |
|
27
|
|
|
{ |
|
28
|
|
|
$msg = [ |
|
29
|
|
|
'title' => trans('app.msgbox.comment.title'), |
|
30
|
|
|
'msg' => trans('app.msgbox.comment.msg'), |
|
31
|
|
|
'redirect' => trans('app.msgbox.comment.redirect'), |
|
32
|
|
|
]; |
|
33
|
|
|
|
|
34
|
|
|
if ($type == 'news') { |
|
35
|
|
|
$msg['redirect_to'] = url('news', $id); |
|
36
|
|
|
} elseif ($type == 'game') { |
|
37
|
|
|
$msg['redirect_to'] = url('games', $id); |
|
38
|
|
|
} elseif ($type == 'resource') { |
|
39
|
|
|
$msg['redirect_to'] = route('resources.show', DatabaseHelper::getResourcePathArray($id)); |
|
40
|
|
|
} elseif ($type == 'event') { |
|
41
|
|
|
$msg['redirect_to'] = action('EventController@show', $id); |
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
return view('msgbox', $msg); |
|
45
|
|
|
} |
|
46
|
|
|
|
|
47
|
|
|
public function game_add($id) |
|
48
|
|
|
{ |
|
49
|
|
|
$msg = [ |
|
50
|
|
|
'title' => trans('app.msgbox.game.title'), |
|
51
|
|
|
'msg' => trans('app.msgbox.game.msg'), |
|
52
|
|
|
'redirect' => trans('app.msgbox.game.redirect'), |
|
53
|
|
|
'redirect_to' => url('games', $id), |
|
54
|
|
|
]; |
|
55
|
|
|
|
|
56
|
|
|
return view('msgbox', $msg); |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
public function screenshot_add($gameid) |
|
60
|
|
|
{ |
|
61
|
|
|
$msg = [ |
|
62
|
|
|
'title' => trans('app.msgbox.screenshot.title'), |
|
63
|
|
|
'msg' => trans('app.msgbox.screenshot.msg'), |
|
64
|
|
|
'redirect' => trans('app.msgbox.screenshot.redirect'), |
|
65
|
|
|
'redirect_to' => url('games', $gameid), |
|
66
|
|
|
]; |
|
67
|
|
|
|
|
68
|
|
|
return view('msgbox', $msg); |
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
public function cdc_add() |
|
72
|
|
|
{ |
|
73
|
|
|
$msg = [ |
|
74
|
|
|
'title' => trans('app.msgbox.cdc.title'), |
|
75
|
|
|
'msg' => trans('app.msgbox.cdc.msg'), |
|
76
|
|
|
'redirect' => trans('app.msgbox.cdc.redirect'), |
|
77
|
|
|
'redirect_to' => url('/'), |
|
78
|
|
|
]; |
|
79
|
|
|
|
|
80
|
|
|
return view('msgbox', $msg); |
|
81
|
|
|
} |
|
82
|
|
|
} |
|
83
|
|
|
|