Subversion Repositories ALCASAR

Rev

Rev 644 | Rev 679 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 644 Rev 654
1
<?php
1
<?php
2
/* written by steweb57 */
2
/* written by steweb57 */
3
 
3
 
4
# Choice of language
4
# Choice of language
5
$Language = 'en';
5
$Language = 'en';
6
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
6
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
7
	$Langue		= explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
7
	$Langue		= explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
8
	$Language	= strtolower(substr(chop($Langue[0]),0,2)); }
8
	$Language	= strtolower(substr(chop($Langue[0]),0,2)); }
9
if($Language == 'fr'){
9
if($Language == 'fr'){
10
	$l_network_title	= "Configuration réseau";
10
	$l_network_title	= "Configuration réseau";
11
	$l_main_services	= "Services réseau principaux";
11
	$l_main_services	= "Services réseau principaux";
12
	$l_opt_services		= "Services réseau optionnels";
12
	$l_opt_services		= "Services réseau optionnels";
13
	$l_eth0_legend		= "Eth0 (Interface connectée à Internet)";
13
	$l_eth0_legend		= "Eth0 (Interface connectée à Internet)";
14
	$l_eth1_legend		= "Eth1 (Réseau de consultation)";
14
	$l_eth1_legend		= "Eth1 (Réseau de consultation)";
15
	$l_internet_legend	= "INTERNET";
15
	$l_internet_legend	= "INTERNET";
16
	$l_ip_adr		= "Adresse IP";
16
	$l_ip_adr		= "Adresse IP";
17
	$l_ip_mask		= "Masque";
17
	$l_ip_mask		= "Masque";
18
	$l_ip_router		= "Passerelle";
18
	$l_ip_router		= "Passerelle";
19
	$l_ip_public		= "Adresse IP public";
19
	$l_ip_public		= "Adresse IP public";
20
	$l_ip_dns1		= "DNS1";
20
	$l_ip_dns1		= "DNS1";
21
	$l_ip_dns2		= "DNS2";
21
	$l_ip_dns2		= "DNS2";
22
	$l_service_title 	= "Nom du service";
22
	$l_service_title 	= "Nom du service";
23
	$l_service_start 	= "D&eacute;marrer";
23
	$l_service_start 	= "D&eacute;marrer";
24
	$l_service_stop 	= "Arr&ecirc;ter";
24
	$l_service_stop 	= "Arr&ecirc;ter";
25
	$l_service_restart 	= "Red&eacute;marrer";
25
	$l_service_restart 	= "Red&eacute;marrer";
26
	$l_service_status 	= "Status";
26
	$l_service_status 	= "Status";
27
	$l_service_action 	= "Actions";
27
	$l_service_action 	= "Actions";
28
	$l_enable		= "actif";
28
	$l_enable		= "actif";
29
	$l_disable		= "inactif";
29
	$l_disable		= "inactif";
30
	$l_radiusd		= "Serveur d'authentification et d'autorisation";
30
	$l_radiusd		= "Serveur d'authentification et d'autorisation";
31
	$l_chilli		= "Passerelle d'interception";
31
	$l_chilli		= "Passerelle d'interception";
32
	$l_dansguardian		= "Filtre d'URL et de contenu WEB";
32
	$l_dansguardian		= "Filtre d'URL et de contenu WEB";
33
	$l_mysqld		= "Serveur de la base de données usager";
33
	$l_mysqld		= "Serveur de la base de données usager";
34
	$l_squid		= "Serveur de cache WEB";
34
	$l_squid		= "Serveur de cache WEB";
35
	$l_dnsmasq		= "Serveur DNS et filtre de domaine";
35
	$l_dnsmasq		= "Serveur DNS et filtre de domaine";
36
	$l_httpd		= "Serveur WEB (Centre de Gestion d'ALCASAR)";
36
	$l_httpd		= "Serveur WEB (Centre de Gestion d'ALCASAR)";
37
	$l_havp			= "Filtre antivirus WEB";
37
	$l_havp			= "Filtre antivirus WEB";
38
	$l_sshd			= "Accès sécurisée à distance";
38
	$l_sshd			= "Accès sécurisée à distance";
39
	$l_freshclam		= "Mise à jour de l'antivirus toutes les 2 heures";
39
	$l_freshclam		= "Mise à jour de l'antivirus toutes les 2 heures";
40
	$l_ntpd			= "Service de mise à l'heure réseau";
40
	$l_ntpd			= "Service de mise à l'heure réseau";
41
} else {
41
} else {
42
	$l_network_title	= "Network configuration";
42
	$l_network_title	= "Network configuration";
43
	$l_main_services	= "Main network services";
43
	$l_main_services	= "Main network services";
44
	$l_opt_services		= "Optional network services";
44
	$l_opt_services		= "Optional network services";
45
	$l_eth0_legend		= "Eth0 (Internet connected interface)";
45
	$l_eth0_legend		= "Eth0 (Internet connected interface)";
46
	$l_eth1_legend		= "Eth1 (Private network)";
46
	$l_eth1_legend		= "Eth1 (Private network)";
47
	$l_internet_legend	= "INTERNET";
47
	$l_internet_legend	= "INTERNET";
48
	$l_ip_adr		= "IP Address";
48
	$l_ip_adr		= "IP Address";
49
	$l_ip_mask		= "Mask";
49
	$l_ip_mask		= "Mask";
50
	$l_ip_router		= "Router";
50
	$l_ip_router		= "Router";
51
	$l_ip_public		= "Public IP address";
51
	$l_ip_public		= "Public IP address";
52
	$l_ip_dns1		= "DNS1 :";
52
	$l_ip_dns1		= "DNS1 :";
53
	$l_ip_dns2		= "DNS2";
53
	$l_ip_dns2		= "DNS2";
54
	$l_service_title 	= "Service name";
54
	$l_service_title 	= "Service name";
55
	$l_service_start 	= "Start";
55
	$l_service_start 	= "Start";
56
	$l_service_stop 	= "Stop";
56
	$l_service_stop 	= "Stop";
57
	$l_service_restart 	= "Restart";
57
	$l_service_restart 	= "Restart";
58
	$l_service_status 	= "Status";
58
	$l_service_status 	= "Status";
59
	$l_service_action 	= "Actions";
59
	$l_service_action 	= "Actions";
60
	$l_enable		= "enable";
60
	$l_enable		= "enable";
61
	$l_disable		= "disable";
61
	$l_disable		= "disable";
62
	$l_radiusd		= "Authentication and authorisation serveur";
62
	$l_radiusd		= "Authentication and authorisation serveur";
63
	$l_chilli		= "Interception gateway";
63
	$l_chilli		= "Interception gateway";
64
	$l_dansguardian		= "URL and WEB content filter";
64
	$l_dansguardian		= "URL and WEB content filter";
65
	$l_mysqld		= "User database server";
65
	$l_mysqld		= "User database server";
66
	$l_squid		= "Proxy Cache WEB";
66
	$l_squid		= "Proxy Cache WEB";
67
	$l_dnsmasq		= "DNS and domain name filter";
67
	$l_dnsmasq		= "DNS and domain name filter";
68
	$l_httpd		= "WEB server (ALCASAR Control Center)";
68
	$l_httpd		= "WEB server (ALCASAR Control Center)";
69
	$l_havp			= "WEB antivirus filter";
69
	$l_havp			= "WEB antivirus filter";
70
	$l_sshd			= "Secure remote access";
70
	$l_sshd			= "Secure remote access";
71
	$l_freshclam		= "WEB antivirus update (every 2 hours)";
71
	$l_freshclam		= "WEB antivirus update (every 2 hours)";
72
	$l_ntpd			= "Network time";
72
	$l_ntpd			= "Network time";
73
}
73
}
74
 
