Subversion Repositories ALCASAR

Rev

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

Rev 1574 Rev 1599
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&eacute;marrer";
14
	$l_service_start 	= "D&eacute;marrer";
15
	$l_service_stop 	= "Arr&ecirc;ter";
15
	$l_service_stop 	= "Arr&ecirc;ter";
16
	$l_service_restart 	= "Red&eacute;marrer";
16
	$l_service_restart 	= "Red&eacute;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";
22
	$l_chilli		= "Passerelle d'interception";
23
	$l_dansguardian		= "Filtre d'URL et de contenu WEB";
23
	$l_dansguardian		= "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_httpd		= "Serveur WEB (Alcasar Control Center)";
25
	$l_httpd		= "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_havp			= "Proxy Antivirus 1";
29
	$l_havp			= "Proxy Antivirus 1";
30
	$l_tinyproxy		= "Proxy HTTP léger";
30
	$l_tinyproxy		= "Proxy HTTP léger";
31
	$l_dnsmasq		= "Serveur DNS et DHCP";
31
	$l_dnsmasq		= "Serveur DNS et DHCP";
32
	$l_dnsmasq_blacklist	= "Serveur DNS pour la Blacklist";
32
	$l_dnsmasq_blacklist	= "Serveur DNS pour la Blacklist";
33
	$l_dnsmasq_whitelist	= "Serveur DNS pour la Whitelist";
33
	$l_dnsmasq_whitelist	= "Serveur DNS pour la Whitelist";
34
	$l_dnsmasq_blackhole	= "Serveur DNS 'trou noir'";
34
	$l_dnsmasq_blackhole	= "Serveur DNS 'trou noir'";
35
	$l_ulogd_ssh		= "journalisation des accès par SSH";
35
	$l_ulogd_ssh		= "journalisation des accès par SSH";
36
	$l_ulogd_ext_access	= "journalisation des tentatives d'accès externes";
36
	$l_ulogd_ext_access	= "journalisation des tentatives d'accès externes";
37
	$l_ulogd_traceability	= "journalisation des connexions WEB filtrés";
37
	$l_ulogd_traceability	= "journalisation des connexions WEB filtrés";
38
	$l_execute		= "Exécuter";
38
	$l_execute		= "Exécuter";
39
	$l_stop_restart		= "Arret et redémarrage du système";
39
	$l_stop_restart		= "Arret et redémarrage du système";
40
	$l_halt			= "Arréter le système";
40
	$l_halt			= "Arréter le système";
41
	$l_reboot		= "Relancer le système";
41
	$l_reboot		= "Relancer le système";
