-
Notifications
You must be signed in to change notification settings - Fork 2
/
system_check.php
170 lines (158 loc) · 4.37 KB
/
system_check.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?php
if(!defined("MINIGAL_INTERNAL")) {
define("MINIGAL_INTERNAL", true);
}
$config_exists = ((include "config.php") == 'MINIGAL_INCLUDE_OK');
require("i18n/en_US.php");
if (array_key_exists('i18n', $config))
if((include("i18n/".$config['i18n'].".php")) != "MINIGAL_INCLUDE_OK")
echo "Error: Could not include language file i18n/".$config['i18n'].".php";
$exif = "No";
$gd = "No";
$update = "No";
if (array_key_exists("memory_limit", $config)) ini_set("memory_limit",$config['memory_limit']);
if (function_exists('exif_read_data')) $exif = "Yes";
if (extension_loaded('gd') && function_exists('gd_info')) $gd = "Yes";
if (ini_get("allow_url_fopen") == 1) $update = "Yes";
function check_ffmpegthumbnailer() {
global $config;
if(!file_exists($config['ffmpegthumbnailer'])) {
return "No";
}
$output = exec(escapeshellarg($config['ffmpegthumbnailer']) . " -v");
return explode(" ",$output)[2];
}
$thumbnailer_version = check_ffmpegthumbnailer();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="robots" content="noindex, nofollow">
<title><?php echo $i18n['syscheck_page_title']; ?></title>
<style type="text/css">
body {
background-color: #daddd8;
font: 12px Arial, Tahoma, "Times New Roman", serif;
}
h1 {
font-size: 30px;
margin: 20px 0 5px 0;
letter-spacing: -2px;
}
div {
line-height: 20px;
}
.left {
width: 300px;
display: inline-table;
background-color: #fdffbe;
padding: 2px;
}
.middle-neutral {
font-weight: bold;
text-align: center;
width: 100px;
display: inline-table;
background-color: #fdffbe;
padding: 2px;
}
.middle-no {
font-weight: bold;
text-align: center;
width: 100px;
display: inline-table;
background-color: #ff8181;
padding: 2px;
}
.middle-yes {
font-weight: bold;
text-align: center;
width: 100px;
display: inline-table;
background-color: #98ffad;
padding: 2px;
}
.right {
width: 600px;
display: inline-table;
background-color: #eaf1ea;
padding: 2px;
}
</style>
<body>
<h1><?php echo $i18n['syscheck_page_title']; ?></h1>
<div class="left">
<?php echo $i18n['syscheck_php_title']; ?>
</div>
<div class="<?php if(version_compare(phpversion(), "4.0", '>')) echo 'middle-yes'; else echo 'middle-no' ?>">
<?php echo phpversion(); ?>
</div>
<div class="right">
<?php echo $i18n['syscheck_php_desc']; ?>
</div>
<br />
<div class="left">
<?php echo $i18n['syscheck_gd_title']; ?>
</div>
<div class="<?php if($gd == "Yes") echo 'middle-yes'; else echo 'middle-no' ?>">
<?php echo $gd; ?>
</div>
<div class="right">
<?php echo $i18n['syscheck_gd_desc']; ?>
</div>
<br />
<div class="left">
<?php echo $i18n['syscheck_exif_title']; ?>
</div>
<div class="<?php if($exif == "Yes") echo 'middle-yes'; else echo 'middle-neutral' ?>">
<?php echo $exif; ?>
</div>
<div class="right">
<?php echo $i18n['syscheck_exif_desc']; ?>
</div>
<br />
<div class="left">
<?php echo $i18n['syscheck_videothumb_title']; ?>
</div>
<div class="<?php if($thumbnailer_version == "No") echo 'middle-no'; else echo 'middle-yes' ?>">
<?php echo $thumbnailer_version; ?>
</div>
<div class="right">
<?php echo $i18n['syscheck_videothumb_desc']; ?>
</div>
<br />
<div class="left">
<?php echo $i18n['syscheck_conf_title']; ?>
</div>
<div class="<?php if($config_exists) echo 'middle-yes'; else echo 'middle-no' ?>">
<?php clearstatcache(null, "config.php");echo decoct( fileperms("config.php") & 0777 ); ?>
</div>
<div class="right">
<?php echo $i18n['syscheck_conf_desc']; ?>
</div>
<br />
<div class="left">
<?php echo $i18n['syscheck_mem_title']; ?>
</div>
<div class="middle-neutral">
<?php echo ini_get("memory_limit"); ?>
</div>
<div class="right">
<?php echo $i18n['syscheck_mem_desc']; ?>
</div>
<br />
<div class="left">
<?php echo $i18n['syscheck_versioncheck_title']; ?>
</div>
<div class="middle-neutral">
<?php echo $update ?>
</div>
<div class="right">
<?php echo $i18n['syscheck_versioncheck_desc']; ?>
</div>
<br /><br />
<!--<a href="http://www.minigal.dk/minigal-nano.html" target="_blank">Support website</a>
| <a href="http://www.minigal.dk/forum" target="_blank">Support forum</a> --!>
</body>
</html>