Subversion Repositories ALCASAR

Rev

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

Rev 1380 Rev 1387
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
 
2
<HTML><!-- written by Rexy -->
-
 
3
<head>
-
 
4
<META HTTP-EQUIV="Refresh" CONTENT="30">
-
 
5
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-
 
6
<title>Auto enregistrement</title>
-
 
7
<link rel="stylesheet" href="/css/style.css">
-
 
8
</head>
-
 
9
<body>
-
 
10
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
-
 
11
<?
1
<?php
12
# Test présence de clé/modem
2
# Test présence de clé/modem
13
$exec_com=exec("lsusb | grep -i 067b | cut -d ' ' -f6 | cut -d ' ' -f1");
3
$exec_com=exec("lsusb | grep -i 067b | cut -d ' ' -f6 | cut -d ' ' -f1");
14
$exec_com2=exec("lsusb | grep -i 12d1 | cut -d ' ' -f6 | cut -d ' ' -f1");
4
$exec_com2=exec("lsusb | grep -i 12d1 | cut -d ' ' -f6 | cut -d ' ' -f1");
15
 
5
 
16
//$exec_com2=exec("lsusb | grep -i d-link | cut -d ' ' -f7");
6
//$exec_com2=exec("lsusb | grep -i d-link | cut -d ' ' -f7");
17
 
7
 
18
$status_key="false";
8
$status_key="false";
19
$script="/usr/local/bin/alcasar-sms.sh";
9
$script="/usr/local/bin/alcasar-sms.sh";
20
 
10
 
21
#Define
11
#Define
22
$gammu_puk = "";
12
$gammu_puk = "";
23
$gammu_simfail = "";
13
$gammu_simfail = "";
24
$gammu_simsecu = "";
14
$gammu_simsecu = "";
25
$gammu_writeerror = "";
15
$gammu_writeerror = "";
26
$gammu_timeout = "";
16
$gammu_timeout = "";
27
$error_pin = "";
17
$error_pin = "";
28
$error_time_account = "";
18
$error_time_account = "";
29
$error_nb_essais = "";
19
$error_nb_essais = "";
30
$error_time_perm = "";
20
$error_time_perm = "";
31
$error_num_alcasar = "";
21
$error_num_alcasar = "";
32
 
22
 
33
# Choice of language
23
# Choice of language
34
$Language = 'en';
24
$Language = 'en';
35
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
25
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
36
	$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
26
	$Langue = explode(",",$_SERVER['HTTP_ACCEPT_LANGUAGE']);
37
	$Language = strtolower(substr(chop($Langue[0]),0,2)); }
27
	$Language = strtolower(substr(chop($Langue[0]),0,2)); }
