Subversion Repositories ALCASAR

Rev

Rev 1349 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

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