Subversion Repositories ALCASAR

Rev

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

Rev 2171 Rev 2182
Line -... Line 1...
-
 
1
<?php
-
 
2
# $Id $
-
 
3
 
-
 
4
define ('CONF_FILE', '/usr/local/etc/alcasar.conf');
-
 
5
 
-
 
6
// Read CONF_FILE
-
 
7
$file_conf = fopen(CONF_FILE, 'r');
-
 
8
if (!$file_conf) {
-
 
9
	exit('Error opening the file '.CONF_FILE);
-
 
10
}
-
 
11
while (!feof($file_conf)) {
-
 
12
	$tampon = fgets($file_conf, 4096);
-
 
13
	if ((strpos($tampon, '=') !== false) && (substr($tampon, 0, 1) !== '#')) {
-
 
14
		$tmp = explode('=', $tampon);
-
 
15
		$conf[$tmp[0]] = trim($tmp[1]);
-
 
16
	}
-
 
17
}
-
 
18
fclose($file_conf);
-
 
19
?>
1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0">
20
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN//2.0">
2
<HTML>
21
<HTML>
3
<!-- written by Rexy ! -->
22
<!-- written by Rexy ! -->
4
<HEAD>
23
<HEAD>
5
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
24
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Line 27... Line 46...
27
else
46
else
28
{
47
{
29
	exit();
48
	exit();
30
}
49
}
31
 
50
 
32
// Get current version
-
 
33
$installed_version = trim(exec("grep ^VERSION /usr/local/etc/alcasar.conf | cut -d'=' -f2"));
51
$installed_version = $conf['VERSION'];
34
 
52
 
35
# Choice of language
53
# Choice of language
36
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
54
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
37
{
55
{
38
	$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
56
	$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);