38
if($Language == 'fr'){
28
if($Language == 'fr'){
39
	$l_title = "Auto enregistrement (SMS)";
29
	$l_title = "Auto enregistrement (SMS)";
40
	$l_conf = "Configuration";
30
	$l_conf = "Configuration";
41
	$l_conf_actu = "Configuration actuelle";
31
	$l_conf_actu = "Configuration actuelle";
42
	$l_pin = "Code PIN";
32
	$l_pin = "Code PIN";
43
	$l_num_alcasar = "Le numero de téléphone de la clé 3G";
33
	$l_num_alcasar = "Le numero de téléphone de la clé 3G";
44
	$l_ban_temp = "Nombre d'essais avant le blocage";
34
	$l_ban_temp = "Nombre d'essais avant le blocage";
45
	$l_time_account = "Durée pour une session créée";
35
	$l_time_account = "Durée pour une session créée";
46
	$l_time_perm = "Durée du blocage (en jours)";
36
	$l_time_perm = "Durée du blocage (en jours)";
47
	$l_status_gammu = "Etat du service";
37
	$l_status_gammu = "Etat du service";
48
	$l_start = "Démarrer";
38
	$l_start = "Démarrer";
49
	$l_status_device = "Status de votre périphérique";
39
	$l_status_device = "Status de votre périphérique";
50
	$l_key_diseable = "Aucune clé est connectée";
40
	$l_key_diseable = "Aucun périphérique détecté";
51
	$l_key_enable = "Votre clé est connectée";
41
	$l_key_enable = "Votre clé est connectée";
52
	$l_force_signal = "Force du signal";
42
	$l_force_signal = "Force du signal";
53
	$l_imei_device = "IMEI du périphérique";
43
	$l_imei_device = "IMEI du périphérique";
54
	$l_sms_received = "Nombre de SMS reçu";
44
	$l_sms_received = "Nombre de SMS reçu";
55
	$l_stop = "Arrêter";
45
	$l_stop = "Arrêter";
56
	$l_gammu_on="Gammu est lancé";
46
	$l_gammu_on="Gammu est lancé";
57
	$l_gammu_off="Gammu est arrêté";
47
	$l_gammu_off="Gammu est arrêté";
58
	$l_edit = "Editer";
48
	$l_edit = "Editer";
59
	$l_error_label_empty = "Le champ est vide";
49
	$l_error_label_empty = "Le champ est vide";
60
	$l_error_label_num = "Ce n'est pas un PIN valide";
50
	$l_error_label_num = "Ce n'est pas un PIN valide";
61
	$l_error_label_num2 = "Ce n'est pas un nombre";
51
	$l_error_label_num2 = "Ce n'est pas un nombre";
62
	$l_error_label_num3 = "Le format n'est pas correct: +xxxYYYYYYYYY (xxx: code pays / YYYYYYYYY: numéro de téléphone)";
52
	$l_error_label_num3 = "Le format n'est pas correct: +xxxYYYYYYYYY (xxx: code pays / YYYYYYYYY: numéro de téléphone)";
63
	$l_error_writefail = "Gammu semble ne pas parvenir à discuter avec la clé (port ttyUSB0).";
53
	$l_error_writefail = "Le service semble ne pas parvenir à discuter avec la clé (port ttyUSB0).";
64
	$l_error_timeoutfail = "Impossible de se connecter à la clé 3G. Timeout.";
54
	$l_error_timeoutfail = "Impossible de se connecter à la clé 3G. Timeout.";
65
	$l_error_simfail = "Un problème au niveau de la carte SIM a été détecté. Est elle présente?";
55
	$l_error_simfail = "Un problème au niveau de la carte SIM a été détecté. Est elle présente?";
66
	$l_error_simsecu_l = "Attention, lors du dernier démarrage, votre code PIN était erroné.<br>
56
	$l_error_simsecu_l = "Attention, lors du dernier démarrage, votre code PIN était erroné.<br>
67
					La SIM doit être bloqué (code PUK). Consultez la documentation.";
57
					La SIM doit être bloqué (code PUK). Consultez la documentation.";
68
	$l_autorefresh = "Rafraichissement : 30 sec";
58
	$l_autorefresh = "Rafraichissement : 30 sec";
69
	$l_days = "jours ";
59
	$l_days = "jours ";
70
	
60
	
71
	$l_num_block="Liste des numéros bloqués";
61
	$l_num_block="Liste des numéros bloqués";
72
	$l_num_num="Numéro";
62
	$l_num_num="Numéro";
73
	$l_num_raison="Raison";
63
	$l_num_raison="Raison";
74
	$l_num_expiration="Date d'expiration";
64
	$l_num_expiration="Date d'expiration";
75
	$l_num_action="Action";
65
	$l_num_action="Action";
76
	$l_num_exist="Un compte a été créé";
66
	$l_num_exist="Un compte a été créé";
77
	$l_num_flood="Le nombre d'essais maximum a été dépacé";
67
	$l_num_flood="Le nombre d'essais maximum a été dépacé";
78
	$l_num_unlock="Effacer";
68
	$l_num_unlock="Effacer";
79
	$l_service_status_img_ok="Démarré";
69
	$l_service_status_img_ok="Démarré";
80
	$l_service_status_img_ko="Arrété";
70
	$l_service_status_img_ko="Arrété";
81
	
71
	
82
	$l_conf_name="Configuration : ";
72
	$l_conf_name="Configuration : ";
83
	$l_current_connect = "Connexion";
73
	$l_current_connect = "Connexion";
84
 
74
 
-
 
75
	$l_tab_first = "premier";
-
 
76
	$l_tab_last = "dernier";
-
 
77
	$l_tab_next = "suivant";
-
 
78
	$l_tab_prev = "précédent";
-
 
79
	$l_tab_search = "Recherche :";
-
 
80
	$l_tab_pmenu = "Affiche la page _PAGE_ sur _PAGES_";
-
 
81
	$l_tab_info = "Montrer _MENU_ résultat par page";
-
 
82
	$l_tab_infoempty = "Aucun résultat";
85
}
83
}
86
else {
84
else {
87
	$l_title = "Auto registration (SMS)";
85
	$l_title = "Auto registration (SMS)";
88
	$l_conf = "Configuration";
86
	$l_conf = "Configuration";
89
	$l_conf_actu = "Current configuration";
87
	$l_conf_actu = "Current configuration";
90
	$l_pin = "PIN password";
88
	$l_pin = "PIN password";
91
	$l_num_alcasar = "Phone number (3g key)";
89
	$l_num_alcasar = "Phone number (3g key)";
92
	$l_ban_temp = "Max number of try before a permanent ban"; 
90
	$l_ban_temp = "Max number of try before a permanent ban"; 
93
	$l_time_account = "Time for a new session";
91
	$l_time_account = "Time for a new session";
94
	$l_time_perm = "Duration of a ban (for example, after X try)";
92
	$l_time_perm = "Duration of a ban (for example, after X try)";
95
	$l_status_gammu = "Service status";
93
	$l_status_gammu = "Service status";
96
	$l_start = "Start";
94
	$l_start = "Start";
97
	$l_status_device = "Status of your device";
95
	$l_status_device = "Status of your device";
98
	$l_key_diseable = "Your 3g key is not connected";
96
	$l_key_diseable = "No device detected";
99
	$l_key_enable = "Your 3g key is connected";
97
	$l_key_enable = "Your 3g key is connected";
100
	$l_force_signal = "Signal strength";
98
	$l_force_signal = "Signal strength";
101
	$l_imei_device = "Device IMEI";
99
	$l_imei_device = "Device IMEI";
102
	$l_sms_received = "Number of SMS received";
100
	$l_sms_received = "Number of SMS received";
103
	$l_stop = "Stop";
101
	$l_stop = "Stop";
104
	$l_gammu_on="Gammu is running";
102
	$l_gammu_on="Gammu is running";
105
	$l_gammu_off="Gammu is down";
103
	$l_gammu_off="Gammu is down";
106
	$l_edit = "Edit";
104
	$l_edit = "Edit";
107
	$l_error_label_empty = "Field empty";
105
	$l_error_label_empty = "Field empty";
108
	$l_error_label_num = "It's not a valid PIN password";
106
	$l_error_label_num = "It's not a valid PIN password";
109
	$l_error_label_num2 = "It's not a number";
107
	$l_error_label_num2 = "It's not a number";
110
	$l_error_label_num3 = "The phone number is not good: +xxxYYYYYYYYY (xxx: code pays / YYYYYYYYY: numéro de téléphone)";
108
	$l_error_label_num3 = "The phone number is not good: +xxxYYYYYYYYY (xxx: code pays / YYYYYYYYY: numéro de téléphone)";
111
	$l_error_writefail = "Gammu semble ne pas parvenir à discuter avec la clé (port ttyUSB0).";
-
 
112
	$l_error_writefail = "Gammu can't listen the ttyUSB0 port.";
109
	$l_error_writefail = "Can not listen the ttyUSB0 port.";
113
	$l_error_timeoutfail = "Timeout. Can not connect to modem.";
110
	$l_error_timeoutfail = "Timeout. Can not connect to modem.";
114
	$l_error_simfail = "An issue with your Sim card was detected. Is it in the key?";
111
	$l_error_simfail = "An issue with your Sim card was detected. Is it in the key?";
115
	$l_error_simsecu_l = "Warning, during the last startup, the PIN code was wrong. <br>
112
	$l_error_simsecu_l = "Warning, during the last startup, the PIN code was wrong. <br>
116
				The Sim card must be blocked. Please read the documentation.";
113
				The Sim card must be blocked. Please read the documentation.";
117
	$l_autorefresh = "Refresh : 30 sec";
114
	$l_autorefresh = "Refresh : 30 sec";
118
	$l_days = "days ";
115
	$l_days = "days ";
119
	
116
	
120
	$l_num_block="List of blocked phone";
117
	$l_num_block="List of blocked phone";
121
	$l_num_num="Phone number";
118
	$l_num_num="Phone number";
122
	$l_num_raison="Reason";
119
	$l_num_raison="Reason";
123
	$l_num_expiration="Expiration date";
120
	$l_num_expiration="Expiration date";
124
	$l_num_action="Action";
121
	$l_num_action="Action";
125
	$l_num_exist="An account has been created";
122
	$l_num_exist="An account has been created";
126
	$l_num_flood="The number of try has been reached";
123
	$l_num_flood="The number of try has been reached";
127
	$l_num_unlock="Erase";
124
	$l_num_unlock="Erase";
128
	$l_service_status_img_ok="Running";
125
	$l_service_status_img_ok="Running";
129
	$l_service_status_img_ko="Stopped";
126
	$l_service_status_img_ko="Stopped";
130
	
127
	
131
	$l_conf_name="Configuration : ";
128
	$l_conf_name="Configuration : ";
132
	$l_current_connect = "Connection";
129
	$l_current_connect = "Connection";
-
 
130
	
-
 
131
	$l_tab_first = "first";
-
 
132
	$l_tab_last = "last";
-
 
133
	$l_tab_next = "next";
-
 
134
	$l_tab_prev = "previous";
-
 
135
	$l_tab_search = "Search :";
-
 
136
	$l_tab_pmenu = "Showing _PAGE_ to _PAGE_ of _PAGE_ entries :";
-
 
137
	$l_tab_info = "Show _MENU_ entries";
-
 
138
	$l_tab_infoempty = "No matching records found";
133
}
139
}
-
 
