Subversion Repositories ALCASAR

Rev

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

Rev 1396 Rev 1476
1
<?php
1
<?php
2
/* written by steweb57 & Rexy */ 
2
/* written by steweb57 & Rexy */ 
3
# Choice of language
3
# Choice of language
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)); }
8
if($Language == 'fr'){
8
if($Language == 'fr'){
9
	$l_services_title	= "Configuration des services";
9
	$l_services_title	= "Configuration des services";
10
	$l_main_services	= "Services principaux";
10
	$l_main_services	= "Services principaux";
-
 
11
	$l_filter_services	= "Services de filtrage";
11
	$l_opt_services		= "Services optionnels";
12
	$l_opt_services		= "Services optionnels";
12
	$l_service_title 	= "Nom du service";
13
	$l_service_title 	= "Nom du service";
13
	$l_service_start 	= "D&eacute;marrer";
14
	$l_service_start 	= "D&eacute;marrer";
14
	$l_service_stop 	= "Arr&ecirc;ter";
15
	$l_service_stop 	= "Arr&ecirc;ter";
15
	$l_service_restart 	= "Red&eacute;marrer";
16
	$l_service_restart 	= "Red&eacute;marrer";
16
	$l_service_status 	= "Status";
17
	$l_service_status 	= "Status";
17
	$l_service_status_img_ok= "Démarré";
18
	$l_service_status_img_ok= "Démarré";
18
	$l_service_status_img_ko= "Arrété";
19
	$l_service_status_img_ko= "Arrété";
19
	$l_service_action 	= "Actions";
20
	$l_service_action 	= "Actions";
20
	$l_radiusd		= "Serveur d'authentification et d'autorisation";
21
	$l_radiusd		= "Serveur d'authentification et d'autorisation";
21
	$l_chilli		= "Passerelle d'interception";
22
	$l_chilli		= "Passerelle d'interception";
22
	$l_dansguardian		= "Filtre d'URL et de contenu WEB";
23
	$l_dansguardian		= "Filtre d'URL et de contenu WEB";
23
	$l_mysqld		= "Serveur de la base de données usager";
24
	$l_mysqld		= "Serveur de la base des usagers";
24
	$l_httpd		= "Serveur WEB (Centre de Gestion d'ALCASAR)";
25
	$l_httpd		= "Serveur WEB (Alcasar Control Center)";
25
	$l_sshd			= "Accès sécurisée à distance";
26
	$l_sshd			= "Accès sécurisée distant";
26
	$l_freshclam		= "Mise à jour de l'antivirus toutes les 2 heures";
27
	$l_freshclam		= "Mise à jour de l'antivirus toutes les 2 heures";
27
	$l_ntpd			= "Service de mise à l'heure réseau";
28
	$l_ntpd			= "Service de mise à l'heure réseau";
28
	$l_havp			= "Proxy Antivirus 1";
29
	$l_havp			= "Proxy Antivirus 1";
29
	$l_havp2		= "Proxy Antivirus 2";
30
	$l_havp2		= "Proxy Antivirus 2";
30
	$l_dnsmasq		= "Serveur DHCP et de cache DNS";
31
	$l_dnsmasq		= "Serveur DNS et DHCP";
31
	$l_dnsmasq_blacklist	= "Serveur DHCP et de cache DNS pour la Blacklist";
32
	$l_dnsmasq_blacklist	= "Serveur DNS pour la Blacklist";
32
	$l_dnsmasq_whitelist	= "Serveur DHCP et de cache DNS pour la Whitelist";
33
	$l_dnsmasq_whitelist	= "Serveur DNS pour la Whitelist";
-
 
34
	$l_dnsmasq_blackhole	= "Serveur DNS 'trou noir'";
-
 
35
	$l_ulogd_ssh		= "journalisation des accès par SSH";
-
 
36
	$l_ulogd_ext_access	= "journalisation des tentatives d'accès externes";
-
 
37
	$l_ulogd_traceability	= "journalisation des connexions WEB filtrés";
33
} else {
38
} else {
34
	$l_services_title	= "Services configuration";
39
	$l_services_title	= "Services configuration";
35
	$l_main_services	= "Main services";
40
	$l_main_services	= "Main services";
-
 
41
	$l_filter_services	= "Filtering services";
36
	$l_opt_services		= "Optional services";
42
	$l_opt_services		= "Optional services";
37
	$l_service_title 	= "Service name";
43
	$l_service_title 	= "Service name";
38
	$l_service_start 	= "Start";
44
	$l_service_start 	= "Start";
39
	$l_service_stop 	= "Stop";
45
	$l_service_stop 	= "Stop";
40
	$l_service_restart 	= "Restart";
46
	$l_service_restart 	= "Restart";
41
	$l_service_status 	= "Status";
47
	$l_service_status 	= "Status";
42
	$l_service_status_img_ok= "Running";
48
	$l_service_status_img_ok= "Running";
43
	$l_service_status_img_ko= "Stopped";
49
	$l_service_status_img_ko= "Stopped";
44
	$l_service_action 	= "Actions";
50
	$l_service_action 	= "Actions";
45
	$l_radiusd		= "Authentication and authorisation serveur";
51
	$l_radiusd		= "Authentication and authorisation serveur";
46
	$l_chilli		= "Interception gateway";
52
	$l_chilli		= "Interception gateway";
47
	$l_dansguardian		= "URL and WEB content filter";
53
	$l_dansguardian		= "URL and WEB content filter";
48
	$l_mysqld		= "User database server";
54
	$l_mysqld		= "User database server";
49
	$l_httpd		= "WEB server (ALCASAR Control Center)";
55
	$l_httpd		= "WEB server (ALCASAR Control Center)";
50
	$l_sshd			= "Secure remote access";
56
	$l_sshd			= "Secure remote access";
51
	$l_freshclam		= "WEB antivirus update (every 2 hours)";
57
	$l_freshclam		= "WEB antivirus update (every 2 hours)";
52
	$l_ntpd			= "Network time";
58
	$l_ntpd			= "Network time";
53
	$l_havp			= "Antivirus Proxy 1";
59
	$l_havp			= "Antivirus Proxy 1";
54
	$l_havp2		= "Antivirus Proxy 2";
60
	$l_havp2		= "Antivirus Proxy 2";
55
	$l_dnsmasq		= "A lightweight DHCP and caching DNS server";
61
	$l_dnsmasq		= "DNS and DHCP server";
56
	$l_dnsmasq_blacklist	= "A lightweight DHCP and caching DNS server for the Blacklist";
62
	$l_dnsmasq_blacklist	= "DNS server for the Blacklist";
57
	$l_dnsmasq_whitelist	= "A lightweight DHCP and caching DNS server for the Whitelist";
63
	$l_dnsmasq_whitelist	= "DNS server for the Whitelist";
-
 
64
	$l_dnsmasq_blackhole	= "DNS server (blackhole)";
-
 
65
	$l_ulogd_ssh		= "SSH access logging process";
-
 
66
	$l_ulogd_ext_access	= "Extern access attempts logging processs";
-
 
67
	$l_ulogd_traceability	= "Filtering WEB access logging process";
58
}
68
}
59
 
