Subversion Repositories ALCASAR

Rev

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

Rev 2840 Rev 2853
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_filter_services	= "Services de filtrage";
12
	$l_opt_services		= "Services optionnels";
12
	$l_opt_services		= "Services optionnels";
13
	$l_service_title 	= "Nom du service";
13
	$l_service_title 	= "Nom du service";
14
	$l_service_start 	= "Démarrer";
14
	$l_service_start 	= "Démarrer";
15
	$l_service_stop 	= "Arréter";
15
	$l_service_stop 	= "Arréter";
16
	$l_service_restart 	= "Redémarrer";
16
	$l_service_restart 	= "Redémarrer";
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 et serveur DHCP";
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_clamav_freshclam	= "Mise à jour de l'antivirus (toutes les 4 heures)";
27
	$l_clamav_freshclam	= "Mise à jour de l'antivirus (toutes les 4 heures)";
28
	$l_clamav_daemon	= "Antimalware";
28
	$l_clamav_daemon	= "Antimalware";
29
	$l_ntpd			= "Service de mise à l'heure réseau";
29
	$l_ntpd			= "Service de mise à l'heure réseau";
30
	$l_fail2ban		= "Détecteur d'intrusion";
30
	$l_fail2ban		= "Détecteur d'intrusion";
31
	$l_nfcapd 		= "Collecteur de flux NetFlow";
31
	$l_nfcapd 		= "Collecteur de flux NetFlow";
32
	$l_vnstat		= "Grapheur de flux réseau";
32
	$l_vnstat		= "Grapheur de flux réseau";
33
	$l_unbound		= "Serveur DNS principal";
33
	$l_unbound		= "Serveur DNS principal";
34
	$l_unbound_blacklist	= "Serveur DNS pour la Blacklist";
34
	$l_unbound_blacklist	= "Serveur DNS pour la Blacklist";
35
	$l_unbound_whitelist	= "Serveur DNS pour la Whitelist";
35
	$l_unbound_whitelist	= "Serveur DNS pour la Whitelist";
36
	$l_dnsmasq_whitelist	= "Serveur DNS pour la Whitelist (IPSET)";
36
	$l_dnsmasq_whitelist	= "Serveur DNS pour la Whitelist (IPSET)";
37
	$l_unbound_blackhole	= "Serveur DNS 'trou noir'";
37
	$l_unbound_blackhole	= "Serveur DNS 'trou noir'";
38
	$l_ulogd_ssh		= "journalisation des accès par SSH";
38
	$l_ulogd_ssh		= "journalisation des accès par SSH";
39
	$l_ulogd_ext_access	= "journalisation des tentatives d'accès externes";
39
	$l_ulogd_ext_access	= "journalisation des tentatives d'accès externes";
40
	$l_ulogd_traceability	= "journalisation des connexions WEB filtrés";
