Subversion Repositories ALCASAR

Rev

Rev 2521 | Rev 2724 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 2521 Rev 2531
Line 17... Line 17...
17
	$l_service_status 	= "Status";
17
	$l_service_status 	= "Status";
18
	$l_service_status_img_ok= "Démarré";
18
	$l_service_status_img_ok= "Démarré";
19
	$l_service_status_img_ko= "Arrété";
19
	$l_service_status_img_ko= "Arrété";
20
	$l_service_action 	= "Actions";
20
	$l_service_action 	= "Actions";
21
	$l_radiusd		= "Serveur d'authentification et d'autorisation";
21
	$l_radiusd		= "Serveur d'authentification et d'autorisation";
22
	$l_chilli		= "Passerelle d'interception";
22
	$l_chilli		= "Passerelle d'interception et serveur DHCP";
23
	$l_e2guardian		= "Filtre d'URL et de contenu WEB";
23
	$l_e2guardian		= "Filtre d'URL et de contenu WEB";
24
	$l_mysqld		= "Serveur de la base des usagers";
24
	$l_mysqld		= "Serveur de la base des usagers";
25
	$l_lighttpd		= "Serveur WEB (Alcasar Control Center)";
25
	$l_lighttpd		= "Serveur WEB (Alcasar Control Center)";
26
	$l_sshd			= "Accès sécurisée distant";
26
	$l_sshd			= "Accès sécurisée distant";
27
	$l_freshclam		= "Mise à jour de l'antivirus toutes les 2 heures";
27
	$l_freshclam		= "Mise à jour de l'antivirus (toutes les 2 heures)";
28
	$l_ntpd			= "Service de mise à l'heure réseau";
28
	$l_ntpd			= "Service de mise à l'heure réseau";
-
 
29
	$l_fail2ban		= "Détecteur d'intrusion";
-
 
30
	$l_nfsen 		= "Grapheur de flux NetFlow";
-
 
31
	$l_vnstat		= "Grapheur de flux réseau";
29
	$l_havp			= "Proxy Antivirus 1";
32
	$l_havp			= "Proxy Antivirus";
30
	$l_tinyproxy		= "Proxy HTTP léger";
33
	$l_tinyproxy		= "Proxy HTTP léger";
31
	$l_dnsmasq		= "Serveur DNS et DHCP";
34
	$l_dnsmasq		= "Serveur DNS principal";
32
	$l_dnsmasq_blacklist	= "Serveur DNS pour la Blacklist";
35
	$l_dnsmasq_blacklist	= "Serveur DNS pour la Blacklist";
33
	$l_dnsmasq_whitelist	= "Serveur DNS pour la Whitelist";
36
	$l_dnsmasq_whitelist	= "Serveur DNS pour la Whitelist";
34
	$l_dnsmasq_blackhole	= "Serveur DNS 'trou noir'";
37
	$l_dnsmasq_blackhole	= "Serveur DNS 'trou noir'";
35
	$l_ulogd_ssh		= "journalisation des accès par SSH";
38
	$l_ulogd_ssh		= "journalisation des accès par SSH";
36
	$l_ulogd_ext_access	= "journalisation des tentatives d'accès externes";
39
	$l_ulogd_ext_access	= "journalisation des tentatives d'accès externes";
37
	$l_ulogd_traceability	= "journalisation des connexions WEB filtrés";
40
	$l_ulogd_traceability	= "journalisation des connexions WEB filtrés";
38
	$l_nfsen		= ""; // TODO
-
 
39
	$l_fail2ban		= ""; // TODO
-
 
40
	$l_vnstat		= ""; // TODO
-
 
41
	$l_execute		= "Exécuter";
41
	$l_execute		= "Exécuter";
42
	$l_stop_restart		= "Arret et redémarrage du système";
42
	$l_stop_restart		= "Arret et redémarrage du système";
43
	$l_halt			= "Arréter le système";
43
	$l_halt			= "Arréter le système";
44
	$l_reboot		= "Relancer le système";
44
	$l_reboot		= "Relancer le système";
-
 
45
	