69
 
60
/****************************************************************
70
/****************************************************************
61
*	CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION	*
71
*	CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION	*
62
*****************************************************************/
72
*****************************************************************/
63
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
73
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
64
 
74
 
65
/********************************************************
75
/********************************************************
66
*	TEST DU FICHIERS DE CONFIGURATION		*
76
*	TEST DU FICHIERS DE CONFIGURATION		*
67
*********************************************************/
77
*********************************************************/
68
//Test de présence et des droits en lecture des fichiers de configuration.
78
//Test de présence et des droits en lecture des fichiers de configuration.
69
if (!file_exists(CONF_FILE)){
79
if (!file_exists(CONF_FILE)){
70
	exit("Fichier de configuration ".CONF_FILE." non présent");
80
	exit("Fichier de configuration ".CONF_FILE." non présent");
71
}
81
}
72
if (!is_readable(CONF_FILE)){
82
if (!is_readable(CONF_FILE)){
73
	exit("Vous n'avez pas les droits de lecture sur le fichier ".CONF_FILE);
83
	exit("Vous n'avez pas les droits de lecture sur le fichier ".CONF_FILE);
74
}
84
}
75
 
85
 
76
//fonction pour faire une action (start,stop,restart) sur un service
86
//fonction pour faire une action (start,stop,restart) sur un service
77
function serviceExec($service, $action){
87
function serviceExec($service, $action){
78
	if (($action == "start")||($action == "stop")||($action == "restart")){
88
	if (($action == "start")||($action == "stop")||($action == "restart")){
79
		exec("sudo /sbin/service $service $action",$retval, $retstatus);
89
		exec("sudo /sbin/service $service $action",$retval, $retstatus);
80
		if ($service == "sshd"){
90
		if ($service == "sshd"){
81
			if ($action == "start"){ 
91
			if ($action == "start"){ 
82
				exec("sudo /bin/systemctl enable $service.service");
92
				exec("sudo /bin/systemctl enable $service.service");
83
				file_put_contents(CONF_FILE, str_replace('SSH=off', 'SSH=on', file_get_contents(CONF_FILE)));
93
				file_put_contents(CONF_FILE, str_replace('SSH=off', 'SSH=on', file_get_contents(CONF_FILE)));
84
				exec ("sudo /usr/local/bin/alcasar-iptables.sh");
94
				exec ("sudo /usr/local/bin/alcasar-iptables.sh");
85
				}
95
				}
86
			if ($action == "stop"){
96
			if ($action == "stop"){
87
			       	exec("sudo /sbin/systemctl disable $service.service");
97
			       	exec("sudo /sbin/systemctl disable $service.service");
88
				file_put_contents(CONF_FILE, str_replace('SSH=on', 'SSH=off', file_get_contents(CONF_FILE)));
98
				file_put_contents(CONF_FILE, str_replace('SSH=on', 'SSH=off', file_get_contents(CONF_FILE)));
89
				exec ("sudo /usr/local/bin/alcasar-iptables.sh");
99
				exec ("sudo /usr/local/bin/alcasar-iptables.sh");
90
				}
100
				}
91
			}
101
			}
92
		return $retstatus;
102
		return $retstatus;
93
	} else {
103
	} else {
94
		return false;
104
		return false;
95
	}
105
	}
96
}
106
}
97
//fonction définissant le status d'un service 
107
//fonction définissant le status d'un service 
98
//(en fonction de la présence d'un mot clé dans la valeur de status)
108
//(en fonction de la présence d'un mot clé dans la valeur de status)
99
function checkServiceStatus($service){
109
function checkServiceStatus($service){
100
	$response = false;
110
	$response = false;
101
	exec("/bin/systemctl is-active $service.service",$retval);
111
	exec("/bin/systemctl is-active $service.service",$retval);
102
	foreach( $retval as $val ) {
112
	foreach( $retval as $val ) {
103
		if ($val == "active"){
113
		if ($val == "active"){
104
			$response = true;
114
			$response = true;
105
			break;
115
			break;
106
		}
116
		}
107
	}
117
	}
108
	return $response;
118
	return $response;
109
}
119
}
110
 