40
	$l_ulogd_traceability	= "journalisation des connexions WEB filtrés";
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
} else if($Language == 'es') {
-
 
46
	$l_services_title	= "Configuración de Servicios";
-
 
47
	$l_main_services	= "Servicios Principales";
-
 
48
	$l_filter_services	= "Servicios de Filtrado";
-
 
49
	$l_opt_services		= "Servicios Opcionales";
-
 
50
	$l_service_title 	= "Nombre del servicio";
45
 
-
 
-
 
51
	$l_service_start 	= "Iniciar";
-
 
52
	$l_service_stop 	= "Detener";
-
 
53
	$l_service_restart 	= "Reiniciar";
-
 
54
	$l_service_status 	= "Estado";
-
 
55
	$l_service_status_img_ok= "Corriendo";
-
 
56
	$l_service_status_img_ko= "Detenido";
-
 
57
	$l_service_action 	= "Acciones";
-
 
58
	$l_radiusd		= "Servidor de autenticación y autorización.";
-
 
59
	$l_chilli		= "Pasarela de interceptación y servidor DHCP";
-
 
60
	$l_e2guardian		= "Filtro de contenidos URL y WEB";
-
 
61
	$l_mysqld		= "Motor de base de datos para usuarios";
-
 
62
	$l_lighttpd		= "Servidor WEB (ALCASAR Control Center)";
-
 
63
	$l_sshd			= "Servidor Seguro Acceso Remoto";
-
 
64
	$l_clamav_freshclam		= "Proceso de actualización Antivirus (cada 4 horas)";
-
 
65
	$l_clamav_daemon	= "Antimalware";
-
 
66
	$l_ntpd			= "Servidor de hora";
-
 
67
	$l_fail2ban		= "Sistema de Detección de Intrusos";
-
 
68
	$l_nfcapd		= "Colector de flujo NetFlow";
-
 
69
	$l_vnstat		= "Graficador de tráfico de red";
-
 
70
	$l_unbound		= "Servidor DNS principal ";
-
 
71
	$l_unbound_blacklist	= "Servidor DNS de Lista Negra";
-
 
72
	$l_unbound_whitelist	= "Servidor DNS de Lista Blanca";
-
 
73
	$l_dnsmasq_whitelist	= "Servidor DNS de Lista Blanca (IPSET)";
-
 
74
	$l_unbound_blackhole	= "Agujero negro DNS";
-
 
75
	$l_ulogd_ssh		= "Proceso de registro para accesos SSH";
-
 
76
	$l_ulogd_ext_access	= "Proceso de registro de intentos de accesos externos";
-
 
77
	$l_ulogd_traceability	= "Proceso de registro de acceso WEB";
-
 
78
	$l_execute		= "Ejecutar";
-
 
79
	$l_stop_restart		= "Apagado y Reinicio del sistema";
-
 
80
	$l_halt			= "Apagar el sistema";
-
 
81
	$l_reboot		= "Reiniciar el sistema";
46
} else {
82
} else {
47
	$l_services_title	= "Services configuration";
83
	$l_services_title	= "Services configuration";
48
	$l_main_services	= "Main services";
84
	$l_main_services	= "Main services";
49
	$l_filter_services	= "Filtering services";
85
	$l_filter_services	= "Filtering services";
50
	$l_opt_services		= "Optional services";
86
	$l_opt_services		= "Optional services";
51
	$l_service_title 	= "Service name";
87
	$l_service_title 	= "Service name";
52
	$l_service_start 	= "Start";
88
	$l_service_start 	= "Start";
53
	$l_service_stop 	= "Stop";
89
	$l_service_stop 	= "Stop";
54
	$l_service_restart 	= "Restart";
90
	$l_service_restart 	= "Restart";
55
	$l_service_status 	= "Status";
91
	$l_service_status 	= "Status";
56
	$l_service_status_img_ok= "Running";
92
	$l_service_status_img_ok= "Running";
57
	$l_service_status_img_ko= "Stopped";
93
	$l_service_status_img_ko= "Stopped";
58
	$l_service_action 	= "Actions";
94
	$l_service_action 	= "Actions";
59
	$l_radiusd		= "Authentication and authorisation server";
95
	$l_radiusd		= "Authentication and authorisation server";
60
	$l_chilli		= "Interception gateway and DHCP server";
96
	$l_chilli		= "Interception gateway and DHCP server";
61
	$l_e2guardian		= "URL and WEB content filter";
97
	$l_e2guardian		= "URL and WEB content filter";
62
	$l_mysqld		= "User database server";
98
	$l_mysqld		= "User database server";
63
	$l_lighttpd		= "WEB server (ALCASAR Control Center)";
99
	$l_lighttpd		= "WEB server (ALCASAR Control Center)";
64
	$l_sshd			= "Secure remote access";
100
	$l_sshd			= "Secure remote access";
65
	$l_clamav_freshclam	= "Antivirus update process (every 4 hours)";
101
	$l_clamav_freshclam	= "Antivirus update process (every 4 hours)";
66
	$l_clamav_daemon= "Antimalware";
102
	$l_clamav_daemon= "Antimalware";
67
	$l_ntpd			= "Network time server";
103
	$l_ntpd			= "Network time server";
68
	$l_fail2ban		= "Intrusion Dectection System";
104
	$l_fail2ban		= "Intrusion Dectection System";
69
	$l_nfcapd		= "Netflow collector";
105
	$l_nfcapd		= "Netflow collector";
70
	$l_vnstat		= "Network grapher";
106
	$l_vnstat		= "Network grapher";
71
	$l_unbound		= "Main DNS server";
107
	$l_unbound		= "Main DNS server";
72
	$l_unbound_blacklist	= "Blacklist DNS server";
108
	$l_unbound_blacklist	= "Blacklist DNS server";
73
	$l_unbound_whitelist	= "Whitelist DNS server";
109
	$l_unbound_whitelist	= "Whitelist DNS server";
74
	$l_dnsmasq_whitelist	= "Whitelist DNS server (IPSET)";
110
	$l_dnsmasq_whitelist	= "Whitelist DNS server (IPSET)";
75
	$l_unbound_blackhole	= "Blackhole DNS server";
111
	$l_unbound_blackhole	= "Blackhole DNS server";
76
	$l_ulogd_ssh		= "SSH access logging process";
112
	$l_ulogd_ssh		= "SSH access logging process";
77
	$l_ulogd_ext_access	= "Extern access attempts logging process";
113
	$l_ulogd_ext_access	= "Extern access attempts logging process";
78
	$l_ulogd_traceability	= "Filtering WEB access logging process";
114
	$l_ulogd_traceability	= "Filtering WEB access logging process";
79
	$l_execute		= "Execute";
115
	$l_execute		= "Execute";
80
	$l_stop_restart		= "Halt and restart the system";
116
	$l_stop_restart		= "Halt and restart the system";
81
	$l_halt			= "Halt le system";
117
	$l_halt			= "Halt le system";
82
	$l_reboot		= "Restart the system";
118
	$l_reboot		= "Restart the system";
83
}
119
}
84
 