42
} else {
42
} else {
43
	$l_services_title	= "Services configuration";
43
	$l_services_title	= "Services configuration";
44
	$l_main_services	= "Main services";
44
	$l_main_services	= "Main services";
45
	$l_filter_services	= "Filtering services";
45
	$l_filter_services	= "Filtering services";
46
	$l_opt_services		= "Optional services";
46
	$l_opt_services		= "Optional services";
47
	$l_service_title 	= "Service name";
47
	$l_service_title 	= "Service name";
48
	$l_service_start 	= "Start";
48
	$l_service_start 	= "Start";
49
	$l_service_stop 	= "Stop";
49
	$l_service_stop 	= "Stop";
50
	$l_service_restart 	= "Restart";
50
	$l_service_restart 	= "Restart";
51
	$l_service_status 	= "Status";
51
	$l_service_status 	= "Status";
52
	$l_service_status_img_ok= "Running";
52
	$l_service_status_img_ok= "Running";
53
	$l_service_status_img_ko= "Stopped";
53
	$l_service_status_img_ko= "Stopped";
54
	$l_service_action 	= "Actions";
54
	$l_service_action 	= "Actions";
55
	$l_radiusd		= "Authentication and authorisation server";
55
	$l_radiusd		= "Authentication and authorisation server";
56
	$l_chilli		= "Interception gateway";
56
	$l_chilli		= "Interception gateway";
57
	$l_dansguardian		= "URL and WEB content filter";
57
	$l_dansguardian		= "URL and WEB content filter";
58
	$l_mysqld		= "User database server";
58
	$l_mysqld		= "User database server";
59
	$l_httpd		= "WEB server (ALCASAR Control Center)";
59
	$l_httpd		= "WEB server (ALCASAR Control Center)";
60
	$l_sshd			= "Secure remote access";
60
	$l_sshd			= "Secure remote access";
61
	$l_freshclam		= "Antivirus update process (every 2 hours)";
61
	$l_freshclam		= "Antivirus update process (every 2 hours)";
62
	$l_ntpd			= "Network time server";
62
	$l_ntpd			= "Network time server";
63
	$l_havp			= "Antivirus Proxy";
63
	$l_havp			= "Antivirus Proxy";
64
	$l_tinyproxy		= "Light HTTP Proxy";
64
	$l_tinyproxy		= "Light HTTP Proxy";
65
	$l_dnsmasq		= "DNS and DHCP server";
65
	$l_dnsmasq		= "DNS and DHCP server";
66
	$l_dnsmasq_blacklist	= "DNS server for the Blacklist";
66
	$l_dnsmasq_blacklist	= "DNS server for the Blacklist";
67
	$l_dnsmasq_whitelist	= "DNS server for the Whitelist";
67
	$l_dnsmasq_whitelist	= "DNS server for the Whitelist";
68
	$l_dnsmasq_blackhole	= "DNS server (blackhole)";
68
	$l_dnsmasq_blackhole	= "DNS server (blackhole)";
69
	$l_ulogd_ssh		= "SSH access logging process";
69
	$l_ulogd_ssh		= "SSH access logging process";
70
	$l_ulogd_ext_access	= "Extern access attempts logging process";
70
	$l_ulogd_ext_access	= "Extern access attempts logging process";
71
	$l_ulogd_traceability	= "Filtering WEB access logging process";
71
	$l_ulogd_traceability	= "Filtering WEB access logging process";
72
	$l_execute		= "Execute";
72
	$l_execute		= "Execute";
73
	$l_stop_restart		= "Halt and restart the system";
73
	$l_stop_restart		= "Halt and restart the system";
74
	$l_halt			= "Halt le system";
74
	$l_halt			= "Halt le system";
75
	$l_reboot		= "Restart the system";
75
	$l_reboot		= "Restart the system";
76
}
76
}
77
 
77
 
78
/****************************************************************
78
/****************************************************************
79
*	CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION	*
79
*	CONSTANTES AVEC CHEMINS DES FICHIERS DE CONFIGURATION	*
80
*****************************************************************/
80
*****************************************************************/
81
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
81
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
82
 
82
 
83
/********************************************************
83
/********************************************************
84
*	TEST DU FICHIERS DE CONFIGURATION		*
84
*	TEST DU FICHIERS DE CONFIGURATION		*
85
*********************************************************/
85
*********************************************************/
86
//Test de présence et des droits en lecture des fichiers de configuration.
86
//Test de présence et des droits en lecture des fichiers de configuration.
87
if (!file_exists(CONF_FILE)){
87
if (!file_exists(CONF_FILE)){
88
	exit("Fichier de configuration ".CONF_FILE." non présent");
88
	exit("Fichier de configuration ".CONF_FILE." non présent");
89
}
89
}
90
if (!is_readable(CONF_FILE)){
90
if (!is_readable(CONF_FILE)){
91
	exit("Vous n'avez pas les droits de lecture sur le fichier ".CONF_FILE);
91
	exit("Vous n'avez pas les droits de lecture sur le fichier ".CONF_FILE);
92
}
92
}
93
 
93
 