45
} else {
46
} else {
46
	$l_services_title	= "Services configuration";
47
	$l_services_title	= "Services configuration";
47
	$l_main_services	= "Main services";
48
	$l_main_services	= "Main services";
48
	$l_filter_services	= "Filtering services";
49
	$l_filter_services	= "Filtering services";
49
	$l_opt_services		= "Optional services";
50
	$l_opt_services		= "Optional services";
Line 54... Line 55...
54
	$l_service_status 	= "Status";
55
	$l_service_status 	= "Status";
55
	$l_service_status_img_ok= "Running";
56
	$l_service_status_img_ok= "Running";
56
	$l_service_status_img_ko= "Stopped";
57
	$l_service_status_img_ko= "Stopped";
57
	$l_service_action 	= "Actions";
58
	$l_service_action 	= "Actions";
58
	$l_radiusd		= "Authentication and authorisation server";
59
	$l_radiusd		= "Authentication and authorisation server";
59
	$l_chilli		= "Interception gateway";
60
	$l_chilli		= "Interception gateway and DHCP server";
60
	$l_e2guardian		= "URL and WEB content filter";
61
	$l_e2guardian		= "URL and WEB content filter";
61
	$l_mysqld		= "User database server";
62
	$l_mysqld		= "User database server";
62
	$l_lighttpd		= "WEB server (ALCASAR Control Center)";
63
	$l_lighttpd		= "WEB server (ALCASAR Control Center)";
63
	$l_sshd			= "Secure remote access";
64
	$l_sshd			= "Secure remote access";
64
	$l_freshclam		= "Antivirus update process (every 2 hours)";
65
	$l_freshclam		= "Antivirus update process (every 2 hours)";
65
	$l_ntpd			= "Network time server";
66
	$l_ntpd			= "Network time server";
-
 
67
	$l_fail2ban		= "Intrusion Dectection System";
-
 
68
	$l_nfsen		= "Netflow grapher";
-
 
69
	$l_vnstat		= "Network grapher";
66
	$l_havp			= "Antivirus Proxy";
70
	$l_havp			= "Antivirus Proxy";
67
	$l_tinyproxy		= "Light HTTP Proxy";
71
	$l_tinyproxy		= "Light HTTP Proxy";
68
	$l_dnsmasq		= "DNS and DHCP server";
72
	$l_dnsmasq		= "Main DNS server";
69
	$l_dnsmasq_blacklist	= "DNS server for the Blacklist";
73
	$l_dnsmasq_blacklist	= "Blacklist DNS server";
70
	$l_dnsmasq_whitelist	= "DNS server for the Whitelist";
74
	$l_dnsmasq_whitelist	= "Whitelist DNS server";
71
	$l_dnsmasq_blackhole	= "DNS server (blackhole)";
75
	$l_dnsmasq_blackhole	= "Blackhole DNS server";
72
	$l_ulogd_ssh		= "SSH access logging process";
76
	$l_ulogd_ssh		= "SSH access logging process";
73
	$l_ulogd_ext_access	= "Extern access attempts logging process";
77
	$l_ulogd_ext_access	= "Extern access attempts logging process";
74
	$l_ulogd_traceability	= "Filtering WEB access logging process";
78
	$l_ulogd_traceability	= "Filtering WEB access logging process";
75
	$l_nfsen		= ""; // TODO
-
 
76
	$l_fail2ban		= ""; // TODO
-
 
77
	$l_vnstat		= ""; // TODO
-
 
78
	$l_execute		= "Execute";
79
	$l_execute		= "Execute";
79
	$l_stop_restart		= "Halt and restart the system";
80
	$l_stop_restart		= "Halt and restart the system";
80
	$l_halt			= "Halt le system";
81
	$l_halt			= "Halt le system";
81
	$l_reboot		= "Restart the system";
82
	$l_reboot		= "Restart the system";
82
}
83
}
83
 
84
 
84
/****************************************************************
85
/****************************************************************
85
*	CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION	*
86
*	                   CONST				*
86
*****************************************************************/
87
*****************************************************************/
87
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
88
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
88
 
89
 
89
/********************************************************
90
/********************************************************
90
*	TEST DU FICHIERS DE CONFIGURATION		*
91
*			CONF FILE test 			*
91
*********************************************************/
92
*********************************************************/
92
//Test de présence et des droits en lecture des fichiers de configuration.
-
 