120
 
85
/****************************************************************
121
/****************************************************************
86
*	                   CONST				*
122
*	                   CONST				*
87
*****************************************************************/
123
*****************************************************************/
88
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
124
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
89
 
125
 
90
/********************************************************
126
/********************************************************
91
*			CONF FILE test 			*
127
*			CONF FILE test 			*
92
*********************************************************/
128
*********************************************************/
93
if (!file_exists(CONF_FILE)){
129
if (!file_exists(CONF_FILE)){
94
	exit("Fichier de configuration ".CONF_FILE." non présent");
130
	exit("Fichier de configuration ".CONF_FILE." non présent");
95
}
131
}
96
if (!is_readable(CONF_FILE)){
132
if (!is_readable(CONF_FILE)){
97
	exit("Vous n'avez pas les droits de lecture sur le fichier ".CONF_FILE);
133
	exit("Vous n'avez pas les droits de lecture sur le fichier ".CONF_FILE);
98
}
134
}
99
 
135
 
100
// Doing an action on a service (start,stop or restart)
136
// Doing an action on a service (start,stop or restart)
101
function serviceExec($service, $action){
137
function serviceExec($service, $action){
102
	if (($action == "start")||($action == "stop")||($action == "restart")){
138
	if (($action == "start")||($action == "stop")||($action == "restart")){
103
		exec("sudo /usr/bin/systemctl $action ".escapeshellarg($service), $retval, $retstatus);
139
		exec("sudo /usr/bin/systemctl $action ".escapeshellarg($service), $retval, $retstatus);
104
		if ($service == "sshd"){ // in order to keep that conf for SSH at next reboot
140
		if ($service == "sshd"){ // in order to keep that conf for SSH at next reboot
105
			if ($action == "start"){
141
			if ($action == "start"){
106
				exec("sudo /usr/bin/systemctl enable ".escapeshellarg($service));
142
				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)));
143
				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");
144
				exec("sudo /usr/local/bin/alcasar-iptables.sh");
109
				}
145
				}
110
			if ($action == "stop"){
146
			if ($action == "stop"){
111
			       	exec("sudo /usr/bin/systemctl disable ".escapeshellarg($service));
147
			       	exec("sudo /usr/bin/systemctl disable ".escapeshellarg($service));
112
				file_put_contents(CONF_FILE, str_replace('SSH=on', 'SSH=off', file_get_contents(CONF_FILE)));
148
				file_put_contents(CONF_FILE, str_replace('SSH=on', 'SSH=off', file_get_contents(CONF_FILE)));
113
				exec("sudo /usr/local/bin/alcasar-iptables.sh");
149
				exec("sudo /usr/local/bin/alcasar-iptables.sh");
114
				}
150
				}
115
			}
151
			}
116
		return $retstatus;
152
		return $retstatus;
117
	} else {
153
	} else {
118
		return false;
154
		return false;
119
	}
155
	}
120
}
156
}
121
 
157
 
122
// Testing if a service is active
158
// Testing if a service is active
123
function checkServiceStatus($service){
159
function checkServiceStatus($service){
124
	$response = false;
160
	$response = false;
125
	exec("sudo /usr/bin/systemctl is-active ".escapeshellarg("$service.service"), $retval);
161
	exec("sudo /usr/bin/systemctl is-active ".escapeshellarg("$service.service"), $retval);
126
	foreach( $retval as $val ) {
162
	foreach( $retval as $val ) {
127
		if ($val == "active"){
163
		if ($val == "active"){
128
			$response = true;
164
			$response = true;
129
			break;
165
			break;
130
		}
166
		}
131
	}
167
	}
132
	return $response;
168
	return $response;
133
}
169
}
134
 