94
//fonction pour faire une action (start,stop,restart) sur un service
94
//fonction pour faire une action (start,stop,restart) sur un service
95
function serviceExec($service, $action){
95
function serviceExec($service, $action){
96
	if (($action == "start")||($action == "stop")||($action == "restart")){
96
	if (($action == "start")||($action == "stop")||($action == "restart")){
97
		exec("sudo /usr/bin/systemctl $action $service",$retval, $retstatus);
97
		exec("sudo /usr/bin/systemctl $action $service",$retval, $retstatus);
98
		if ($service == "sshd"){
98
		if ($service == "sshd"){
99
			if ($action == "start"){ 
99
			if ($action == "start"){ 
100
				exec("sudo /usr/bin/systemctl enable $service");
100
				exec("sudo /usr/bin/systemctl enable $service");
101
				file_put_contents(CONF_FILE, str_replace('SSH=off', 'SSH=on', file_get_contents(CONF_FILE)));
101
				file_put_contents(CONF_FILE, str_replace('SSH=off', 'SSH=on', file_get_contents(CONF_FILE)));
102
				exec ("sudo /usr/local/bin/alcasar-iptables.sh");
102
				exec ("sudo /usr/local/bin/alcasar-iptables.sh");
103
				}
103
				}
104
			if ($action == "stop"){
104
			if ($action == "stop"){
105
			       	exec("sudo /usr/bin/systemctl disable $service");
105
			       	exec("sudo /usr/bin/systemctl disable $service");
106
				file_put_contents(CONF_FILE, str_replace('SSH=on', 'SSH=off', file_get_contents(CONF_FILE)));
106
				file_put_contents(CONF_FILE, str_replace('SSH=on', 'SSH=off', file_get_contents(CONF_FILE)));
107
				exec ("sudo /usr/local/bin/alcasar-iptables.sh");
107
				exec ("sudo /usr/local/bin/alcasar-iptables.sh");
108
				}
108
				}
109
			}
109
			}
110
		return $retstatus;
110
		return $retstatus;
111
	} else {
111
	} else {
112
		return false;
112
		return false;
113
	}
113
	}
114
}
114
}
115
//fonction définissant le status d'un service 
115
//fonction définissant le status d'un service 
116
//(en fonction de la présence d'un mot clé dans la valeur de status)
116
//(en fonction de la présence d'un mot clé dans la valeur de status)
117
function checkServiceStatus($service){
117
function checkServiceStatus($service){
118
	$response = false;
118
	$response = false;
119
	exec("/usr/bin/systemctl is-active $service.service",$retval);
119
	exec("/usr/bin/systemctl is-active $service.service",$retval);
120
	foreach( $retval as $val ) {
120
	foreach( $retval as $val ) {
121
		if ($val == "active"){
121
		if ($val == "active"){
122
			$response = true;
122
			$response = true;
123
			break;
123
			break;
124
		}
124
		}
125
	}
125
	}
126
	return $response;
126
	return $response;
127
}
127
}
128
 
128
 
129
//-------------------------------
129
//-------------------------------
130
// Actions on services
130
// Actions on services
131
//-------------------------------
131
//-------------------------------
132
//sécurité sur les actions à réaliser
132
//sécurité sur les actions à réaliser
133
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","httpd","sshd","freshclam","ntpd","havp","tinyproxy","dnsmasq","dnsmasq-blacklist","dnsmasq-whitelist","dnsmasq-blackhole");
133
$autorizeService = array("radiusd","chilli","dansguardian","mysqld","httpd","sshd","freshclam","ntpd","havp","tinyproxy","dnsmasq","dnsmasq-blacklist","dnsmasq-whitelist","dnsmasq-blackhole");
134
$autorizeAction = array("start","stop","restart");
134
$autorizeAction = array("start","stop","restart");
135
 
135
 
136
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
136
if (isset($_GET['service'])&&(in_array($_GET['service'], $autorizeService))) {
137
    if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
137
    if (isset($_GET['action'])&&(in_array($_GET['action'], $autorizeAction))) {
138
    	$execStatus = serviceExec($_GET['service'], $_GET['action']);
138
    	$execStatus = serviceExec($_GET['service'], $_GET['action']);
139
		// execStatus non exploité
139
		// execStatus non exploité
140
	}
140
	}