74
 
75
/********************************************************************
75
/********************************************************************
76
*	CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION			*
76
*	CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION			*
77
*********************************************************************/
77
*********************************************************************/
78
 
78
 
79
define ("ALCASAR_CHILLI", "/etc/chilli.conf");
79
define ("ALCASAR_CHILLI", "/etc/chilli.conf");
80
define ("ALCASAR_ETH0", "/etc/sysconfig/network-scripts/ifcfg-eth0");
-
 
81
define ("ALCASAR_ETH1", "/etc/sysconfig/network-scripts/ifcfg-eth1");
-
 
82
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
80
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
83
/********************************************************************
81
/********************************************************************
84
*				TEST DES FICHIERS DE CONFIGURATION					*
82
*				TEST DES FICHIERS DE CONFIGURATION					*
85
*********************************************************************/
83
*********************************************************************/
86
 
84
 
87
//Test de présence et des droits en lecture des fichiers de configuration.
85
//Test de présence et des droits en lecture des fichiers de configuration.
88
if (!file_exists(ALCASAR_CHILLI)){
86
if (!file_exists(ALCASAR_CHILLI)){
89
	exit("Fichier de configuration ".ALCASAR_CHILLI." non présent");
87
	exit("Fichier de configuration ".ALCASAR_CHILLI." non présent");
90
}
88
}
91
if (!file_exists(ALCASAR_ETH0)){
89
if (!file_exists(CONF_FILE)){
92
	exit("Fichier de configuration ".ALCASAR_ETH0." non présent");
90
	exit("Fichier de configuration ".CONF_FILE." non présent");
93
}
91
}
94
if (!file_exists(ALCASAR_ETH1)){
92
if (!is_readable(ALCASAR_CHILLI)){
95
	exit("Fichier de configuration ".ALCASAR_ETH1." non présent");
93
	exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_CHILLI);
96
}
94
}
97
if (!is_readable(ALCASAR_ETH0)){
95
if (!is_readable(CONF_FILE)){
98
	exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_ETH0);
-
 
99
}
-
 