170
 
135
//-------------------------------
171
//-------------------------------
136
// Actions on services
172
// Actions on services
137
//-------------------------------
173
//-------------------------------
138
$autorizeService = array("radiusd","chilli","mysqld","lighttpd","unbound-forward","ulogd-ssh","ulogd-ext-access","ulogd-traceability","unbound-blacklist","unbound-whitelist","dnsmasq-whitelist","unbound-blackhole","e2guardian","clamav-daemon","clamav-freshclam","sshd","ntpd","fail2ban","nfcapd","vnstat");
174
$autorizeService = array("radiusd","chilli","mysqld","lighttpd","unbound-forward","ulogd-ssh","ulogd-ext-access","ulogd-traceability","unbound-blacklist","unbound-whitelist","dnsmasq-whitelist","unbound-blackhole","e2guardian","clamav-daemon","clamav-freshclam","sshd","ntpd","fail2ban","nfcapd","vnstat");
139
$autorizeAction = array("start","stop","restart");
175
$autorizeAction = array("start","stop","restart");
140
 
176
 
141
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
177
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
142
    if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
178
    if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
143
    	$execStatus = serviceExec($_GET['service'], $_GET['action']);
179
    	$execStatus = serviceExec($_GET['service'], $_GET['action']);
144
		// execStatus non exploité
180
		// execStatus non exploité
145
	}
181
	}
146
}
182
}
147
//-------------------------------
183
//-------------------------------
148
// Actions on system
184
// Actions on system
149
//-------------------------------
185
//-------------------------------
150
if (isset($_POST['choix'])){
186
if (isset($_POST['choix'])){
151
	switch ($_POST['choix']){
187
	switch ($_POST['choix']){
152
		case 'reboot' :
188
		case 'reboot' :
153
			exec ("sudo /usr/local/bin/alcasar-logout.sh all");
189
			exec ("sudo /usr/local/bin/alcasar-logout.sh all");
154
			exec ("sudo /usr/sbin/shutdown -r now");
190
			exec ("sudo /usr/sbin/shutdown -r now");
155
		break;
191
		break;
156
		case 'halt' :
192
		case 'halt' :
157
			exec ("sudo /usr/local/bin/alcasar-logout.sh all");
193
			exec ("sudo /usr/local/bin/alcasar-logout.sh all");
158
			exec ("sudo /usr/sbin/shutdown -h now");
194
			exec ("sudo /usr/sbin/shutdown -h now");
159
		break;
195
		break;
160
	}
196
	}
161
}
197
}
162
 
198
 
163
//-------------------------------
199
//-------------------------------
164
// Check services status
200
// Check services status
165
//-------------------------------
201
//-------------------------------
166
$MainServiceStatus = array();
202
$MainServiceStatus = array();
167
$MainServiceStatus['chilli'] = checkServiceStatus("chilli");
203
$MainServiceStatus['chilli'] = checkServiceStatus("chilli");
168
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd");
204
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd");
169
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld");
205
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld");
170
$MainServiceStatus['lighttpd'] = checkServiceStatus("lighttpd");
206
$MainServiceStatus['lighttpd'] = checkServiceStatus("lighttpd");
171
$MainServiceStatus['unbound'] = checkServiceStatus("unbound");
207
$MainServiceStatus['unbound'] = checkServiceStatus("unbound");
172
$MainServiceStatus['nfcapd'] = checkServiceStatus("nfcapd");
208
$MainServiceStatus['nfcapd'] = checkServiceStatus("nfcapd");
173
$MainServiceStatus['ulogd_ssh'] = checkServiceStatus("ulogd-ssh");
209
$MainServiceStatus['ulogd_ssh'] = checkServiceStatus("ulogd-ssh");
174
$MainServiceStatus['ulogd_ext_access'] = checkServiceStatus("ulogd-ext-access");
210
$MainServiceStatus['ulogd_ext_access'] = checkServiceStatus("ulogd-ext-access");
175
$MainServiceStatus['ulogd_traceability'] = checkServiceStatus("ulogd-traceability");
211
$MainServiceStatus['ulogd_traceability'] = checkServiceStatus("ulogd-traceability");
176
 