141
}
141
}
142
//-------------------------------
142
//-------------------------------
143
// Actions on system
143
// Actions on system
144
//-------------------------------
144
//-------------------------------
145
if (isset($_POST['choix'])){
145
if (isset($_POST['choix'])){
146
	switch ($_POST['choix']){
146
	switch ($_POST['choix']){
147
		case 'reboot' :
147
		case 'reboot' :
148
			exec ("sudo /usr/local/sbin/alcasar-logout.sh all");
148
			exec ("sudo /usr/local/sbin/alcasar-logout.sh all");
149
			exec ("sudo /usr/bin/systemctl reboot");
149
			exec ("sudo /usr/sbin/shutdown -r now");
150
		break;
150
		break;
151
		case 'halt' :
151
		case 'halt' :
152
			exec ("sudo /usr/local/sbin/alcasar-logout.sh all");
152
			exec ("sudo /usr/local/sbin/alcasar-logout.sh all");
153
			exec ("sudo /usr/bin/systemctl halt");
153
			exec ("sudo /usr/sbin/shutdown -h now");
154
		break;
154
		break;
155
	}
155
	}
156
}
156
}
157
 
157
 
158
 
158
 
159
//-------------------------------
159
//-------------------------------
160
//recherche du status des services
160
//recherche du status des services
161
//-------------------------------
161
//-------------------------------
162
$MainServiceStatus = array();
162
$MainServiceStatus = array();
163
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd");
163
$MainServiceStatus['radiusd'] = checkServiceStatus("radiusd");
164
$MainServiceStatus['chilli'] = checkServiceStatus("chilli");
164
$MainServiceStatus['chilli'] = checkServiceStatus("chilli");
165
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld");
165
$MainServiceStatus['mysqld'] = checkServiceStatus("mysqld");
166
$MainServiceStatus['httpd'] = checkServiceStatus("httpd");
166
$MainServiceStatus['httpd'] = checkServiceStatus("httpd");
167
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq");
167
$MainServiceStatus['dnsmasq'] = checkServiceStatus("dnsmasq");
168
$MainServiceStatus['ulogd_ssh'] = checkServiceStatus("ulogd-ssh");
168
$MainServiceStatus['ulogd_ssh'] = checkServiceStatus("ulogd-ssh");
169
$MainServiceStatus['ulogd_ext_access'] = checkServiceStatus("ulogd-ext-access");
169
$MainServiceStatus['ulogd_ext_access'] = checkServiceStatus("ulogd-ext-access");
170
$MainServiceStatus['ulogd_traceability'] = checkServiceStatus("ulogd-traceability");
170
$MainServiceStatus['ulogd_traceability'] = checkServiceStatus("ulogd-traceability");
171
 
171
 
172
$FilterServiceStatus = array();
172
$FilterServiceStatus = array();
173
$FilterServiceStatus['dnsmasq_blacklist'] = checkServiceStatus("dnsmasq-blacklist");
173
$FilterServiceStatus['dnsmasq_blacklist'] = checkServiceStatus("dnsmasq-blacklist");
174
$FilterServiceStatus['dnsmasq_whitelist'] = checkServiceStatus("dnsmasq-whitelist");
174
$FilterServiceStatus['dnsmasq_whitelist'] = checkServiceStatus("dnsmasq-whitelist");
175
$FilterServiceStatus['dnsmasq_blackhole'] = checkServiceStatus("dnsmasq-blackhole");
175
$FilterServiceStatus['dnsmasq_blackhole'] = checkServiceStatus("dnsmasq-blackhole");
176
$filterServiceStatus['dansguardian'] = checkServiceStatus("dansguardian");
176
$filterServiceStatus['dansguardian'] = checkServiceStatus("dansguardian");
177
$FilterServiceStatus['havp'] = checkServiceStatus("havp");
177
$FilterServiceStatus['havp'] = checkServiceStatus("havp");
178
$FilterServiceStatus['tinyproxy'] = checkServiceStatus("tinyproxy");
178
$FilterServiceStatus['tinyproxy'] = checkServiceStatus("tinyproxy");
179
$FilterServiceStatus['freshclam'] = checkServiceStatus("freshclam");
179
$FilterServiceStatus['freshclam'] = checkServiceStatus("freshclam");
180
 
