Subversion Repositories ALCASAR

Rev

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

Rev 356 Rev 360
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 pricipaux";
11
	$l_main_services	= "Services réseau pricipaux";
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/default-ifcfg-eth0");
80
define ("ALCASAR_ETH0", "/etc/sysconfig/network-scripts/default-ifcfg-eth0");
81
define ("ALCASAR_ETH1", "/etc/sysconfig/network-scripts/ifcfg-eth1");
81
define ("ALCASAR_ETH1", "/etc/sysconfig/network-scripts/ifcfg-eth1");
82
 
82
 
83
/********************************************************************
83
/********************************************************************
84
*				TEST DES FICHIERS DE CONFIGURATION					*
84
*				TEST DES FICHIERS DE CONFIGURATION					*
85
*********************************************************************/
85
*********************************************************************/
86
 
86
 
87
//Test de présence et des droits en lecture des fichiers de configuration.
87
//Test de présence et des droits en lecture des fichiers de configuration.
88
if (!file_exists(ALCASAR_CHILLI)){
88
if (!file_exists(ALCASAR_CHILLI)){
89
	exit("Fichier de configuration ".ALCASAR_CHILLI." non présent");
89
	exit("Fichier de configuration ".ALCASAR_CHILLI." non présent");
90
}
90
}
91
if (!file_exists(ALCASAR_ETH0)){
91
if (!file_exists(ALCASAR_ETH0)){
92
	exit("Fichier de configuration ".ALCASAR_ETH0." non présent");
92
	exit("Fichier de configuration ".ALCASAR_ETH0." non présent");
93
}
93
}
94
if (!file_exists(ALCASAR_ETH1)){
94
if (!file_exists(ALCASAR_ETH1)){
95
	exit("Fichier de configuration ".ALCASAR_ETH1." non présent");
95
	exit("Fichier de configuration ".ALCASAR_ETH1." non présent");
96
}
96
}
97
if (!is_readable(ALCASAR_ETH0)){
97
if (!is_readable(ALCASAR_ETH0)){
98
	exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_ETH0);
98
	exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_ETH0);
99
}
99
}
100
if (!is_readable(ALCASAR_ETH1)){
100
if (!is_readable(ALCASAR_ETH1)){
101
	exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_ETH1);
101
	exit("Vous n'avez pas les droits de lecture sur le fichier ".ALCASAR_ETH1);
102
}
102
}
103
 
103
 
104
//fonction pour faire une action (start,stop,restart) sur un service
104
//fonction pour faire une action (start,stop,restart) sur un service
105
function serviceExec($service, $action){
105
function serviceExec($service, $action){
106
	if (($action == "start")||($action == "stop")||($action == "restart")){
106
	if (($action == "start")||($action == "stop")||($action == "restart")){
107
		exec("sudo /sbin/service $service $action",$retval, $retstatus);
107
		exec("sudo /sbin/service $service $action",$retval, $retstatus);
108
		return $retstatus;
108
		return $retstatus;
109
	} else {
109
	} else {
110
		return false;
110
		return false;
111
	}
111
	}
112
}
112
}
113
//fonction définissant le status d'un service 
113
//fonction définissant le status d'un service 
114
//(en fonction de la présence d'un mot clé dans la valeur de status)
114
//(en fonction de la présence d'un mot clé dans la valeur de status)
115
function checkServiceStatus($service, $strMatch){
115
function checkServiceStatus($service, $strMatch){
116
	$response = false;
116
	$response = false;
117
	exec("sudo /sbin/service $service status",$retval);
117
	exec("sudo /sbin/service $service status",$retval);
118
	foreach( $retval as $val ) {
118
	foreach( $retval as $val ) {
119
		if (strpos($val,$strMatch)){
119
		if (strpos($val,$strMatch)){
120
			$response = true;
120
			$response = true;
121
			break;
121
			break;
122
		}
122
		}
123
	}
123
	}
124
	return $response;
124
	return $response;
125
}
125
}
126
 