120
 
111
//-------------------------------
121
//-------------------------------
112
// Les actions sur un service
122
// Les actions sur un service
113
//-------------------------------
123
//-------------------------------
114
//sécurité sur les actions à réaliser
124
//sécurité sur les actions à réaliser
115
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","httpd","sshd","freshclam","ntpd","havp","havp2","dnsmasq","dnsmasq-blacklist","dnsmasq-whitelist");
125
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","httpd","sshd","freshclam","ntpd","havp","havp2","dnsmasq","dnsmasq-blacklist","dnsmasq-whitelist","dnsmasq-blackhole");
116
$autorizeAction = array("start","stop","restart");
126
$autorizeAction = array("start","stop","restart");
117
 
127
 
118
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
128
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
119
    if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
129
    if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
120
    	$execStatus = serviceExec($_GET['service'], $_GET['action']);
130
    	$execStatus = serviceExec($_GET['service'], $_GET['action']);
121
		// execStatus non exploité
131
		// execStatus non exploité
122
	}
132
	}
123
}
133
}
124
//-------------------------------
134
//-------------------------------
125
//recherche du status des services
135
//recherche du status des services
126
//-------------------------------
136
//-------------------------------
127
$MainServiceStatus = array();
137
$MainServiceStatus = array();
128
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd");
138
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd");
129
$MainServiceStatus['chilli'] = checkServiceStatus("chilli");
139
$MainServiceStatus['chilli'] = checkServiceStatus("chilli");
130
$MainServiceStatus['dansguardian'] = checkServiceStatus("dansguardian");
-
 