100
if (!is_readable(ALCASAR_ETH1)){
-
 
101
	exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_ETH1);
96
	exit("Vous n'avez pas les droits de lecture sur le fichier ".CONF_FILE);
102
}
97
}
103
 
98
 
104
//fonction pour faire une action (start,stop,restart) sur un service
99
//fonction pour faire une action (start,stop,restart) sur un service
105
function serviceExec($service, $action){
100
function serviceExec($service, $action){
106
	if (($action == "start")||($action == "stop")||($action == "restart")){
101
	if (($action == "start")||($action == "stop")||($action == "restart")){
107
		exec("sudo /sbin/service $service $action",$retval, $retstatus);
102
		exec("sudo /sbin/service $service $action",$retval, $retstatus);
108
		if ($service == "sshd"){
103
		if ($service == "sshd"){
109
			if ($action == "start"){ 
104
			if ($action == "start"){ 
110
				exec("sudo /sbin/chkconfig --add $service");
105
				exec("sudo /sbin/chkconfig --add $service");
111
				file_put_contents(CONF_FILE, str_replace('SSH=off', 'SSH=on', file_get_contents(CONF_FILE)));
106
				file_put_contents(CONF_FILE, str_replace('SSH=off', 'SSH=on', file_get_contents(CONF_FILE)));
112
				exec ("sudo /usr/local/bin/alcasar-iptables.sh");
107
				exec ("sudo /usr/local/bin/alcasar-iptables.sh");
113
				}
108
				}
114
			if ($action == "stop"){
109
			if ($action == "stop"){
115
			       	exec("sudo /sbin/chkconfig --del $service");
110
			       	exec("sudo /sbin/chkconfig --del $service");
116
				file_put_contents(CONF_FILE, str_replace('SSH=on', 'SSH=off', file_get_contents(CONF_FILE)));
111
				file_put_contents(CONF_FILE, str_replace('SSH=on', 'SSH=off', file_get_contents(CONF_FILE)));
117
				exec ("sudo /usr/local/bin/alcasar-iptables.sh");
112
				exec ("sudo /usr/local/bin/alcasar-iptables.sh");
118
				}
113
				}
119
			}
114
			}
120
		return $retstatus;
115
		return $retstatus;
121
	} else {
116
	} else {
122
		return false;
117
		return false;
123
	}
118
	}
124
}
119
}
125
//fonction définissant le status d'un service 
120
//fonction définissant le status d'un service 
126
//(en fonction de la présence d'un mot clé dans la valeur de status)
121
//(en fonction de la présence d'un mot clé dans la valeur de status)
127
function checkServiceStatus($service, $strMatch){
122
function checkServiceStatus($service, $strMatch){
128
	$response = false;
123
	$response = false;
129
	exec("sudo /sbin/service $service status",$retval);
124
	exec("sudo /sbin/service $service status",$retval);
130
	foreach( $retval as $val ) {
125
	foreach( $retval as $val ) {
131
		if (strpos($val,$strMatch)){
126
		if (strpos($val,$strMatch)){
132
			$response = true;
127
			$response = true;
133
			break;
128
			break;
134
		}
129
		}
135
	}
130
	}
136
	return $response;
131
	return $response;
137
}
132
}
138
 