126
 
127
//-------------------------------
127
//-------------------------------
128
// Les actions sur un service
128
// Les actions sur un service
129
//-------------------------------
129
//-------------------------------
130
//sécurité sur les actions à réaliser
130
//sécurité sur les actions à réaliser
131
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","squid","dnsmasq","httpd","havp","sshd","freshclam","ntpd");
131
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","squid","dnsmasq","httpd","havp","sshd","freshclam","ntpd");
132
$autorizeAction = array("start","stop","restart");
132
$autorizeAction = array("start","stop","restart");
133
 
133
 
134
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
134
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
135
    if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
135
    if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
136
    	$execStatus = serviceExec($_GET['service'], $_GET['action']);
136
    	$execStatus = serviceExec($_GET['service'], $_GET['action']);
137
		// execStatus non exploité
137
		// execStatus non exploité
138
	}
138
	}
139
}
139
}
140
//-------------------------------
140
//-------------------------------
141
//recherche du status des services
141
//recherche du status des services
142
//-------------------------------
142
//-------------------------------
143
$MainServiceStatus = array();
143
$MainServiceStatus = array();
144
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd","pid");
144
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd","pid");
145
$MainServiceStatus['chilli'] = checkServiceStatus("chilli","pid");
145
$MainServiceStatus['chilli'] = checkServiceStatus("chilli","pid");
146
$MainServiceStatus['dansguardian'] = checkServiceStatus("dansguardian","pid");
146
$MainServiceStatus['dansguardian'] = checkServiceStatus("dansguardian","pid");
147
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld","OK");
147
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld","OK");
148
$MainServiceStatus['squid'] = checkServiceStatus("squid","pid");
148
$MainServiceStatus['squid'] = checkServiceStatus("squid","pid");
149
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq","pid");
149
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq","pid");
150
$MainServiceStatus['httpd'] = checkServiceStatus("httpd","pid");
150
$MainServiceStatus['httpd'] = checkServiceStatus("httpd","pid");
151
$MainServiceStatus['havp'] = checkServiceStatus("havp","pid");
151
$MainServiceStatus['havp'] = checkServiceStatus("havp","pid");
152
 
152
 
153
$OptServiceStatus = array();
153
$OptServiceStatus = array();
154
$OptServiceStatus['sshd'] = checkServiceStatus("sshd","pid");
154
$OptServiceStatus['sshd'] = checkServiceStatus("sshd","pid");
155
$OptServiceStatus['freshclam'] = checkServiceStatus("freshclam","pid");
155
$OptServiceStatus['freshclam'] = checkServiceStatus("freshclam","pid");
156
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd","pid");
156
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd","pid");
157
 
157
 
158
// Fonction de test de connectivité internet
158
// Fonction de test de connectivité internet
159
function internetTest(){
159
function internetTest(){
160
	$host = "www.google.fr";
160
	$host = "74.125.230.83"; #www.google.fr
161
	$port = "80";
161
	$port = "80";
162
	//var $num;	//non utilisé
162
	//var $num;	//non utilisé
163
	//var $error;	//non utilisé
163
	//var $error;	//non utilisé
164
	
164
	
165
	if (! $sock = @fsockopen($host, $port, $num, $error, 5)) {
165
	if (! $sock = @fsockopen($host, $port, $num, $error, 5)) {
166
		return false;
166
		return false;
167
	} else {
167
	} else {
168
		fclose($sock);
168
		fclose($sock);
169
		return true;
169
		return true;
170
	}
170
	}
171
}
171
}
172
/********************************************************************
172
/********************************************************************
173
*			Lecture du fichier ALCASAR_CHILLI						*
173
*			Lecture du fichier ALCASAR_CHILLI						*
174
*********************************************************************/
174
*********************************************************************/
175
$ouvre=fopen(ALCASAR_CHILLI,"r");
175
$ouvre=fopen(ALCASAR_CHILLI,"r");
176
if ($ouvre){
176
if ($ouvre){
177
	while (!feof ($ouvre))
177
	while (!feof ($ouvre))
178
	{
178
	{
179
		$tampon = fgets($ouvre, 4096);
179
		$tampon = fgets($ouvre, 4096);
180
		if (strpos($tampon,"=")!==false){
180
		if (strpos($tampon,"=")!==false){
181
			$tmp = explode("=",$tampon);
181
			$tmp = explode("=",$tampon);
182
			$chilli[$tmp[0]] = $tmp[1];
182
			$chilli[$tmp[0]] = $tmp[1];
183
		}
183
		}
184
	}
184
	}
185
}else{
185
}else{
186
	exit("Erreur d'ouverture du fichier ".ALCASAR_CHILLI);
186
	exit("Erreur d'ouverture du fichier ".ALCASAR_CHILLI);
187
}
187
}
188
fclose($ouvre);
188
fclose($ouvre);
189
 