131
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld");
140
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld");
132
$MainServiceStatus['httpd'] = checkServiceStatus("httpd");
141
$MainServiceStatus['httpd'] = checkServiceStatus("httpd");
133
$MainServiceStatus['havp'] = checkServiceStatus("havp");
-
 
134
$MainServiceStatus['havp2'] = checkServiceStatus("havp2");
-
 
135
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq");
142
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq");
-
 
143
$MainServiceStatus['ulogd-ssh'] = checkServiceStatus("ulogd-ssh");
-
 
144
$MainServiceStatus['ulogd-ext-access]'] = checkServiceStatus("ulogd-ext-access");
-
 
145
$MainServiceStatus['ulogd-traceability]'] = checkServiceStatus("ulogd-traceability");
-
 
146
 
-
 
147
$FilterServiceStatus = array();
136
$MainServiceStatus['dnsmasq_blacklist'] = checkServiceStatus("dnsmasq-blacklist");
148
$FilterServiceStatus['dnsmasq_blacklist'] = checkServiceStatus("dnsmasq-blacklist");
137
$MainServiceStatus['dnsmasq_whitelist'] = checkServiceStatus("dnsmasq-whitelist");
149
$FilterServiceStatus['dnsmasq_whitelist'] = checkServiceStatus("dnsmasq-whitelist");
-
 
150
$FilterServiceStatus['dnsmasq_blackhole'] = checkServiceStatus("dnsmasq-blackhole");
-
 
151
$filterServiceStatus['dansguardian'] = checkServiceStatus("dansguardian");
-
 
152
$FilterServiceStatus['havp'] = checkServiceStatus("havp");
-
 
153
$FilterServiceStatus['havp2'] = checkServiceStatus("havp2");
-
 
154
$FilterServiceStatus['freshclam'] = checkServiceStatus("freshclam");
-
 
155
 
138
 
156
 
139
$OptServiceStatus = array();
157
$OptServiceStatus = array();
140
$OptServiceStatus['sshd'] = checkServiceStatus("sshd");
158
$OptServiceStatus['sshd'] = checkServiceStatus("sshd");
141
$OptServiceStatus['freshclam'] = checkServiceStatus("freshclam");
-
 
142
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd");
159
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd");
143
 
160
 
144
/****************
161
/****************
145
*	MAIN	*
162
*	MAIN	*
146
*****************/
163
*****************/
147
 
164
 
148
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
165
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
149
<html><!-- written by steweb57 / rexy -->
166
<html><!-- written by steweb57 / rexy -->
150
<head>
167
<head>
151
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
168
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
152
<title><?php echo $l_services_title; ?></title>
169
<title><?php echo $l_services_title; ?></title>
153
<link rel="stylesheet" href="/css/style.css" type="text/css">
170
<link rel="stylesheet" href="/css/style.css" type="text/css">
154
</head>
171
</head>
155
<body>
172
<body>
156
<table width="100%" border="0" cellspacing="0" cellpadding="0">
173
<table width="100%" border="0" cellspacing="0" cellpadding="0">
157
	<tr><th><?php echo $l_main_services; ?></th></tr>