140
?>
-
 
141
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
 
142
<HTML><!-- written by Rexy -->
-
 
143
<head>
-
 
144
<META HTTP-EQUIV="Refresh" CONTENT="30">
-
 
145
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
-
 
146
<title>Auto enregistrement</title>
-
 
147
<link rel="stylesheet" href="/css/style.css">
-
 
148
<!-- DataTables CSS -->
-
 
149
<link rel="stylesheet" type="text/css" href="../../../css/jquery.dataTables.css">
-
 
150
<!-- jQuery -->
-
 
151
<script type="text/javascript" charset="utf8" src="../../../js/jquery.js"></script>
-
 
152
<!-- DataTables -->
-
 
153
<script type="text/javascript" charset="utf8" src="../../../js/jquery.dataTables.js"></script>
-
 
154
<script type="text/javascript">
-
 
155
$(document).ready( function () {
-
 
156
    $('#table_id').DataTable({
-
 
157
		"language": {
-
 
158
			"paginate": {
-
 
159
			"sFirst": "<?php echo $l_tab_dirst; ?>",
-
 
160
			"sLast": "<?php echo $l_tab_last; ?>",
-
 
161
			"sPrevious": "<?php echo $l_tab_prev; ?>",
-
 
162
			"sNext": "<?php echo $l_tab_next; ?>"
-
 
163
			},
-
 
164
            "lengthMenu": "<?php echo $l_tab_info; ?>",
-
 
165
            "zeroRecords": "<?php echo $l_tab_infoempty; ?>",
-
 
166
            "info": "<?php echo $l_tab_pmenu; ?>",
-
 
167
            "infoEmpty": "<?php echo $l_tab_infoempty; ?>",
-
 
168
			"sSearch": "<?php echo $l_tab_search; ?>"
-
 
169
        }
-
 
170
	});
-
 
171
} );
-
 
172
</script>
-
 
173
</head>
-
 
174
<body>
-
 
175
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
-
 
176
<?php
134
echo "
177
echo "
135
	<tr>
178
	<tr>
136
		<th>$l_title</th>
179
		<th>$l_title</th>
137
	</tr>
180
	</tr>
138
	<tr bgcolor=\"#FFCC66\">
181
	<tr bgcolor=\"#FFCC66\">
139
		<td><img src=\"/images/pix.gif\" width=\"1\" height=\"2\"></td>
182
		<td><img src=\"/images/pix.gif\" width=\"1\" height=\"2\"></td>
140
	</tr>
183
	</tr>
141
	</TABLE>
184
	</TABLE>
142
	<br />
185
	<br />
143
	$l_autorefresh	
186
	$l_autorefresh	
144
	";
187
	";
145
 
188
 
146
?>
189
?>
147
<center>
190
<center>
148
<br /><br />
191
<br /><br />
149
<table border=1 width=100%>
192
<table border=1 width=100%>
150
<tr>
193
<tr>
151
<td colspan=3><h3><?php echo $l_status_device ?></h3></td>
194
<td colspan=3><h3><?php echo $l_status_device ?></h3></td>
152
</tr>
195
</tr>
153
 
196
 
154
<tr>
197
<tr>
155
<?php
198
<?php
156
if(!empty($exec_com) || !empty($exec_com2))
199
if(!empty($exec_com) || !empty($exec_com2))
157
{
200
{
158
 
201
 
159
	if(isset($_GET['config_submit'])){
202
	if(isset($_GET['config_submit'])){
160
		switch ($_GET['config']) {
203
		switch ($_GET['config']) {
161
		case "at":
204
		case "at":
162
			exec("sudo $script --replace_connect  ");
205
			exec("sudo $script --replace_connect  ");
163
			break;
206
			break;
164
		case "9600":
207
		case "9600":
165
			exec("sudo $script --replace_connect 9600");
208
			exec("sudo $script --replace_connect 9600");
166
			break;
209
			break;
167
		case "19200":
210
		case "19200":
168
			exec("sudo $script --replace_connect 19200");
211
			exec("sudo $script --replace_connect 19200");
169
			break;
212
			break;
170
		case "115200":
213
		case "115200":
171
			exec("sudo $script --replace_connect 115200");
214
			exec("sudo $script --replace_connect 115200");
172
			break;
215
			break;
173
 
216
 
174
		}	
217
		}	
175
	}
218
	}
176
 
219
 
177
	$current_connect = exec("sudo $script --connect");
220
	$current_connect = exec("sudo $script --connect");
178
	
221
	
179
 
222
 
180
	echo '<td width="50%">'.$l_key_enable.'</td>';
223
	echo '<td width="50%">'.$l_key_enable.'</td>';
181
	echo '<td width="20%">'.$l_current_connect.' : '.$current_connect.'</td>';
224
	echo '<td width="20%">'.$l_current_connect.' : '.$current_connect.'</td>';
182
	echo '	<form form="GET" action="./autoregistration.php">
225
	echo '	<form form="GET" action="./autoregistration.php">
183
			<td align="right">	'.$l_conf_name.'
226
			<td align="right">	'.$l_conf_name.'
184
				<select name="config">
227
				<select name="config">
185
					<option value="at">at</option>
228
					<option value="at">at</option>
186
					<option value="9600">at9600</option>
229
					<option value="9600">at9600</option>
187
					<option value="19200">at19200</option>
230
					<option value="19200">at19200</option>
188
					<option value="115200">at115200</option>
231
					<option value="115200">at115200</option>
189
				</select>
232
				</select>
190
				<input type="submit" name="config_submit"></submit> 
233
				<input type="submit" name="config_submit"></submit> 
191
			</td>
234
			</td>
192
		</form>
235
		</form>
193
		';
236
		';
194
 
237
 
195
	$status_key="true";
238
	$status_key="true";
196
}
239
}
197
else
240
else
198
{
241
{
199
	echo "<td>$l_key_diseable</td>";
242
	echo "<td>$l_key_diseable</td>";
200
	$status_key="false";
243
	$status_key="false";
201
}
244
}
202
?>
245
?>
203
</tr>
246
</tr>
204
</table>
247
</table>
205
</center>
248
</center>
206
<br /><br />
249
<br /><br />
207
 