189
 
190
/********************************************************************
190
/********************************************************************
191
*			Lecture du fichier ALCASAR_ETH0							*
191
*			Lecture du fichier ALCASAR_ETH0							*
192
*********************************************************************/
192
*********************************************************************/
193
$ouvre=fopen(ALCASAR_ETH0,"r");
193
$ouvre=fopen(ALCASAR_ETH0,"r");
194
if ($ouvre){
194
if ($ouvre){
195
	while (!feof ($ouvre))
195
	while (!feof ($ouvre))
196
	{
196
	{
197
		$tampon = fgets($ouvre, 4096);
197
		$tampon = fgets($ouvre, 4096);
198
		if (strpos($tampon,"=")!==false){
198
		if (strpos($tampon,"=")!==false){
199
			$tmp = explode("=",$tampon);
199
			$tmp = explode("=",$tampon);
200
			$eth0[$tmp[0]] = $tmp[1];
200
			$eth0[$tmp[0]] = $tmp[1];
201
		}
201
		}
202
	}
202
	}
203
}else{
203
}else{
204
	exit("Erreur d'ouverture du fichier ".ALCASAR_ETH0);
204
	exit("Erreur d'ouverture du fichier ".ALCASAR_ETH0);
205
}
205
}
206
fclose($ouvre);
206
fclose($ouvre);
207
 
207
 
208
/********************************************************************
208
/********************************************************************
209
*			Lecture du fichier ALCASAR_ETH1							*
209
*			Lecture du fichier ALCASAR_ETH1							*
210
*********************************************************************/
210
*********************************************************************/
211
$ouvre=fopen(ALCASAR_ETH1,"r");
211
$ouvre=fopen(ALCASAR_ETH1,"r");
212
if ($ouvre){
212
if ($ouvre){
213
	while (!feof ($ouvre))
213
	while (!feof ($ouvre))
214
	{
214
	{
215
		$tampon = fgets($ouvre, 4096);
215
		$tampon = fgets($ouvre, 4096);
216
		if (strpos($tampon,"=")!==false){
216
		if (strpos($tampon,"=")!==false){
217
			$tmp = explode("=",$tampon);
217
			$tmp = explode("=",$tampon);
218
			$eth1[$tmp[0]] = $tmp[1];
218
			$eth1[$tmp[0]] = $tmp[1];
219
		}
219
		}
220
	}
220
	}
221
}else{
221
}else{
222
	exit("Erreur d'ouverture du fichier ".ALCASAR_ETH1);
222
	exit("Erreur d'ouverture du fichier ".ALCASAR_ETH1);
223
}
223
}
224
fclose($ouvre);
224
fclose($ouvre);
225
 
225
 
