1
|
|
|
<?php |
2
|
|
|
/* |
3
|
|
|
* This file is part of EC-CUBE |
4
|
|
|
* |
5
|
|
|
* Copyright(c) 2000-2015 LOCKON CO.,LTD. All Rights Reserved. |
6
|
|
|
* |
7
|
|
|
* http://www.lockon.co.jp/ |
8
|
|
|
* |
9
|
|
|
* This program is free software; you can redistribute it and/or |
10
|
|
|
* modify it under the terms of the GNU General Public License |
11
|
|
|
* as published by the Free Software Foundation; either version 2 |
12
|
|
|
* of the License, or (at your option) any later version. |
13
|
|
|
* |
14
|
|
|
* This program is distributed in the hope that it will be useful, |
15
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
16
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17
|
|
|
* GNU General Public License for more details. |
18
|
|
|
* |
19
|
|
|
* You should have received a copy of the GNU General Public License |
20
|
|
|
* along with this program; if not, write to the Free Software |
21
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
22
|
|
|
*/ |
23
|
|
|
|
24
|
|
|
|
25
|
|
|
namespace Eccube\Controller\Admin\Setting\System; |
26
|
|
|
|
27
|
|
|
use Eccube\Application; |
28
|
|
|
use Eccube\Common\Constant; |
29
|
|
|
|
30
|
|
|
class SystemController |
|
|
|
|
31
|
|
|
{ |
32
|
|
|
|
33
|
|
|
private $maintitle; |
|
|
|
|
34
|
|
|
|
35
|
|
|
private $subtitle; |
|
|
|
|
36
|
|
|
|
37
|
|
|
public function __construct() |
|
|
|
|
38
|
|
|
{ |
39
|
|
|
} |
40
|
|
|
|
41
|
2 |
|
public function index(Application $app) |
42
|
|
|
{ |
43
|
2 |
|
switch ($app['request']->get('mode')) { |
44
|
2 |
|
case 'info': |
45
|
1 |
|
ob_start(); |
46
|
1 |
|
phpinfo(); |
47
|
1 |
|
$phpinfo = ob_get_contents(); |
48
|
1 |
|
ob_end_clean(); |
49
|
|
|
|
50
|
1 |
|
return $phpinfo; |
51
|
|
|
|
52
|
|
|
break; |
53
|
|
|
default: |
54
|
1 |
|
break; |
55
|
|
|
} |
56
|
|
|
|
57
|
1 |
|
$this->arrSystemInfo = $this->getSystemInfo($app); |
58
|
|
|
|
59
|
1 |
|
return $app->render('Setting/System/system.twig', array( |
60
|
1 |
|
'arrSystemInfo' => $this->arrSystemInfo, |
61
|
|
|
)); |
62
|
|
|
} |
63
|
|
|
|
64
|
1 |
|
public function getSystemInfo(Application $app) |
|
|
|
|
65
|
|
|
{ |
66
|
1 |
|
$system = $app['eccube.service.system']; |
67
|
1 |
|
$server = $app['request']; |
68
|
|
|
|
69
|
|
|
$arrSystemInfo = array( |
70
|
1 |
|
array('title' => 'EC-CUBE', 'value' => Constant::VERSION), |
71
|
1 |
|
array('title' => 'サーバーOS', 'value' => php_uname()), |
72
|
1 |
|
array('title' => 'DBサーバー', 'value' => $system->getDbversion()), |
73
|
1 |
|
array('title' => 'WEBサーバー', 'value' => $server->server->get("SERVER_SOFTWARE")), |
74
|
|
|
); |
75
|
|
|
|
76
|
1 |
|
$value = phpversion() . ' (' . implode(', ', get_loaded_extensions()) . ')'; |
|
|
|
|
77
|
1 |
|
$arrSystemInfo[] = array('title' => 'PHP', 'value' => $value); |
78
|
1 |
|
$arrSystemInfo[] = array('title' => 'HTTPユーザーエージェント', 'value' => $server->headers->get('User-Agent')); |
79
|
|
|
|
80
|
1 |
|
return $arrSystemInfo; |
81
|
|
|
} |
82
|
|
|
} |
83
|
|
|
|