133
 
139
//-------------------------------
134
//-------------------------------
140
// Les actions sur un service
135
// Les actions sur un service
141
//-------------------------------
136
//-------------------------------
142
//sécurité sur les actions à réaliser
137
//sécurité sur les actions à réaliser
143
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","squid","dnsmasq","httpd","havp","sshd","freshclam","ntpd");
138
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","squid","dnsmasq","httpd","havp","sshd","freshclam","ntpd");
144
$autorizeAction = array("start","stop","restart");
139
$autorizeAction = array("start","stop","restart");
145
 
140
 
146
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
141
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
147
    if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
142
    if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
148
    	$execStatus = serviceExec($_GET['service'], $_GET['action']);
143
    	$execStatus = serviceExec($_GET['service'], $_GET['action']);
149
		// execStatus non exploité
144
		// execStatus non exploité
150
	}
145
	}
151
}
146
}
152
//-------------------------------
147
//-------------------------------
153
//recherche du status des services
148
//recherche du status des services
154
//-------------------------------
149
//-------------------------------
155
$MainServiceStatus = array();
150
$MainServiceStatus = array();
156
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd","pid");
151
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd","pid");
157
$MainServiceStatus['chilli'] = checkServiceStatus("chilli","pid");
152
$MainServiceStatus['chilli'] = checkServiceStatus("chilli","pid");
158
$MainServiceStatus['dansguardian'] = checkServiceStatus("dansguardian","pid");
153
$MainServiceStatus['dansguardian'] = checkServiceStatus("dansguardian","pid");
159
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld","OK");
154
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld","OK");
160
$MainServiceStatus['squid'] = checkServiceStatus("squid","pid");
155
$MainServiceStatus['squid'] = checkServiceStatus("squid","pid");
161
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq","pid");
156
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq","pid");
162
$MainServiceStatus['httpd'] = checkServiceStatus("httpd","pid");
157
$MainServiceStatus['httpd'] = checkServiceStatus("httpd","pid");
163
$MainServiceStatus['havp'] = checkServiceStatus("havp","pid");
158
$MainServiceStatus['havp'] = checkServiceStatus("havp","pid");
164
 
159
 
165
$OptServiceStatus = array();
160
$OptServiceStatus = array();
166
$OptServiceStatus['sshd'] = checkServiceStatus("sshd","pid");
161
$OptServiceStatus['sshd'] = checkServiceStatus("sshd","pid");
167
$OptServiceStatus['freshclam'] = checkServiceStatus("freshclam","pid");
162
$OptServiceStatus['freshclam'] = checkServiceStatus("freshclam","pid");
168
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd","pid");
163
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd","pid");
169
 
164
 