226
/************************
226
/************************
227
*	TO DO		*
227
*	TO DO		*
228
*************************/
228
*************************/
229
//modification de la conf réseau, cmd : ifconfig eth0 .....
229
//modification de la conf réseau, cmd : ifconfig eth0 .....
230
//synchro de la modification réseau dans les différentes couches d'alcasar
230
//synchro de la modification réseau dans les différentes couches d'alcasar
231
//gestion du dhcp (affichage,modification, ajout @static)
231
//gestion du dhcp (affichage,modification, ajout @static)
232
 
232
 
233
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
233
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
234
<html><!-- written by steweb57 / rexy -->
234
<html><!-- written by steweb57 / rexy -->
235
<head>
235
<head>
236
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
236
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
237
<title><?php echo $l_network_title; ?></title>
237
<title><?php echo $l_network_title; ?></title>
238
<link rel="stylesheet" href="/css/style.css" type="text/css">
238
<link rel="stylesheet" href="/css/style.css" type="text/css">
239
</head>
239
</head>
240
<body>
240
<body>
241
<table width="100%" border="0" cellspacing="0" cellpadding="0">
241
<table width="100%" border="0" cellspacing="0" cellpadding="0">
242
	<tr><th><?php echo $l_network_title; ?></th></tr>
242
	<tr><th><?php echo $l_network_title; ?></th></tr>
243
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
243
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
244
</table>
244
</table>
245
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
245
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
246
	<tr><td valign="middle" align="left">
246
	<tr><td valign="middle" align="left">
247
	<fieldset>
247
	<fieldset>
248
	<legend><?php echo $l_internet_legend;
248
	<legend><?php echo $l_internet_legend;
249
 	if (InternetTest()){
249
 	if (InternetTest()){
250
		echo " <img src='/images/state_ok.gif'> $l_enable";
250
		echo " <img src='/images/state_ok.gif'> $l_enable";
251
		$IP_PUB = exec ("wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1");}
251
		$IP_PUB = exec ("wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1");}
252
	else 	{
252
	else 	{
253
		echo " <img src='/images/state_error.gif'> $l_disable";
253
		echo " <img src='/images/state_error.gif'> $l_disable";
254
		$IP_PUB = "-.-.-.-";}
254
		$IP_PUB = "-.-.-.-";}
255
	?></legend>
255
	?></legend>
256
	<table>
256
	<table>
257
		<tr><td><?php echo $l_ip_public." : </td><td>".$IP_PUB;?></td></tr>
257
		<tr><td><?php echo $l_ip_public." : </td><td>".$IP_PUB;?></td></tr>
258
		<tr><td><?php echo $l_ip_dns1." : </td><td>".$eth0["DNS1"];?></td></tr>
258
		<tr><td><?php echo $l_ip_dns1." : </td><td>".$eth0["DNS1"];?></td></tr>
259
		<tr><td><?php echo $l_ip_dns2." : </td><td>".$eth0["DNS2"];?></td></tr>
259
		<tr><td><?php echo $l_ip_dns2." : </td><td>".$eth0["DNS2"];?></td></tr>
260
	</table>
260
	</table>
261
	</fieldset>
261
	</fieldset>
262
	</td><td>
262
	</td><td>
263
	<fieldset>
263
	<fieldset>
264
	<legend><?php echo $l_eth0_legend; ?></legend>
264
	<legend><?php echo $l_eth0_legend; ?></legend>
265
	<table>
265
	<table>
266
		<tr><td><?php echo $l_ip_adr." : </td><td>".$eth0["IPADDR"];?></td></tr>
266
		<tr><td><?php echo $l_ip_adr." : </td><td>".$eth0["IPADDR"];?></td></tr>
267
		<tr><td><?php echo $l_ip_mask." : </td><td>".$eth0["NETMASK"];?></td></tr>
267
		<tr><td><?php echo $l_ip_mask." : </td><td>".$eth0["NETMASK"];?></td></tr>
268
		<tr><td><?php echo $l_ip_router." : </td><td>".$eth0["GATEWAY"];?></td></tr>
268
		<tr><td><?php echo $l_ip_router." : </td><td>".$eth0["GATEWAY"];?></td></tr>