93
if (!file_exists(CONF_FILE)){
93
if (!file_exists(CONF_FILE)){
94
	exit("Fichier de configuration ".CONF_FILE." non présent");
94
	exit("Fichier de configuration ".CONF_FILE." non présent");
95
}
95
}
96
if (!is_readable(CONF_FILE)){
96
if (!is_readable(CONF_FILE)){
97
	exit("Vous n'avez pas les droits de lecture sur le fichier ".CONF_FILE);
97
	exit("Vous n'avez pas les droits de lecture sur le fichier ".CONF_FILE);
98
}
98
}
99
 
99
 
100
//fonction pour faire une action (start,stop,restart) sur un service
100
// Doing an action on a service (start,stop or restart)
101
function serviceExec($service, $action){
101
function serviceExec($service, $action){
102
	if (($action == "start")||($action == "stop")||($action == "restart")){
102
	if (($action == "start")||($action == "stop")||($action == "restart")){
103
		exec("sudo /usr/bin/systemctl $action ".escapeshellarg($service), $retval, $retstatus);
103
		exec("sudo /usr/bin/systemctl $action ".escapeshellarg($service), $retval, $retstatus);
104
		if ($service == "sshd"){
104
		if ($service == "sshd"){ // in order to keep that conf for SSH at next reboot
105
			if ($action == "start"){ 
105
			if ($action == "start"){ 
106
				exec("sudo /usr/bin/systemctl enable ".escapeshellarg($service));
106
				exec("sudo /usr/bin/systemctl enable ".escapeshellarg($service));
107
				file_put_contents(CONF_FILE, str_replace('SSH=off', 'SSH=on', file_get_contents(CONF_FILE)));
107
				file_put_contents(CONF_FILE, str_replace('SSH=off', 'SSH=on', file_get_contents(CONF_FILE)));
108
				exec("sudo /usr/local/bin/alcasar-iptables.sh");
108
				exec("sudo /usr/local/bin/alcasar-iptables.sh");
109
				}
109
				}
Line 116... Line 116...
116
		return $retstatus;
116
		return $retstatus;
117
	} else {
117
	} else {
118
		return false;
118
		return false;
119
	}
119
	}
120
}
120
}
-
 
121
 
121
//fonction définissant le status d'un service 
122
// Testing if a service is active
122
//(en fonction de la présence d'un mot clé dans la valeur de status)
-
 
123
function checkServiceStatus($service){
123
function checkServiceStatus($service){
124
	$response = false;
124
	$response = false;
125
	exec("sudo /usr/bin/systemctl is-active ".escapeshellarg("$service.service"), $retval);
125
	exec("sudo /usr/bin/systemctl is-active ".escapeshellarg("$service.service"), $retval);
126
	foreach( $retval as $val ) {
126
	foreach( $retval as $val ) {
127
		if ($val == "active"){
127
		if ($val == "active"){
Line 133... Line 133...
133
}
133
}
134
 
134
 
135
//-------------------------------
135
//-------------------------------
136
// Actions on services
136
// Actions on services
137
//-------------------------------
137
//-------------------------------
138
//sécurité sur les actions à réaliser
138
$autorizeService = array("radiusd","chilli","mysqld","lighttpd","dnsmasq","ulogd-ssh","ulogd-ext-access","ulogd-traceability","dnsmasq-blacklist","dnsmasq-whitelist","dnsmasq-blackhole","e2guardian","havp","tinyproxy","freshclam","sshd","ntpd","fail2ban","nfsen","vnstat");
139
$autorizeService = ['radiusd','chilli','e2guardian','mysqld','lighttpd','sshd','freshclam','ntpd','havp','tinyproxy','dnsmasq','dnsmasq-blacklist','dnsmasq-whitelist','dnsmasq-blackhole', 'ulogd-ssh', 'ulogd-ext-access', 'ulogd-traceability','nfsen','fail2ban','vnstat'];
139
$autorizeAction = array("start","stop","restart");
140
$autorizeAction = ['start','stop','restart'];
-
 
141
 
140
 
142
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
141
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
143
    if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
142
    if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
144
    	$execStatus = serviceExec($_GET['service'], $_GET['action']);
143
    	$execStatus = serviceExec($_GET['service'], $_GET['action']);
145
		// execStatus non exploité
144
		// execStatus non exploité
Line 159... Line 158...
159
			exec ("sudo /usr/sbin/shutdown -h now");
158
			exec ("sudo /usr/sbin/shutdown -h now");
160
		break;
159
		break;
161
	}
160
	}
162
}
161
}
163
 
162
 
164
 
-
 
165
//-------------------------------
163
//-------------------------------
166
//recherche du status des services
164
// Check services status
167
//-------------------------------
165
//-------------------------------
168
$MainServiceStatus = array();
166
$MainServiceStatus = array();
169
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd");
-
 
170
$MainServiceStatus['chilli'] = checkServiceStatus("chilli");
167
$MainServiceStatus['chilli'] = checkServiceStatus("chilli");
-
 
168
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd");
171
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld");
169
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld");
172
$MainServiceStatus['lighttpd'] = checkServiceStatus("lighttpd");
170
$MainServiceStatus['lighttpd'] = checkServiceStatus("lighttpd");
173
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq");
171
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq");
174
$MainServiceStatus['ulogd-ssh'] = checkServiceStatus("ulogd-ssh");
172
$MainServiceStatus['ulogd_ssh'] = checkServiceStatus("ulogd-ssh");
175
$MainServiceStatus['ulogd-ext-access'] = checkServiceStatus("ulogd-ext-access");
173
$MainServiceStatus['ulogd_ext_access'] = checkServiceStatus("ulogd-ext-access");
176
$MainServiceStatus['ulogd-traceability'] = checkServiceStatus("ulogd-traceability");
174
$MainServiceStatus['ulogd_traceability'] = checkServiceStatus("ulogd-traceability");
177
$MainServiceStatus['nfsen'] = checkServiceStatus("nfsen");
-
 
178
$MainServiceStatus['fail2ban'] = checkServiceStatus("fail2ban");
-
 
179
$MainServiceStatus['vnstat'] = checkServiceStatus("vnstat");
-
 
180
 
175
 
181
$FilterServiceStatus = array();
176
$FilterServiceStatus = array();
182
$FilterServiceStatus['dnsmasq-blacklist'] = checkServiceStatus("dnsmasq-blacklist");
177
$FilterServiceStatus['dnsmasq_blacklist'] = checkServiceStatus("dnsmasq-blacklist");
183
$FilterServiceStatus['dnsmasq-whitelist'] = checkServiceStatus("dnsmasq-whitelist");
178
$FilterServiceStatus['dnsmasq_whitelist'] = checkServiceStatus("dnsmasq-whitelist");
184
$FilterServiceStatus['dnsmasq-blackhole'] = checkServiceStatus("dnsmasq-blackhole");
179
$FilterServiceStatus['dnsmasq_blackhole'] = checkServiceStatus("dnsmasq-blackhole");
185
$filterServiceStatus['e2guardian'] = checkServiceStatus("e2guardian");
180
$FilterServiceStatus['e2guardian'] = checkServiceStatus("e2guardian");
186
$FilterServiceStatus['havp'] = checkServiceStatus("havp");
181
$FilterServiceStatus['havp'] = checkServiceStatus("havp");
187
$FilterServiceStatus['tinyproxy'] = checkServiceStatus("tinyproxy");
182
$FilterServiceStatus['tinyproxy'] = checkServiceStatus("tinyproxy");
188
$FilterServiceStatus['freshclam'] = checkServiceStatus("freshclam");
183
$FilterServiceStatus['freshclam'] = checkServiceStatus("freshclam");
189
 
184
 
190
 
-
 
191
$OptServiceStatus = array();
185
$OptServiceStatus = array();
192
$OptServiceStatus['sshd'] = checkServiceStatus("sshd");
186
$OptServiceStatus['sshd'] = checkServiceStatus("sshd");
193
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd");
187
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd");
194
 
-
 
-
 
188
$OptServiceStatus['fail2ban'] = checkServiceStatus("fail2ban");
-
 
189
$OptServiceStatus['nfsen'] = checkServiceStatus("nfsen");
-
 
190
$OptServiceStatus['vnstat'] = checkServiceStatus("vnstat");
195
/****************
191
/****************
196
*	MAIN	*
192
*	MAIN	*
197
*****************/
193
*****************/
198
 
194
 
199
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
195
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Line 212... Line 208...
212
	<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>
208
	<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>
213
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?>
209
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?>
214
<tr>
210
<tr>
215
	<?php if ($statusOK) { ?>
211
	<?php if ($statusOK) { ?>
216
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
212
	<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
217
	<td align="center"><?php $comment=str_replace('-', '_', "l_$serviceName"); echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
213
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
218
    <td width="80" align="center">---</td>
214
	<td width="80" align="center">---</td>
219
    <td width="80" align="center"><?php if ($serviceName != "chilli") { echo "<a href=\"".$_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop</a>"; } else echo "---";?></td>
215
	<td width="80" align="center"><?php if (($serviceName != "chilli") && ($serviceName != "lighttpd")) { echo "<a href=\"".$_SERVER['PHP_SELF']."?action=stop&service=".str_replace('_','-',$serviceName)."\"> $l_service_stop</a>"; } else echo "---";?></td>
220
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
216
	<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=".str_replace('_','-',$serviceName)."\"> $l_service_restart";?></a></td>
221
	<?php } else { ?>
217
	<?php } else { ?>
222
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
218
	<td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
223
    <td align="center"><?php $comment=str_replace('-', '_', "l_$serviceName"); echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
219
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
224
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
220
	<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=".str_replace('_','-',$serviceName)."\"> $l_service_start";?></a></td>
225
    <td width="80" align="center">---</td>
221
	<td width="80" align="center">---</td>
226
    <td width="80" align="center">---</td>
222
	<td width="80" align="center">---</td>
227
    <?php } ?>
223
    <?php } ?>
228
</tr>
224
</tr>
229
<?php } ?>
225
<?php } ?>
Line 237... Line 233...
237
<!--	<TR align="center"> -->
233
<!--	<TR align="center"> -->
238
<?php foreach( $FilterServiceStatus as $serviceName => $statusOK ) { ?>
234
<?php foreach( $FilterServiceStatus as $serviceName => $statusOK ) { ?>
239
<tr>
235
<tr>
240
	<?php if ($statusOK) { ?>
236
	<?php if ($statusOK) { ?>
241
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
237
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
242
	<td align="center"><?php $comment=str_replace('-', '_', "l_$serviceName"); echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
238
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
243
    <td width="80" align="center">---</td>
239
    <td width="80" align="center">---</td>
244
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
240
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=".str_replace('_','-',$serviceName)."\"> $l_service_stop";?></a></td>
245
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
241
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=".str_replace('_','-',$serviceName)."\"> $l_service_restart";?></a></td>
246
	<?php } else { ?>
242
	<?php } else { ?>
247
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
243
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
248
    <td align="center"><?php $comment=str_replace('-', '_', "l_$serviceName"); echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
244
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
249
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
245
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=".str_replace('_','-',$serviceName)."\"> $l_service_start";?></a></td>
250
    <td width="80" align="center">---</td>
246
    <td width="80" align="center">---</td>
251
    <td width="80" align="center">---</td>
247
    <td width="80" align="center">---</td>
252
    <?php } ?>
248
    <?php } ?>
253
</tr>
249
</tr>
254
<?php } ?>
250
<?php } ?>
Line 261... Line 257...
261
	<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>
257
	<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>
262
<?php foreach( $OptServiceStatus as $serviceName => $statusOK ) { ?>
258
<?php foreach( $OptServiceStatus as $serviceName => $statusOK ) { ?>
263
<tr>
259
<tr>
264
	<?php if ($statusOK) { ?>
260
	<?php if ($statusOK) { ?>
265
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
261
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
266
	<td align="center"><?php $comment=str_replace('-', '_', "l_$serviceName"); echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
262
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
267
    <td width="80" align="center">---</td>
263
    <td width="80" align="center">---</td>
268
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
264
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
269
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
265
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
270
	<?php } else { ?>
266
	<?php } else { ?>
271
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
267
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
272
    <td align="center"><?php $comment=str_replace('-', '_', "l_$serviceName"); echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
268
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
273
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
269
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
274
    <td width="80" align="center">---</td>
270
    <td width="80" align="center">---</td>
275
    <td width="80" align="center">---</td>
271
    <td width="80" align="center">---</td>
276
    <?php } ?>
272
    <?php } ?>
277
</tr>
273
</tr>