174
	<tr><th><?php echo $l_main_services; ?></th></tr>
158
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
175
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
159
</table>
176
</table>
160
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
177
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
161
	<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>
178
	<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>
162
	<TR align="center">
179
	<TR align="center">
163
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?>
180
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?>
164
<tr>
181
<tr>
165
	<?php if ($statusOK) { ?>
182
	<?php if ($statusOK) { ?>
166
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
183
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
167
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
184
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
168
    <td width="80" align="center">---</td>
185
    <td width="80" align="center">---</td>
169
    <td width="80" align="center"><?php if ($serviceName != "chilli" && $serviceName != "havp" && $serviceName != "havp2" && $serviceName != "dnsmasq" && $serviceName != "dnsmasq_blacklist" && $serviceName != "dnsmasq_whitelist") { echo "<a href=".$_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop</a>"; } else echo "---";?></td>
186
    <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>
-
 
187
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
-
 
188
	<?php } else { ?>
-
 
189
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
-
 
190
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
-
 
191
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
-
 
192
    <td width="80" align="center">---</td>
-
 
193
    <td width="80" align="center">---</td>
-
 
194
    <?php } ?>
-
 
195
</tr>
-
 
196
<?php } ?>
-
 
197
</td></tr>
-
 
198
</table>
-
 
199
<table width="100%" border="0" cellspacing="0" cellpadding="0">
-
 
200
	<tr><th><?php echo $l_filter_services; ?></th></tr>
-
 
201
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
-
 
202
</table>
-
 
203
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
-
 
204
	<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>
-
 
205
	<TR align="center">
-
 
206
<?php foreach( $FilterServiceStatus as $serviceName => $statusOK ) { ?>
-
 
207
<tr>
-
 
208
	<?php if ($statusOK) { ?>
-
 
209
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
-
 
210
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
-
 
211
    <td width="80" align="center">---</td>
-
 
212
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
170
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
213
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
171
	<?php } else { ?>
214
	<?php } else { ?>
172
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
215
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
173
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
216
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
174
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
217
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
175
    <td width="80" align="center">---</td>
218
    <td width="80" align="center">---</td>
176
    <td width="80" align="center">---</td>
219
    <td width="80" align="center">---</td>
177
    <?php } ?>
220
    <?php } ?>
178
</tr>
221
</tr>
179
<?php } ?>
222
<?php } ?>
180
</td></tr>
223
</td></tr>
181
</table>
224
</table>
182
<table width="100%" border="0" cellspacing="0" cellpadding="0">
225
<table width="100%" border="0" cellspacing="0" cellpadding="0">
183
	<tr><th><?php echo $l_opt_services; ?></th></tr>
226
	<tr><th><?php echo $l_opt_services; ?></th></tr>
184
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
227
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
185
</table>
228
</table>
186
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
229
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
187
	<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>
230
	<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>
188
	<TR align="center">
231
	<TR align="center">
189
<?php foreach( $OptServiceStatus as $serviceName => $statusOK ) { ?>
232
<?php foreach( $OptServiceStatus as $serviceName => $statusOK ) { ?>
190
<tr>
233
<tr>
191
	<?php if ($statusOK) { ?>
234
	<?php if ($statusOK) { ?>
192
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
235
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
193
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
236
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
194
    <td width="80" align="center">---</td>
237
    <td width="80" align="center">---</td>
195
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
238
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
196
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
239
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
197
	<?php } else { ?>
240
	<?php } else { ?>
198
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
241
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
199
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
242
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
200
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
243
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
201
    <td width="80" align="center">---</td>
244
    <td width="80" align="center">---</td>
202
    <td width="80" align="center">---</td>
245
    <td width="80" align="center">---</td>
203
    <?php } ?>
246
    <?php } ?>
204
</tr>
247
</tr>
205
<?php } ?>
248
<?php } ?>
206
</td></tr>
249
</td></tr>
207
</table>
250
</table>
208
</body>
251
</body>
209
</html>
252
</html>
210
 
253