180
 
181
 
181
 
182
$OptServiceStatus = array();
182
$OptServiceStatus = array();
183
$OptServiceStatus['sshd'] = checkServiceStatus("sshd");
183
$OptServiceStatus['sshd'] = checkServiceStatus("sshd");
184
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd");
184
$OptServiceStatus['ntpd'] = checkServiceStatus("ntpd");
185
 
185
 
186
/****************
186
/****************
187
*	MAIN	*
187
*	MAIN	*
188
*****************/
188
*****************/
189
 
189
 
190
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
190
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
191
<html><!-- written by steweb57 / rexy -->
191
<html><!-- written by steweb57 / rexy -->
192
<head>
192
<head>
193
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
193
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
194
<title><?php echo $l_services_title; ?></title>
194
<title><?php echo $l_services_title; ?></title>
195
<link rel="stylesheet" href="/css/style.css" type="text/css">
195
<link rel="stylesheet" href="/css/style.css" type="text/css">
196
</head>
196
</head>
197
<body>
197
<body>
198
<table width="100%" border="0" cellspacing="0" cellpadding="0">
198
<table width="100%" border="0" cellspacing="0" cellpadding="0">
199
	<tr><th><?php echo $l_main_services; ?></th></tr>
199
	<tr><th><?php echo $l_main_services; ?></th></tr>
200
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
200
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
201
</table>
201
</table>
202
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
202
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
203
	<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>
203
	<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>
204
	<TR align="center">
204
	<TR align="center">
205
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?>
205
<?php foreach( $MainServiceStatus as $serviceName => $statusOK ) { ?>
206
<tr>
206
<tr>
207
	<?php if ($statusOK) { ?>
207
	<?php if ($statusOK) { ?>
208
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
208
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
209
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
209
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
210
    <td width="80" align="center">---</td>
210
    <td width="80" align="center">---</td>
211
    <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>
211
    <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>
212
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
212
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
213
	<?php } else { ?>
213
	<?php } else { ?>
214
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
214
    <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"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
215
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
216
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
216
    <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">---</td>
217
    <td width="80" align="center">---</td>
218
    <td width="80" align="center">---</td>
218
    <td width="80" align="center">---</td>
219
    <?php } ?>
219
    <?php } ?>
220
</tr>
220
</tr>
221
<?php } ?>
221
<?php } ?>
222
</td></tr>
222
</td></tr>
223
</table>
223
</table>
224
<table width="100%" border="0" cellspacing="0" cellpadding="0">
224
<table width="100%" border="0" cellspacing="0" cellpadding="0">
225
	<tr><th><?php echo $l_filter_services; ?></th></tr>
225
	<tr><th><?php echo $l_filter_services; ?></th></tr>
226
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
226
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
227
</table>
227
</table>
228
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
228
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
229
	<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>
229
	<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">
230
	<TR align="center">