250
 
208
<?php
251
<?php
209
 
252
 
210
#Test si gammu est lancé
253
#Test si gammu est lancé
211
$gammu_pid=exec("sudo /sbin/pidof gammu-smsd");
254
$gammu_pid=exec("sudo /sbin/pidof gammu-smsd");
212
 
255
 
213
 
256
 
214
if ($status_key=="false")
257
if ($status_key=="false")
215
{
258
{
216
	if ($gammu_pid!="")
259
	if ($gammu_pid!="")
217
	{
260
	{
218
		exec("sudo $script stop");
261
		exec("sudo $script stop");
219
		sleep(8);
262
		sleep(8);
220
		header('Location: autoregistration.php');	
263
		header('Location: autoregistration.php');	
221
	}
264
	}
222
}
265
}
223
 
266
 
224
if ($status_key=="true")
267
if ($status_key=="true")
225
{
268
{
226
	#Nom du fichier de log lorsque gammu est démarré
269
	#Nom du fichier de log lorsque gammu est démarré
227
	$file_log = "gammu-smsd.log";
270
	#$file_log = "gammu-smsd.log";
228
 
271
 
229
	#Recuperation du code PIN actuel
272
	#Recuperation du code PIN actuel
230
	$current_pin = exec("sudo $script --pin");	
273
	$current_pin = exec("sudo $script --pin");	
231
	
274
	
232
	#Recuperation du nombre de try avant le ban perm
275
	#Recuperation du nombre de try avant le ban perm
233
	$current_try_ban = exec("sudo $script --try_ban");	
276
	$current_try_ban = exec("sudo $script --try_ban");	
234
 
277
 
235
	#Recuperation de la durée d'une session créée
278
	#Recuperation de la durée d'une session créée
236
	$current_time_account = exec("sudo $script --time_account");	
279
	$current_time_account = exec("sudo $script --time_account");	
237
 
280
 
238
	#Recuperation de la durée dun ban perm (après flood)
281
	#Recuperation de la durée dun ban perm (après flood)
239
	$current_time_perm = exec("sudo $script --time_perm");	
282
	$current_time_perm = exec("sudo $script --time_perm");	
240
 
283
 
241
	#Recuperation de l'adresse du log
-
 
242
	$current_log = exec("sudo $script --log");
-
 
243
 
-
 
244
	#Detection neméro de tel
284
	#Detection neméro de tel
245
	$current_num_alcasar = exec("sudo $script --numero_alcasar");
285
	$current_num_alcasar = exec("sudo $script --numero_alcasar");
246
	
286
	
247
	#Detection problème avec la SIM
287
	#Detection problème avec la SIM
248
	$current_simfail = exec("sudo $script --last_nosim");
288
	$current_simfail = exec("sudo $script --last_nosim");
249
 
289
 
250
	#Recuperation de la dernière ligne de START
290
	#Recuperation de la dernière ligne de START
251
	$current_last_start = exec("sudo $script --last_start");
291
	$current_last_start = exec("sudo $script --last_start");
252
 
292
 
253
	#Recuperarion de la dernière ligne de STOP
293
	#Recuperarion de la dernière ligne de STOP
254
	$current_last_stop = exec("sudo $script --last_stop");
294
	$current_last_stop = exec("sudo $script --last_stop");
255
 
295
 
256
	#Recuperation de la dernière ligne de SECURITYERROR
296
	#Recuperation de la dernière ligne de SECURITYERROR
257
	$current_last_secu = exec("sudo $script --last_secu");
297
	$current_last_secu = exec("sudo $script --last_secu");
258
 
298
 
259
	#Recuperation de la dernière ligne de DEVICEWRITEERROR
299
	#Recuperation de la dernière ligne de DEVICEWRITEERROR
260
	$current_last_write = exec("sudo $script --last_writeerror");
300
	$current_last_write = exec("sudo $script --last_writeerror");
261
 
301
 
262
	#Recuperation de la dernière ligne de TIMEOUT
302
	#Recuperation de la dernière ligne de TIMEOUT
263
	$current_last_timeout = exec("sudo $script --last_timeout");
303
	$current_last_timeout = exec("sudo $script --last_timeout");
264
	
304
	
265
	# Test si le service est lancé
305
	# Test si le service est lancé
266
	if ($gammu_pid=="")
306
	if ($gammu_pid=="")
267
	{
307
	{
268
		$force_signal = "-";
308
		$force_signal = "-";
269
		$imei_device = "-";
309
		$imei_device = "-";
270
		$sms_received = "-";
310
		$sms_received = "-";
271
 
311
 
272
		$gammu="<td><img src=\"/images/state_error.gif\" width=\"15\" height=\"15\" alt=\"".$l_service_status_img_ko."\"></td><td>$l_gammu_off</td>";	
312
		$gammu="<td><img src=\"/images/state_error.gif\" width=\"15\" height=\"15\" alt=\"".$l_service_status_img_ko."\"></td><td>$l_gammu_off</td>";	
273
		$gammu_log="";
-
 
274
		$gammu_status_on="";
313
		$gammu_status_on="";
275
		$gammu_status_off="disabled";
314
		$gammu_status_off="disabled";
276
 
315
 
277
		if($current_last_secu!="")
316
		if($current_last_secu!="")
278
		{
317
		{
279
			if(($current_last_secu > $current_last_start) && ($current_last_secu < $current_last_stop))
318
			if(($current_last_secu > $current_last_start) && ($current_last_secu < $current_last_stop))
280
			{
319
			{
281
				$gammu_simsecu="<tr><td colspan=7><font color=red>$l_error_simsecu_l</font></td></tr>";	
320
				$gammu_simsecu="<tr><td colspan=7><font color=red>$l_error_simsecu_l</font></td></tr>";	
282
			}
321
			}
283
		}
322
		}
284
	} else {
323
	} else {
285
		# Recuperation de la force du signal et IMEI et nombre de sms reçu
324
		# Recuperation de la force du signal et IMEI et nombre de sms reçu
286
		$val_force_signal = exec("sudo $script --signal_device");
325
		$val_force_signal = exec("sudo $script --signal_device");
287
		$imei_device = exec("sudo $script --imei_device");
326
		$imei_device = exec("sudo $script --imei_device");
288
		$sms_received = exec("sudo $script --sms_received");
327
		$sms_received = exec("sudo $script --sms_received");
289
 
328
 
290
		if ($val_force_signal < 21) {
329
		if ($val_force_signal < 21) {
291
			$force_signal = "<img src=\"/images/signal_0.png\">  --  ".$val_force_signal." %";
330
			$force_signal = "<img src=\"/images/signal_0.png\">  --  ".$val_force_signal." %";
292
		} elseif ($val_force_signal < 41) {
331
		} elseif ($val_force_signal < 41) {
293
			$force_signal = "<img src=\"/images/signal_20.png\">  --  ".$val_force_signal." %";
332
			$force_signal = "<img src=\"/images/signal_20.png\">  --  ".$val_force_signal." %";
294
 
333
 
295
		} elseif ($val_force_signal < 61) {
334
		} elseif ($val_force_signal < 61) {
296
			$force_signal = "<img src=\"/images/signal_40.png\">  --  ".$val_force_signal." %";
335
			$force_signal = "<img src=\"/images/signal_40.png\">  --  ".$val_force_signal." %";
297
 
336
 
298
		} elseif ($val_force_signal < 81) {
337
		} elseif ($val_force_signal < 81) {
299
			$force_signal = "<img src=\"/images/signal_60.png\">  --  ".$val_force_signal." %";
338
			$force_signal = "<img src=\"/images/signal_60.png\">  --  ".$val_force_signal." %";
300
 
339
 
301
		} elseif ($val_force_signal < 101) {
340
		} elseif ($val_force_signal < 101) {
302
			$force_signal = "<img src=\"/images/signal_80.png\">  --  ".$val_force_signal." %";
341
			$force_signal = "<img src=\"/images/signal_80.png\">  --  ".$val_force_signal." %";
303
 
342
 
304
		}
343
		}
305
 
344
 
306
 
345
 
307
 
346
 
308
 
347
 
309
 
348
 
310
		$gammu="<td><img src=\"/images/state_ok.gif\" width=\"15\" height=\"15\" alt=\"".$l_service_status_img_ok."\"></td><td>$l_gammu_on</td>";	
349
		$gammu="<td><img src=\"/images/state_ok.gif\" width=\"15\" height=\"15\" alt=\"".$l_service_status_img_ok."\"></td><td>$l_gammu_on</td>";	
311
		$gammu_log="<tr><td colspan=7>$current_log</td></tr>";
-
 
312
		
350
				
313
		
351
		
314
		if($current_last_timeout!=""){
352
		if($current_last_timeout!=""){
315
			if(($current_last_timeout > $current_last_start) && ($current_last_timeout > $current_last_stop))
353
			if(($current_last_timeout > $current_last_start) && ($current_last_timeout > $current_last_stop))
316
			{
354
			{
317
				$gammu_timeout="<tr><td colspan=7><font color=red>$l_error_timeoutfail</font></td></tr>";	
355
				$gammu_timeout="<tr><td colspan=7><font color=red>$l_error_timeoutfail</font></td></tr>";	
318
			}
356
			}
319
		}
357
		}
320
		
358
		
321
		if($current_last_secu!="")
359
		if($current_last_secu!="")
322
		{
360
		{
323
			if(($current_last_secu > $current_last_start) && ($current_last_secu > $current_last_stop))
361
			if(($current_last_secu > $current_last_start) && ($current_last_secu > $current_last_stop))
324
			{
362
			{
325
				exec("sudo $script --stop");
363
				exec("sudo $script --stop");
326
			}
364
			}
327
		}
365
		}
328
		
366
		
329
		if($current_last_write!=""){
367
		if($current_last_write!=""){
330
			if(($current_last_write > $current_last_start) && ($current_last_write > $current_last_stop))
368
			if(($current_last_write > $current_last_start) && ($current_last_write > $current_last_stop))
331
			{
369
			{
332
				$gammu_writeerror="<tr><td colspan=7><font color=red>$l_error_writefail</font></td></tr>";	
370
				$gammu_writeerror="<tr><td colspan=7><font color=red>$l_error_writefail</font></td></tr>";	
333
			}
371
			}
334
		}
372
		}
335
		
373
		
336
		if($current_simfail!="")
374
		if($current_simfail!="")
337
		{
375
		{
338
			if(($current_simfail > $current_last_start) && ($current_simfail > $current_last_stop))
376
			if(($current_simfail > $current_last_start) && ($current_simfail > $current_last_stop))
339
			{
377
			{
340
				$gammu_simfail="<tr><td colspan=7><font color=red>$l_error_simfail</font></td></tr>";
378
				$gammu_simfail="<tr><td colspan=7><font color=red>$l_error_simfail</font></td></tr>";
341
			}
379
			}
342
		}
380
		}
343
		$gammu_status_on="disabled";
381
		$gammu_status_on="disabled";
344
		$gammu_status_off="";
382
		$gammu_status_off="";
345
	}
383
	}
346
 
384
 
347
 
385
 
348
	#Lancement et arret de gammu-smsd 3*7sec
386
	#Lancement et arret de gammu-smsd 3*7sec
349
	if(isset($_GET["start"])){
387
	if(isset($_GET["start"])){
350
		$gammu_1=exec("sudo $script --start");
388
		$gammu_1=exec("sudo $script --start");
351
		sleep(7);
389
		sleep(7);
352
		
390
		
353
		if($current_last_secu!="")
391
		if($current_last_secu!="")
354
		{
392
		{
355
			if(($current_last_secu > $current_last_start) && ($current_last_secu > $current_last_stop))
393
			if(($current_last_secu > $current_last_start) && ($current_last_secu > $current_last_stop))
356
			{
394
			{
357
				exec("sudo $script --stop");
395
				exec("sudo $script --stop");
358
			}
396
			}
359
		}
397
		}
360
		
398
		
361
		sleep(7);
399
		sleep(7);
362
		if($current_last_secu!="")
400
		if($current_last_secu!="")
363
		{
401
		{
364
			if(($current_last_secu > $current_last_start) && ($current_last_secu > $current_last_stop))
402
			if(($current_last_secu > $current_last_start) && ($current_last_secu > $current_last_stop))
365
			{
403
			{
366
				exec("sudo $script --stop");
404
				exec("sudo $script --stop");
367
			}
405
			}
368
		}
406
		}
369
		
407
		
370
		sleep(7);	
408
		sleep(7);	
371
		if($current_last_secu!="")
409
		if($current_last_secu!="")
372
		{
410
		{
373
			if(($current_last_secu > $current_last_start) && ($current_last_secu > $current_last_stop))
411
			if(($current_last_secu > $current_last_start) && ($current_last_secu > $current_last_stop))
374
			{
412
			{
375
				exec("sudo $script --stop");
413
				exec("sudo $script --stop");
376
			}
414
			}
377
		}
415
		}
378
		
416
		
379
		
417
		
380
		
418
		
381
		header('Location: autoregistration.php');
419
		header('Location: autoregistration.php');
382
	}
420
	}
383
 
421
 
384
	if(isset($_GET["stop"])){
422
	if(isset($_GET["stop"])){
385
		exec("sudo $script --stop");
423
		exec("sudo $script --stop");
386
		sleep(8);
424
		sleep(8);
387
		header('Location: autoregistration.php');
425
		header('Location: autoregistration.php');
388
	}
426
	}
389
 
427
 
390
 
428
 
391
	#Edition du NUMERO de telephone
429
	#Edition du NUMERO de telephone
392
	if(isset($_GET["b_num_alcasar"])){
430
	if(isset($_GET["b_num_alcasar"])){
393
		$num = $_GET["num_alcasar"];
431
		$num = $_GET["num_alcasar"];
394
		$error_num_alcasar = "";
432
		$error_num_alcasar = "";
395
		if($num !="")
433
		if($num !="")
396
		{
434
		{
397
			if(preg_match('#^\+#',$num))
435
			if(preg_match('#^\+#',$num))
398
			{
436
			{
399
				exec("sudo $script --replace_numero_alcasar  $num");
437
				exec("sudo $script --replace_numero_alcasar  $num");
400
				header('Location: autoregistration.php');
438
				header('Location: autoregistration.php');
401
			}
439
			}
402
			else
440
			else
403
			{
441
			{
404
				$error_num_alcasar=$l_error_label_num3;
442
				$error_num_alcasar=$l_error_label_num3;
405
			}
443
			}
406
		}
444
		}
407
		else
445
		else
408
		{
446
		{
409
			$error_num_alcasar=$l_error_label_empty;
447
			$error_num_alcasar=$l_error_label_empty;
410
		}
448
		}
411
	}
449
	}
412
	
450
	
413
	#Edition du code PIN
451
	#Edition du code PIN
414
	if(isset($_GET["b_pin"])){
452
	if(isset($_GET["b_pin"])){
415
		$pin = $_GET["pin"];
453
		$pin = $_GET["pin"];
416
		$error_pin = "";
454
		$error_pin = "";
417
		if($pin !="")
455
		if($pin !="")
418
		{
456
		{
419
			if(is_numeric($pin))
457
			if(is_numeric($pin))
420
			{
458
			{
421
				exec("sudo $script --replace_pin  $pin");
459
				exec("sudo $script --replace_pin  $pin");
422
				header('Location: autoregistration.php');
460
				header('Location: autoregistration.php');
423
			}
461
			}
424
			else
462
			else
425
			{
463
			{
426
				$error_pin=$l_error_label_num;			
464
				$error_pin=$l_error_label_num;			
427
			}
465
			}
428
		}
466
		}
429
		else
467
		else
430
		{
468
		{
431
			$error_pin=$l_error_label_empty;
469
			$error_pin=$l_error_label_empty;
432
		}
470
		}
433
	}
471
	}
434
	
472
	
435
	
473
	
436
	#Edition du nombre d'essais avant le ban perm
474
	#Edition du nombre d'essais avant le ban perm
437
	if(isset($_GET["b_ban_temp"])){
475
	if(isset($_GET["b_ban_temp"])){
438
		$nb_ban_temp = $_GET["nb_essais"];
476
		$nb_ban_temp = $_GET["nb_essais"];
439
		$error_nb_essais = "";
477
		$error_nb_essais = "";
440
		if($nb_ban_temp !="")
478
		if($nb_ban_temp !="")
441
		{
479
		{
442
			if(is_numeric($nb_ban_temp))
480
			if(is_numeric($nb_ban_temp))
443
			{
481
			{
444
				exec("sudo $script --replace_try_ban  $nb_ban_temp");
482
				exec("sudo $script --replace_try_ban  $nb_ban_temp");
445
				header('Location: autoregistration.php');
483
				header('Location: autoregistration.php');
446
			}
484
			}
447
			else
485
			else
448
			{
486
			{
449
				$error_nb_essais=$l_error_label_num2;			
487
				$error_nb_essais=$l_error_label_num2;			
450
			}
488
			}
451
		}
489
		}
452
		else
490
		else
453
		{
491
		{
454
			$error_nb_essais=$l_error_label_empty;
492
			$error_nb_essais=$l_error_label_empty;
455
		}
493
		}
456
	}
494
	}
457
 
495
 
458
 
496
 
459
	#Edition de la durée pour un compte créé
497
	#Edition de la durée pour un compte créé
460
	if(isset($_GET["b_time_account"])){
498
	if(isset($_GET["b_time_account"])){
461
		$time_account = $_GET["time_account"];
499
		$time_account = $_GET["time_account"];
462
		$error_time_account = "";
500
		$error_time_account = "";
463
		if($time_account !="")
501
		if($time_account !="")
464
		{
502
		{
465
			if(is_numeric($time_account))
503
			if(is_numeric($time_account))
466
			{
504
			{
467
				exec("sudo $script --replace_time_account  $time_account");
505
				exec("sudo $script --replace_time_account  $time_account");
468
				header('Location: autoregistration.php');
506
				header('Location: autoregistration.php');
469
			}
507
			}
470
			else
508
			else
471
			{
509
			{
472
				$error_time_account=$l_error_label_num2;
510
				$error_time_account=$l_error_label_num2;
473
			}
511
			}
474
		}
512
		}
475
		else
513
		else
476
		{
514
		{
477
			$error_time_account=$l_error_label_empty;
515
			$error_time_account=$l_error_label_empty;
478
		}
516
		}
479
	}
517
	}
480
 
518
 
481
	#Edition de la durée d'un ban perm (après flood)
519
	#Edition de la durée d'un ban perm (après flood)
482
	if(isset($_GET["b_time_perm"])){
520
	if(isset($_GET["b_time_perm"])){
483
		$time_perm = $_GET["time_perm"];
521
		$time_perm = $_GET["time_perm"];
484
		$error_time_perm = "";
522
		$error_time_perm = "";
485
		if($time_perm !="")
523
		if($time_perm !="")
486
		{
524
		{
487
			if(is_numeric($time_perm))
525
			if(is_numeric($time_perm))
488
			{
526
			{
489
				exec("sudo $script --replace_time_perm  $time_perm");
527
				exec("sudo $script --replace_time_perm  $time_perm");
490
				header('Location: autoregistration.php');
528
				header('Location: autoregistration.php');
491
			}
529
			}
492
			else
530
			else
493
			{
531
			{
494
				$error_time_perm=$l_error_label_num2;
532
				$error_time_perm=$l_error_label_num2;
495
			}
533
			}
496
		}
534
		}
497
		else
535
		else
498
		{
536
		{
499
			$error_time_perm=$l_error_label_empty;
537
			$error_time_perm=$l_error_label_empty;
500
		}
538
		}
501
	}
539
	}
502
 
540
 
503
	# Suppression d'un numero bloqué
541
	# Suppression d'un numero bloqué
504
	if(isset($_GET['num_select'])){
542
	if(isset($_GET['num_select'])){
505
		$numero=$_GET['num_select'];
543
		$numero=$_GET['num_select'];
506
 
544
 
507
		$add_mac=exec("sudo /usr/sbin/chilli_query list | grep $numero | cut -d ' ' -f1");
545
		$add_mac=exec("sudo /usr/sbin/chilli_query list | grep $numero | cut -d ' ' -f1");
508
		exec("sudo /usr/sbin/chilli_query logout $add_mac");
546
		exec("sudo /usr/sbin/chilli_query logout $add_mac");
509
 
547
 
510
		exec("sudo $script --unlock_num $numero");
548
		exec("sudo $script --unlock_num $numero");
511
		header('Location: autoregistration.php');
549
		header('Location: autoregistration.php');
512
	}
550
	}
513
 
551
 
514
 
552
 
515
 
553
 
516
	#Si une clé 3g est plugué
554
	#Si une clé 3g est plugué
517
	echo "<form action=\"autoregistration.php\" methode=\"GET\">
555
	echo "<form action=\"autoregistration.php\" methode=\"GET\">
518
			
556
			
519
		<table border=1>
557
		<table border=1>
520
		<tr>
558
		<tr>
521
		<td colspan=4><b>$l_status_gammu</b></td>
559
			<td colspan=4><b>$l_status_gammu</b></td>
522
		<td><b><center>$l_force_signal</center></b></td>
560
			<td><b><center>$l_force_signal</center></b></td>
523
		<td><b><center>$l_imei_device</center></b></td> 
561
			<td><b><center>$l_imei_device</center></b></td> 
524
		<td><b><center>$l_sms_received</center></b></td> 
562
			<td><b><center>$l_sms_received</center></b></td> 
525
		</tr>
563
		</tr>
526
		<tr>
564
		<tr>
527
		$gammu
565
			$gammu
528
		<td><button type=\"submit\" name=\"start\" $gammu_status_on>$l_start</button></td>		
566
			<td><button type=\"submit\" name=\"start\" $gammu_status_on>$l_start</button></td>		
529
		<td><button type=\"submit\" name=\"stop\" $gammu_status_off>$l_stop</button></td>
567
			<td><button type=\"submit\" name=\"stop\" $gammu_status_off>$l_stop</button></td>
530
		<td><center>$force_signal</center></td>
568
			<td><center>$force_signal</center></td>
531
		<td><center>$imei_device</center></td>
569
			<td><center>$imei_device</center></td>
532
		<td><center>$sms_received</center></td>
570
			<td><center>$sms_received</center></td>
533
		</tr>
571
		</tr>
534
		$gammu_log
-
 
535
		$gammu_puk
572
		$gammu_puk
536
		$gammu_simfail
573
		$gammu_simfail
537
		$gammu_simsecu
574
		$gammu_simsecu
538
		$gammu_timeout
575
		$gammu_timeout
539
		$gammu_writeerror
576
		$gammu_writeerror
540
		</table>
577
		</table>
541
	<br /><br />
578
	<br /><br />
542
		
579
		
543
		<table border=1>
580
		<table border=1>
544
		<tr>
581
		<tr>
545
		<td colspan=3><b>$l_conf</b></td>
582
		<td colspan=3><b>$l_conf</b></td>
546
		<td><b>$l_conf_actu</b></td>
583
		<td><b>$l_conf_actu</b></td>
547
		</tr>
584
		</tr>
548
		
585
		
549
		<tr>
586
		<tr>
550
		<td> $l_num_alcasar </td><td><input type=text name='num_alcasar' maxlength=\"20\"></td>
587
		<td> $l_num_alcasar </td><td><input type=text name='num_alcasar' maxlength=\"20\"></td>
551
		<td><button type=\"submit\" name=\"b_num_alcasar\" $gammu_status_on>$l_edit</button></td>
588
		<td><button type=\"submit\" name=\"b_num_alcasar\" $gammu_status_on>$l_edit</button></td>
552
		<td><center><font color=\"green\">$current_num_alcasar</font></center></td>
589
		<td><center><font color=\"green\">$current_num_alcasar</font></center></td>
553
		</tr>
590
		</tr>
554
		<tr><td colspan=\"4\"><font color=red><b>$error_num_alcasar</b></font></td></tr>
591
		<tr><td colspan=\"4\"><font color=red><b>$error_num_alcasar</b></font></td></tr>
555
		
592
		
556
		<tr>		
593
		<tr>		
557
		<td> $l_pin </td><td><input type=text name='pin' maxlength=\"8\"></td>
594
		<td> $l_pin </td><td><input type=text name='pin' maxlength=\"8\"></td>
558
		<td><button type=\"submit\" name=\"b_pin\" $gammu_status_on>$l_edit</button></td>
595
		<td><button type=\"submit\" name=\"b_pin\" $gammu_status_on>$l_edit</button></td>
559
		<td><center><font color=\"green\">$current_pin</font></center></td>
596
		<td><center><font color=\"green\">$current_pin</font></center></td>
560
		</tr>
597
		</tr>
561
		<tr><td colspan=\"4\"><font color=red><b>$error_pin</b></font></td></tr>
598
		<tr><td colspan=\"4\"><font color=red><b>$error_pin</b></font></td></tr>
562
 
599
 
563
		<td> $l_time_account </td><td><input type=text name='time_account'> $l_days </td>
600
		<td> $l_time_account </td><td><input type=text name='time_account'> $l_days </td>
564
		<td><button type=\"submit\" name=\"b_time_account\" $gammu_status_on>$l_edit</button></td>	
601
		<td><button type=\"submit\" name=\"b_time_account\" $gammu_status_on>$l_edit</button></td>	
565
		<td><center><font color=\"blue\">$current_time_account</font></center></td>
602
		<td><center><font color=\"blue\">$current_time_account</font></center></td>
566
		</tr>
603
		</tr>
567
		<tr><td colspan=\"4\"><font color=red><b>$error_time_account</b></font></td></tr>
604
		<tr><td colspan=\"4\"><font color=red><b>$error_time_account</b></font></td></tr>
568
		
605
		
569
		<tr>
606
		<tr>
570
		<td> $l_ban_temp </td><td><input type=text name='nb_essais'></td>	
607
		<td> $l_ban_temp </td><td><input type=text name='nb_essais'></td>	
571
		<td><button type=\"submit\" name=\"b_ban_temp\" $gammu_status_on>$l_edit</button></td>	
608
		<td><button type=\"submit\" name=\"b_ban_temp\" $gammu_status_on>$l_edit</button></td>	
572
		<td><center><font color=\"orange\">$current_try_ban</font></center></td>
609
		<td><center><font color=\"orange\">$current_try_ban</font></center></td>
573
		</tr>
610
		</tr>
574
		<tr><td colspan=\"4\"><font color=red><b>$error_nb_essais</b></font></td></tr>
611
		<tr><td colspan=\"4\"><font color=red><b>$error_nb_essais</b></font></td></tr>
575
		
612
		
576
		<tr>
613
		<tr>
577
		<td>$l_time_perm</td><td><input type=text name='time_perm'> $l_days</td>
614
		<td>$l_time_perm</td><td><input type=text name='time_perm'> $l_days</td>
578
		<td><button type=\"submit\" name=\"b_time_perm\" $gammu_status_on>$l_edit</button></td>	
615
		<td><button type=\"submit\" name=\"b_time_perm\" $gammu_status_on>$l_edit</button></td>	
579
		<td><center><font color=\"orange\">$current_time_perm</font></center></td>
616
		<td><center><font color=\"orange\">$current_time_perm</font></center></td>
580
		</tr>
617
		</tr>
581
		<tr><td colspan=\"4\"><font color=red><b>$error_time_perm</b></font></td></tr>
618
		<tr><td colspan=\"4\"><font color=red><b>$error_time_perm</b></font></td></tr>
582
		
619
		
583
		
620
		
584
		</tr>
621
		</tr>
585
		</table>
622
		</table>
586
		</form>";		
623
		</form>";		
587
	
624
	
588
	
625
	
589
	require('/etc/freeradius-web/config.php');
626
	require('/etc/freeradius-web/config.php');
590
 
627
 
591
	if (is_file("../../../pass/sql/drivers/$config[sql_type]/functions.php"))
628
	if (is_file("../../../pass/sql/drivers/$config[sql_type]/functions.php"))
592
		include_once("../../../pass/sql/drivers/$config[sql_type]/functions.php");
629
		include_once("../../../pass/sql/drivers/$config[sql_type]/functions.php");
593
	else{
630
	else{
594
		echo "<b>Could not include SQL library</b>\n";
631
		echo "<b>Could not include SQL library</b>\n";
595
		exit();
632
		exit();
596
	}
633
	}
597
 
634
 
598
 
635
 
599
	$con = mysqli_connect("$config[sql_server]","$config[sql_username]","$config[sql_password]","gammu");
636
	$con = mysqli_connect("$config[sql_server]","$config[sql_username]","$config[sql_password]","gammu");
600
 
637
 
601
	if(mysqli_connect_errno())
638
	if(mysqli_connect_errno())
602
	{
639
	{
603
		echo "Fail to connect to $config[sql_type]" . mysqli_connect_error();
640
		echo "Fail to connect to $config[sql_type]" . mysqli_connect_error();
604
	}
641
	}
605
 
642
 
606
	$result = mysqli_query($con, "SELECT * FROM SMS_ban_perm");
643
	$result = mysqli_query($con, "SELECT * FROM SMS_ban_perm");
607
 
644
 
-
 
645
?>
608
		echo "	<br />
646
	<table id="table_id" class="display">
609
			<table border =1>
647
		<thead>
610
			<tr>
648
			<tr>
-
 
649
				<th><b><font color="black"><?php echo $l_num_num; ?></font></b></th>
-
 
650
				<th><b><font color="black"><?php echo $l_num_raison; ?></font></b></th>
-
 
651
				<th><b><font color="black"><?php echo $l_num_expiration; ?></font></b></th>
611
		<td colspan=4><b>$l_num_block</b></td>
652
				<th><b><font color="black">Action</font></b></th>
612
 
-
 
613
			</tr>
653
			</tr>
614
			<tr>
654
		</thead>
615
			<td><b>$l_num_num</b></td>
655
		<tbody>
616
			<td><b>$l_num_raison</b></td>
-
 
617
			<td><b>$l_num_expiration</b></td>
-
 
618
			<td><b>$l_num_action</b></td>
-
 
619
			</tr>";
656
	<?php 
620
 
-
 
621
	while($row = mysqli_fetch_array($result))
657
	while($row = mysqli_fetch_array($result))
622
	{
658
	{
623
		echo "	
659
		echo "	
624
			<form action=\"autoregistration.php\" methode=\"POST\">
-
 
625
			<tr>
660
			<tr>
-
 
661
			<form action=\"autoregistration.php\" methode=\"POST\">
626
			<td>
662
			<td>
627
				<input type=\"hidden\" name=\"num_select\" value=\"" .$row['SenderNumber']."\">	
663
				<input type=\"hidden\" name=\"num_select\" value=\"" .$row['SenderNumber']."\">	
628
			" . $row['SenderNumber'] . "</td>";
664
				".$row['SenderNumber']."
-
 
665
			</td>";
629
		
666
		
630
		if($row['Perm']=='0')
667
		if($row['Perm']=='0')
631
		{
668
		{
632
			echo "<td>$l_num_exist</td>";
669
			echo "<td>$l_num_exist</td>";
633
		}
670
		}
634
		if($row['Perm']=='1')
671
		if($row['Perm']=='1')
635
		{
672
		{
636
			echo "<td>$l_num_flood</td>";
673
			echo "<td>$l_num_flood</td>";
637
		}
674
		}
638
		echo "	<td>" . $row['Expiration']. "</td>
675
		echo "	<td>" . $row['Expiration']. "</td>
639
			
-
 
640
			<td>
676
				<td>
641
			<input type='submit' value='".$l_num_unlock."'>
677
					<input type='submit' value='".$l_num_unlock."'>
642
			</td>
678
				</td>
643
			</form>	
679
				</form>
644
			</tr>";
680
			</tr>
-
 
681
			";
645
	}
682
	}
-
 
683
	?>
-
 
684
		</tbody>
646
	echo "</table>";
685
	</table>
647
 
686
<?php
648
	mysqli_close($con);
687
	mysqli_close($con);
649
	
-
 
650
	}
688
	}
651
	
-
 
652
?>
689
?>
653
 
-
 
654
</html>
690
</html>
655
 
691