|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* @package CleverStyle CMS |
|
4
|
|
|
* @subpackage System module |
|
5
|
|
|
* @category modules |
|
6
|
|
|
* @author Nazar Mokrynskyi <[email protected]> |
|
7
|
|
|
* @copyright Copyright (c) 2015, Nazar Mokrynskyi |
|
8
|
|
|
* @license MIT License, see license.txt |
|
9
|
|
|
*/ |
|
10
|
|
|
namespace cs\modules\System\admin\Controller; |
|
11
|
|
|
use |
|
12
|
|
|
cs\Index, |
|
13
|
|
|
h; |
|
14
|
|
|
|
|
15
|
|
|
trait general { |
|
16
|
|
|
static function general_about_server ( |
|
17
|
|
|
/** @noinspection PhpUnusedParameterInspection */ |
|
18
|
|
|
$route_ids, |
|
|
|
|
|
|
19
|
|
|
$route_path |
|
20
|
|
|
) { |
|
21
|
|
|
$Index = Index::instance(); |
|
22
|
|
|
$Index->form = false; |
|
23
|
|
|
if (isset($route_path[2])) { |
|
24
|
|
|
interface_off(); |
|
25
|
|
|
switch ($route_path[2]) { |
|
26
|
|
|
case 'phpinfo': |
|
27
|
|
|
$Index->Content = ob_wrapper( |
|
28
|
|
|
function () { |
|
29
|
|
|
phpinfo(); |
|
30
|
|
|
} |
|
31
|
|
|
); |
|
32
|
|
|
break; |
|
33
|
|
|
case 'readme.html': |
|
34
|
|
|
$Index->Content = file_get_contents(DIR.'/readme.html'); |
|
35
|
|
|
} |
|
36
|
|
|
return; |
|
37
|
|
|
} |
|
38
|
|
|
$Index->content( |
|
39
|
|
|
h::cs_system_admin_about_server() |
|
40
|
|
|
); |
|
41
|
|
|
} |
|
42
|
|
|
static function general_appearance () { |
|
43
|
|
|
$Index = Index::instance(); |
|
44
|
|
|
$Index->form = false; |
|
45
|
|
|
$Index->content( |
|
46
|
|
|
h::cs_system_admin_themes() |
|
47
|
|
|
); |
|
48
|
|
|
} |
|
49
|
|
|
static function general_languages () { |
|
50
|
|
|
$Index = Index::instance(); |
|
51
|
|
|
$Index->form = false; |
|
52
|
|
|
$Index->content( |
|
53
|
|
|
h::cs_system_admin_languages() |
|
54
|
|
|
); |
|
55
|
|
|
} |
|
56
|
|
|
static function general_optimization () { |
|
57
|
|
|
$Index = Index::instance(); |
|
58
|
|
|
$Index->form = false; |
|
59
|
|
|
$Index->content( |
|
60
|
|
|
h::cs_system_admin_optimization() |
|
61
|
|
|
); |
|
62
|
|
|
} |
|
63
|
|
|
static function general_site_info () { |
|
64
|
|
|
$Index = Index::instance(); |
|
65
|
|
|
$Index->form = false; |
|
66
|
|
|
$Index->content( |
|
67
|
|
|
h::cs_system_admin_site_info() |
|
68
|
|
|
); |
|
69
|
|
|
} |
|
70
|
|
|
static function general_system () { |
|
71
|
|
|
$Index = Index::instance(); |
|
72
|
|
|
$Index->form = false; |
|
73
|
|
|
$Index->content( |
|
74
|
|
|
h::cs_system_admin_system() |
|
75
|
|
|
); |
|
76
|
|
|
} |
|
77
|
|
|
} |
|
78
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.