170
// Fonction de test de connectivité internet
165
// Fonction de test de connectivité internet
171
function internetTest(){
166
function internetTest(){
172
	$host = "74.125.230.83"; #www.google.fr
167
	$host = "74.125.230.83"; #www.google.fr
173
	$port = "80";
168
	$port = "80";
174
	//var $num;	//non utilisé
169
	//var $num;	//non utilisé
175
	//var $error;	//non utilisé
170
	//var $error;	//non utilisé
176
	
171
	
177
	if (! $sock = @fsockopen($host, $port, $num, $error, 5)) {
172
	if (! $sock = @fsockopen($host, $port, $num, $error, 5)) {
178
		return false;
173
		return false;
179
	} else {
174
	} else {
180
		fclose($sock);
175
		fclose($sock);
181
		return true;
176
		return true;
182
	}
177
	}
183
}
178
}
184
/********************************************************************
179
/********************************************************************
185
*			Lecture du fichier ALCASAR_CHILLI						*
180
*			Lecture du fichier ALCASAR_CHILLI						*
186
*********************************************************************/
181
*********************************************************************/
187
$ouvre=fopen(ALCASAR_CHILLI,"r");
182
$ouvre=fopen(ALCASAR_CHILLI,"r");
188
if ($ouvre){
183
if ($ouvre){
189
	while (!feof ($ouvre))
184
	while (!feof ($ouvre))
190
	{
185
	{
191
		$tampon = fgets($ouvre, 4096);
186
		$tampon = fgets($ouvre, 4096);
192
		if (strpos($tampon,"=")!==false){
187
		if (strpos($tampon,"=")!==false){
193
			$tmp = explode("=",$tampon);
188
			$tmp = explode("=",$tampon);
194
			$chilli[$tmp[0]] = $tmp[1];
189
			$chilli[$tmp[0]] = $tmp[1];
195
		}
190
		}
196
	}
191
	}
197
}else{
192
}else{
198
	exit("Erreur d'ouverture du fichier ".ALCASAR_CHILLI);
193
	exit("Erreur d'ouverture du fichier ".ALCASAR_CHILLI);
199
}
194
}
200
fclose($ouvre);
195
fclose($ouvre);
201
 
196
 
202
/********************************************************************
197
/********************************************************************
203
*			Lecture du fichier ALCASAR_ETH0							*
198
*			Lecture du fichier CONF_FILE							*
204
*********************************************************************/
-
 
205
$ouvre=fopen(ALCASAR_ETH0,"r");
-
 
206
if ($ouvre){
-
 
207
	while (!feof ($ouvre))
-
 
208
	{
-
 
209
		$tampon = fgets($ouvre, 4096);
-
 
210
		if (strpos($tampon,"=")!==false){
-
 
211
			$tmp = explode("=",$tampon);
-
 
212
			$eth0[$tmp[0]] = $tmp[1];
-
 
213
		}
-
 
214
	}
-
 
215
}else{
-
 
216
	exit("Erreur d'ouverture du fichier ".ALCASAR_ETH0);
-
 
217
}
-
 
218
fclose($ouvre);
-
 
219
 
-
 
220
/********************************************************************
-
 
221
*			Lecture du fichier ALCASAR_ETH1							*
-
 
222
*********************************************************************/
199
*********************************************************************/
223
$ouvre=fopen(ALCASAR_ETH1,"r");
200
$ouvre=fopen(CONF_FILE,"r");
224
if ($ouvre){
201
if ($ouvre){
225
	while (!feof ($ouvre))
202
	while (!feof ($ouvre))
226
	{
203
	{
227
		$tampon = fgets($ouvre, 4096);
204
		$tampon = fgets($ouvre, 4096);
228
		if (strpos($tampon,"=")!==false){
205
		if (strpos($tampon,"=")!==false){
229
			$tmp = explode("=",$tampon);
206
			$tmp = explode("=",$tampon);
230
			$eth1[$tmp[0]] = $tmp[1];
207
			$conf[$tmp[0]] = $tmp[1];
231
		}
208
		}
232
	}
209
	}
233
}else{
210
}else{
234
	exit("Erreur d'ouverture du fichier ".ALCASAR_ETH1);
211
	exit("Erreur d'ouverture du fichier ".ALCASAR_ETH1);
235
}
212
}
236
fclose($ouvre);
213
fclose($ouvre);
237
 