231
<?php foreach( $FilterServiceStatus as $serviceName => $statusOK ) { ?>
231
<?php foreach( $FilterServiceStatus as $serviceName => $statusOK ) { ?>
232
<tr>
232
<tr>
233
	<?php if ($statusOK) { ?>
233
	<?php if ($statusOK) { ?>
234
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
234
    <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"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
235
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
236
    <td width="80" align="center">---</td>
236
    <td width="80" align="center">---</td>
237
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
237
    <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=restart&service=$serviceName\"> $l_service_restart";?></a></td>
238
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
239
	<?php } else { ?>
239
	<?php } else { ?>
240
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
240
    <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"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
241
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
242
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
242
    <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">---</td>
243
    <td width="80" align="center">---</td>
244
    <td width="80" align="center">---</td>
244
    <td width="80" align="center">---</td>
245
    <?php } ?>
245
    <?php } ?>
246
</tr>
246
</tr>
247
<?php } ?>
247
<?php } ?>
248
</td></tr>
248
</td></tr>
249
</table>
249
</table>
250
<table width="100%" border="0" cellspacing="0" cellpadding="0">
250
<table width="100%" border="0" cellspacing="0" cellpadding="0">
251
	<tr><th><?php echo $l_opt_services; ?></th></tr>
251
	<tr><th><?php echo $l_opt_services; ?></th></tr>
252
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
252
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
253
</table>
253
</table>
254
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
254
<TABLE width="100%" border=1 cellspacing=0 cellpadding=0>
255
	<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>
255
	<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>
256
	<TR align="center">
256
	<TR align="center">
257
<?php foreach( $OptServiceStatus as $serviceName => $statusOK ) { ?>
257
<?php foreach( $OptServiceStatus as $serviceName => $statusOK ) { ?>
258
<tr>
258
<tr>
259
	<?php if ($statusOK) { ?>
259
	<?php if ($statusOK) { ?>
260
    <td align="center"><img src="/images/state_ok.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ok; ?>"></td>
260
    <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"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
261
	<td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
262
    <td width="80" align="center">---</td>
262
    <td width="80" align="center">---</td>
263
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=stop&service=$serviceName\"> $l_service_stop";?></a></td>
263
    <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=restart&service=$serviceName\"> $l_service_restart";?></a></td>
264
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=restart&service=$serviceName\"> $l_service_restart";?></a></td>
265
	<?php } else { ?>
265
	<?php } else { ?>
266
    <td align="center"><img src="/images/state_error.gif" width="15" height="15" alt="<?php echo $l_service_status_img_ko ?>"></td>
266
    <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"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
267
    <td align="center"><?php $comment="l_$serviceName"; echo "<b>$serviceName</b></td><td>${$comment}" ;?> </td>
268
    <td width="80" align="center"><a href="<?php echo $_SERVER['PHP_SELF']."?action=start&service=$serviceName\"> $l_service_start";?></a></td>
268
    <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">---</td>
269
    <td width="80" align="center">---</td>
270
    <td width="80" align="center">---</td>
270
    <td width="80" align="center">---</td>
271
    <?php } ?>
271
    <?php } ?>
272
</tr>
272
</tr>
273
<?php } ?>
273
<?php } ?>
274
</td></tr>
274
</td></tr>
275
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
275
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
276
	<tr><th><? echo $l_stop_restart;?></th></tr>
276
	<tr><th><? echo $l_stop_restart;?></th></tr>
277
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
277
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
278
</TABLE>
278
</TABLE>
279
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
279
<TABLE width="100%" border=1 cellspacing=0 cellpadding=1>
280
	<tr><td valign="middle" align="left">
280
	<tr><td valign="middle" align="left">
281
	<FORM action="services.php" method=POST><b>
281
	<FORM action="services.php" method=POST><b>
282
		<select name='choix'></b>
282
		<select name='choix'></b>
283
			<option selected value="reboot"><?echo "$l_reboot";?>
283
			<option selected value="reboot"><?echo "$l_reboot";?>
284
			<option value="halt"><?echo "$l_halt";?>
284
			<option value="halt"><?echo "$l_halt";?>
285
		</select>
285
		</select>
286
		<input type=submit value="<?echo "$l_execute";?>">
286
		<input type=submit value="<?echo "$l_execute";?>">
287
	</FORM>
287
	</FORM>
288
	</td></tr>
288
	</td></tr>
289
</TABLE>
289
</TABLE>
290
</body>
290
</body>
291
</html>
291
</html>
292
 
292