212
 
177
$FilterServiceStatus = array();
213
$FilterServiceStatus = array();
178
$FilterServiceStatus['unbound_blacklist'] = checkServiceStatus("unbound-blacklist");
214
$FilterServiceStatus['unbound_blacklist'] = checkServiceStatus("unbound-blacklist");
179
$FilterServiceStatus['unbound_whitelist'] = checkServiceStatus("unbound-whitelist");
215
$FilterServiceStatus['unbound_whitelist'] = checkServiceStatus("unbound-whitelist");
180
$FilterServiceStatus['dnsmasq_whitelist'] = checkServiceStatus("dnsmasq-whitelist");
216
$FilterServiceStatus['dnsmasq_whitelist'] = checkServiceStatus("dnsmasq-whitelist");
181
$FilterServiceStatus['unbound_blackhole'] = checkServiceStatus("unbound-blackhole");
217
$FilterServiceStatus['unbound_blackhole'] = checkServiceStatus("unbound-blackhole");
182
$FilterServiceStatus['e2guardian'] = checkServiceStatus("e2guardian");
218
$FilterServiceStatus['e2guardian'] = checkServiceStatus("e2guardian");
183
$FilterServiceStatus['clamav_daemon'] = checkServiceStatus("clamav-daemon");
219
$FilterServiceStatus['clamav_daemon'] = checkServiceStatus("clamav-daemon");
184
$FilterServiceStatus['clamav_freshclam'] = checkServiceStatus("clamav-freshclam");
220
$FilterServiceStatus['clamav_freshclam'] = checkServiceStatus("clamav-freshclam");
185
 
221
 
186
$OptServiceStatus = array();
222
$OptServiceStatus = array();
187
$OptServiceStatus['sshd'] = checkServiceStatus("sshd");
223
$OptServiceStatus['sshd'] = checkServiceStatus("sshd");
188
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd");
224
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd");
189
$OptServiceStatus['fail2ban'] = checkServiceStatus("fail2ban");
225
$OptServiceStatus['fail2ban'] = checkServiceStatus("fail2ban");
190
$OptServiceStatus['vnstat'] = checkServiceStatus("vnstat");
226
$OptServiceStatus['vnstat'] = checkServiceStatus("vnstat");
191
/****************
227
/****************
192
*	MAIN	*
228
*	MAIN	*
193
*****************/
229
*****************/
194
 
230
 
195
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
231
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
196
<html><!-- written by steweb57 / rexy -->
232
<html><!-- written by steweb57 / rexy -->
197
<head>
233
<head>
198
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
234
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
199
<title><?php echo $l_services_title; ?></title>
235
<title><?php echo $l_services_title; ?></title>
200
<link rel="stylesheet" href="/css/acc.css" type="text/css">
236
<link rel="stylesheet" href="/css/acc.css" type="text/css">
201
</head>
237
</head>
202
<body>
238
<body>
203
<table width="100%" border="0" cellspacing="0" cellpadding="0">
239
<table width="100%" border="0" cellspacing="0" cellpadding="0">
204
	<tr><th><?php echo $l_main_services; ?></th></tr>
240
	<tr><th><?php echo $l_main_services; ?></th></tr>
205
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
241
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
206
</table>
242
</table>
207
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
243
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
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>
244
	<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>
209
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?>
245
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?>
210
<tr>
246
<tr>
211
	<?php if ($statusOK) { ?>
247
	<?php if ($statusOK) { ?>
212
	<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
248
	<td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
213
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
249
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
214
	<td width="80" align="center">---</td>
250
	<td width="80" align="center">---</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>
251
	<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>
216
	<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=".str_replace('_','-',$serviceName)."\"> $l_service_restart";?></a></td>
252
	<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=".str_replace('_','-',$serviceName)."\"> $l_service_restart";?></a></td>
217
	<?php } else { ?>
253
	<?php } else { ?>
218
	<td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
254
	<td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
219
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
255
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </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>
256
	<td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=".str_replace('_','-',$serviceName)."\"> $l_service_start";?></a></td>
221
	<td width="80" align="center">---</td>
257
	<td width="80" align="center">---</td>
222
	<td width="80" align="center">---</td>
258
	<td width="80" align="center">---</td>
223
    <?php } ?>
259
    <?php } ?>