269
	</table>
269
	</table>
270
	</fieldset>
270
	</fieldset>
271
	</td><td>
271
	</td><td>
272
	<fieldset>
272
	<fieldset>
273
	<legend><?php echo $l_eth1_legend; ?></legend>
273
	<legend><?php echo $l_eth1_legend; ?></legend>
274
	<table>
274
	<table>
275
		<tr><td><?php echo $l_ip_adr." : </td><td>".$eth1["IPADDR"];?></td></tr>
275
		<tr><td><?php echo $l_ip_adr." : </td><td>".$eth1["IPADDR"];?></td></tr>
276
		<tr><td><?php echo $l_ip_mask." : </td><td>".$eth1["NETMASK"];?></td></tr>
276
		<tr><td><?php echo $l_ip_mask." : </td><td>".$eth1["NETMASK"];?></td></tr>
277
	</table>
277
	</table>
278
	</fieldset>
278
	</fieldset>
279
	</td></tr>
279
	</td></tr>
280
</table>
280
</table>
281
<table width="100%" border="0" cellspacing="0" cellpadding="0">
281
<table width="100%" border="0" cellspacing="0" cellpadding="0">
282
	<tr><th><?php echo $l_main_services; ?></th></tr>
282
	<tr><th><?php echo $l_main_services; ?></th></tr>
283
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
283
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
284
</table>
284
</table>
285
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
285
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
286
	<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>
286
	<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>
287
	<TR align="center">
287
	<TR align="center">
288
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?>
288
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?>
289
<tr>
289
<tr>
290
	<?php if ($statusOK) { ?>
290
	<?php if ($statusOK) { ?>
291
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
291
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
292
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
292
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
293
    <td width="80" align="center">---</td>
293
    <td width="80" align="center">---</td>
294
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
294
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
295
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
295
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
296
	<?php } else { ?>
296
	<?php } else { ?>
297
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
297
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
298
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
298
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
299
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
299
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
300
    <td width="80" align="center">---</td>
300
    <td width="80" align="center">---</td>
301
    <td width="80" align="center">---</td>
301
    <td width="80" align="center">---</td>
302
    <?php } ?>
302
    <?php } ?>
303
</tr>
303
</tr>
304
<?php } ?>
304
<?php } ?>
305
</td></tr>
305
</td></tr>
306
</table>
306
</table>
307
<table width="100%" border="0" cellspacing="0" cellpadding="0">
307
<table width="100%" border="0" cellspacing="0" cellpadding="0">
308
	<tr><th><?php echo $l_opt_services; ?></th></tr>
308
	<tr><th><?php echo $l_opt_services; ?></th></tr>
309
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
309
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
310
</table>
310
</table>
311
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
311
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
312
	<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>
312
	<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>
313
	<TR align="center">
313
	<TR align="center">
314
<?php foreach( $OptServiceStatus as $serviceName => $statusOK ) { ?>
314
<?php foreach( $OptServiceStatus as $serviceName => $statusOK ) { ?>
315
<tr>
315
<tr>
316
	<?php if ($statusOK) { ?>
316
	<?php if ($statusOK) { ?>
317
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
317
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
318
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
318
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
319
    <td width="80" align="center">---</td>
319
    <td width="80" align="center">---</td>
320
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
320
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
321
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
321
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
322
	<?php } else { ?>
322
	<?php } else { ?>
323
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
323
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
324
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
324
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
325
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
325
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
326
    <td width="80" align="center">---</td>
326
    <td width="80" align="center">---</td>
327
    <td width="80" align="center">---</td>
327
    <td width="80" align="center">---</td>
328
    <?php } ?>
328
    <?php } ?>
329
</tr>
329
</tr>
330
<?php } ?>
330
<?php } ?>
331
</td></tr>
331
</td></tr>
332
</table>
332
</table>
333
</body>
333
</body>
334
</html>
334
</html>
335
 
335