214
 
238
/************************
215
/************************
239
*	TO DO		*
216
*	TO DO		*
240
*************************/
217
*************************/
241
//modification de la conf réseau, cmd : ifconfig eth0 .....
218
//modification de la conf réseau, cmd : ifconfig eth0 .....
242
//synchro de la modification réseau dans les différentes couches d'alcasar
219
//synchro de la modification réseau dans les différentes couches d'alcasar
243
//gestion du dhcp (affichage,modification, ajout @static)
220
//gestion du dhcp (affichage,modification, ajout @static)
244
 
221
 
245
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
222
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
246
<html><!-- written by steweb57 / rexy -->
223
<html><!-- written by steweb57 / rexy -->
247
<head>
224
<head>
248
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
225
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
249
<title><?php echo $l_network_title; ?></title>
226
<title><?php echo $l_network_title; ?></title>
250
<link rel="stylesheet" href="/css/style.css" type="text/css">
227
<link rel="stylesheet" href="/css/style.css" type="text/css">
251
</head>
228
</head>
252
<body>
229
<body>
253
<table width="100%" border="0" cellspacing="0" cellpadding="0">
230
<table width="100%" border="0" cellspacing="0" cellpadding="0">
254
	<tr><th><?php echo $l_network_title; ?></th></tr>
231
	<tr><th><?php echo $l_network_title; ?></th></tr>
255
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
232
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
256
</table>
233
</table>
257
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
234
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
258
	<tr><td valign="middle" align="left">
235
	<tr><td valign="middle" align="left">
259
	<fieldset>
236
	<fieldset>
260
	<legend><?php echo $l_internet_legend;
237
	<legend><?php echo $l_internet_legend;
261
 	if (InternetTest()){
238
 	if (InternetTest()){
262
		echo " <img src='/images/state_ok.gif'> $l_enable";
239
		echo " <img src='/images/state_ok.gif'> $l_enable";
263
		$IP_PUB = exec ("wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1");}
240
		$IP_PUB = exec ("wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1");}
264
	else 	{
241
	else 	{
265
		echo " <img src='/images/state_error.gif'> $l_disable";
242
		echo " <img src='/images/state_error.gif'> $l_disable";
266
		$IP_PUB = "-.-.-.-";}
243
		$IP_PUB = "-.-.-.-";}
267
	?></legend>
244
	?></legend>
268
	<table>
245
	<table>
269
		<tr><td><?php echo $l_ip_public." : </td><td>".$IP_PUB;?></td></tr>
246
		<tr><td><?php echo $l_ip_public." : </td><td>".$IP_PUB;?></td></tr>
270
		<tr><td><?php echo $l_ip_dns1." : </td><td>".$eth0["DNS1"];?></td></tr>
247
		<tr><td><?php echo $l_ip_dns1." : </td><td>".$conf["DNS1"];?></td></tr>
271
		<tr><td><?php echo $l_ip_dns2." : </td><td>".$eth0["DNS2"];?></td></tr>
248
		<tr><td><?php echo $l_ip_dns2." : </td><td>".$conf["DNS2"];?></td></tr>
272
	</table>
249
	</table>
273
	</fieldset>
250
	</fieldset>
274
	</td><td>
251
	</td><td>
275
	<fieldset>
252
	<fieldset>
276
	<legend><?php echo $l_eth0_legend; ?></legend>
253
	<legend><?php echo $l_eth0_legend; ?></legend>
277
	<table>
254
	<table>
278
		<tr><td><?php echo $l_ip_adr." : </td><td>".$eth0["IPADDR"];?></td></tr>
255
		<tr><td><?php echo $l_ip_adr." : </td><td>".$conf["PUBLIC_IP"];?></td></tr>
279
		<tr><td><?php echo $l_ip_mask." : </td><td>".$eth0["NETMASK"];?></td></tr>
-
 
280
		<tr><td><?php echo $l_ip_router." : </td><td>".$eth0["GATEWAY"];?></td></tr>
