Subversion Repositories ALCASAR

Rev

Rev 2841 | Rev 2864 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2841 Rev 2845
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: security.php 2841 2020-06-28 21:49:00Z rexy $
2
# $Id: security.php 2845 2020-07-04 17:54:03Z rexy $
3
 
3
 
4
$language = 'en';
4
$language = 'en';
5
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
5
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
6
    $langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
6
    $langue = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
7
    $language = strtolower(substr(chop($langue[0]), 0, 2));
7
    $language = strtolower(substr(chop($langue[0]), 0, 2));
Line 100... Line 100...
100
				</table>
100
				</table>
101
			</div>
101
			</div>
102
<?php
102
<?php
103
} else if ($tab === 2) {
103
} else if ($tab === 2) {
104
	$filePath = '/var/log/clamav/clamd.log';
104
	$filePath = '/var/log/clamav/clamd.log';
-
 
105
	$pattern = "/\bfound\b/i";
105
	$lines = file($filePath);
106
	$lines = preg_grep ($pattern, file($filePath));
106
	if ($lines === false) {
107
	if ($lines === false) {
107
		exit("Cannot open '$filePath'.");
108
		exit("Cannot open '$filePath'.");
108
	}
109
	}
109
	$lines = array_reverse($lines);
110
	$lines = array_reverse($lines);
110
?>
111
?>