224
</tr>
260
</tr>
225
<?php } ?>
261
<?php } ?>
226
</table>
262
</table>
227
<table width="100%" border="0" cellspacing="0" cellpadding="0">
263
<table width="100%" border="0" cellspacing="0" cellpadding="0">
228
	<tr><th><?php echo $l_filter_services; ?></th></tr>
264
	<tr><th><?php echo $l_filter_services; ?></th></tr>
229
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
265
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
230
</table>
266
</table>
231
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
267
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
232
	<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>
268
	<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>
233
<!--	<TR align="center"> -->
269
<!--	<TR align="center"> -->
234
<?php foreach( $FilterServiceStatus as $serviceName => $statusOK ) { ?>
270
<?php foreach( $FilterServiceStatus as $serviceName => $statusOK ) { ?>
235
<tr>
271
<tr>
236
	<?php if ($statusOK) { ?>
272
	<?php if ($statusOK) { ?>
237
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
273
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
238
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
274
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
239
    <td width="80" align="center">---</td>
275
    <td width="80" align="center">---</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>
276
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=".str_replace('_','-',$serviceName)."\"> $l_service_stop";?></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>
277
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=".str_replace('_','-',$serviceName)."\"> $l_service_restart";?></a></td>
242
	<?php } else { ?>
278
	<?php } else { ?>
243
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
279
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
244
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
280
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </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>
281
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=".str_replace('_','-',$serviceName)."\"> $l_service_start";?></a></td>
246
    <td width="80" align="center">---</td>
282
    <td width="80" align="center">---</td>
247
    <td width="80" align="center">---</td>
283
    <td width="80" align="center">---</td>
248
    <?php } ?>
284
    <?php } ?>
249
</tr>
285
</tr>
250
<?php } ?>
286
<?php } ?>
251
</table>
287
</table>
252
<table width="100%" border="0" cellspacing="0" cellpadding="0">
288
<table width="100%" border="0" cellspacing="0" cellpadding="0">
253
	<tr><th><?php echo $l_opt_services; ?></th></tr>
289
	<tr><th><?php echo $l_opt_services; ?></th></tr>
254
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
290
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
255
</table>
291
</table>
256
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
292
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
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>
293
	<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>
258
<?php foreach( $OptServiceStatus as $serviceName => $statusOK ) { ?>
294
<?php foreach( $OptServiceStatus as $serviceName => $statusOK ) { ?>
259
<tr>
295
<tr>
260
	<?php if ($statusOK) { ?>
296
	<?php if ($statusOK) { ?>
261
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
297
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
262
	<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>
263
    <td width="80" align="center">---</td>
299
    <td width="80" align="center">---</td>
264
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
300
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
265
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
301
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
266
	<?php } else { ?>
302
	<?php } else { ?>
267
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
303
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
268
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
304
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
269
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
305
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
270
    <td width="80" align="center">---</td>
306
    <td width="80" align="center">---</td>
271
    <td width="80" align="center">---</td>
307
    <td width="80" align="center">---</td>
272
    <?php } ?>
308
    <?php } ?>
273
</tr>
309
</tr>
274
<?php } ?>
310
<?php } ?>
275
</table>
311
</table>
276
<table width="100%" border="0" cellspacing="0" cellpadding="0">
312
<table width="100%" border="0" cellspacing="0" cellpadding="0">
277
	<tr><th><? echo $l_stop_restart;?></th></tr>
313
	<tr><th><? echo $l_stop_restart;?></th></tr>
278
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
314
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
279
</table>
315
</table>
280
<table width="100%" border=1 cellspacing=0 cellpadding=1>
316
<table width="100%" border=1 cellspacing=0 cellpadding=1>
281
	<tr><td valign="middle" align="left">
317
	<tr><td valign="middle" align="left">
282
	<FORM action="services.php" method=POST>
318
	<FORM action="services.php" method=POST>
283
		<select name='choix'>
319
		<select name='choix'>
284
			<option selected value="reboot"><?echo "$l_reboot";?>
320
			<option selected value="reboot"><?echo "$l_reboot";?>
285
			<option value="halt"><?echo "$l_halt";?>
321
			<option value="halt"><?echo "$l_halt";?>
286
		</select>
322
		</select>
287
		<input type=submit value="<?echo "$l_execute";?>">
323
		<input type=submit value="<?echo "$l_execute";?>">
288
	</FORM>
324
	</FORM>
289
	</td></tr>
325
	</td></tr>
290
</table>
326
</table>
291
</body>
327
</body>
292
</html>
328
</html>
293
 
329