256
		<tr><td><?php echo $l_ip_router." : </td><td>".$conf["GW"];?></td></tr>
281
	</table>
257
	</table>
282
	</fieldset>
258
	</fieldset>
283
	</td><td>
259
	</td><td>
284
	<fieldset>
260
	<fieldset>
285
	<legend><?php echo $l_eth1_legend; ?></legend>
261
	<legend><?php echo $l_eth1_legend; ?></legend>
286
	<table>
262
	<table>
287
		<tr><td><?php echo $l_ip_adr." : </td><td>".$eth1["IPADDR"];?></td></tr>
263
		<tr><td><?php echo $l_ip_adr." : </td><td>".$conf["PRIVATE_IP"];?></td></tr>
288
		<tr><td><?php echo $l_ip_mask." : </td><td>".$eth1["NETMASK"];?></td></tr>
-
 
289
	</table>
264
	</table>
290
	</fieldset>
265
	</fieldset>
291
	</td></tr>
266
	</td></tr>
292
</table>
267
</table>
293
<table width="100%" border="0" cellspacing="0" cellpadding="0">
268
<table width="100%" border="0" cellspacing="0" cellpadding="0">
294
	<tr><th><?php echo $l_main_services; ?></th></tr>
269
	<tr><th><?php echo $l_main_services; ?></th></tr>
295
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
270
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
296
</table>
271
</table>
297
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
272
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
298
	<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr>
273
	<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr>
299
	<TR align="center">
274
	<TR align="center">
300
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?>
275
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?>
301
<tr>
276
<tr>
302
	<?php if ($statusOK) { ?>
277
	<?php if ($statusOK) { ?>
303
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
278
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
304
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
279
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
305
    <td width="80" align="center">---</td>
280
    <td width="80" align="center">---</td>
306
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
281
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
307
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
282
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
308
	<?php } else { ?>
283
	<?php } else { ?>
309
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
284
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
310
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
285
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
311
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
286
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
312
    <td width="80" align="center">---</td>
287
    <td width="80" align="center">---</td>
313
    <td width="80" align="center">---</td>
288
    <td width="80" align="center">---</td>
314
    <?php } ?>
289
    <?php } ?>
315
</tr>
290
</tr>
316
<?php } ?>
291
<?php } ?>
317
</td></tr>
292
</td></tr>
318
</table>
293
</table>
319
<table width="100%" border="0" cellspacing="0" cellpadding="0">
294
<table width="100%" border="0" cellspacing="0" cellpadding="0">
320
	<tr><th><?php echo $l_opt_services; ?></th></tr>
295
	<tr><th><?php echo $l_opt_services; ?></th></tr>
321
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
296
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
322
</table>
297
</table>
323
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
298
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
324
	<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr>
299
	<tr align="center"><td><?php echo $l_service_status;?></td><td colspan="2"><?php echo $l_service_title;?></td><td colspan="3"><?php echo $l_service_action;?></td></tr>
325
	<TR align="center">
300
	<TR align="center">
326
<?php foreach( $OptServiceStatus as $serviceName => $statusOK ) { ?>
301
<?php foreach( $OptServiceStatus as $serviceName => $statusOK ) { ?>
327
<tr>
302
<tr>
328
	<?php if ($statusOK) { ?>
303
	<?php if ($statusOK) { ?>
329
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
304
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
330
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
305
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
331
    <td width="80" align="center">---</td>
306
    <td width="80" align="center">---</td>
332
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
307
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
333
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
308
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
334
	<?php } else { ?>
309
	<?php } else { ?>
335
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
310
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
336
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
311
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
337
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
312
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
338
    <td width="80" align="center">---</td>
313
    <td width="80" align="center">---</td>
339
    <td width="80" align="center">---</td>
314
    <td width="80" align="center">---</td>
340
    <?php } ?>
315
    <?php } ?>
341
</tr>
316
</tr>
342
<?php } ?>
317
<?php } ?>
343
</td></tr>
318
</td></tr>
344
</table>
319
</table>
345
</body>
320
</body>
346
</html>
321
</html>
347
 
322