19,6 → 19,7 |
$error_nb_essais = ""; |
$error_time_perm = ""; |
$error_num_alcasar = ""; |
$country_filter=""; |
|
# Choice of language |
$Language = 'en'; |
64,8 → 65,10 |
$l_num_expiration="Date d'expiration"; |
$l_num_action="Action"; |
$l_num_exist="Un compte a été créé"; |
$l_num_flood="Le nombre d'essais maximum a été dépacé"; |
$l_num_flood="Le nombre d'essais maximum a été dépassé"; |
$l_num_unlock="Effacer"; |
$l_country_enable="Activer"; |
$l_country_disable="Désactiver"; |
$l_service_status_img_ok="Démarré"; |
$l_service_status_img_ko="Arrété"; |
|
78,8 → 81,18 |
$l_tab_prev = "précédent"; |
$l_tab_search = "Recherche :"; |
$l_tab_pmenu = "Affiche la page _PAGE_ sur _PAGES_"; |
$l_tab_info = "Montrer _MENU_ résultat par page"; |
$l_tab_info = "Montrer _MENU_ résultats par page"; |
$l_tab_infoempty = "Aucun résultat"; |
|
$l_country_filter = "Filtrage en cours : "; |
$l_country_filtering = " Filtrage par pays"; |
$l_country_filtering_plus = " Filtrage par pays avancé"; |
$l_phone_ban = " Numéro de téléphone bloqués"; |
$l_country_france_ena = "Autorise les numéros français"; |
$l_country_ue_ena = "Autorise les numéros européens"; |
$l_country_all_ena = "Autorise tous les pays"; |
$l_country_advanced_ena = "Autorisation personnalisé"; |
$l_advance = "Avancé"; |
} |
else { |
$l_title = "Auto registration (SMS)"; |
122,6 → 135,8 |
$l_num_exist="An account has been created"; |
$l_num_flood="The number of try has been reached"; |
$l_num_unlock="Erase"; |
$l_country_enable="Enable"; |
$l_country_disable="Disable"; |
$l_service_status_img_ok="Running"; |
$l_service_status_img_ko="Stopped"; |
|
136,12 → 151,22 |
$l_tab_pmenu = "Showing _PAGE_ to _PAGE_ of _PAGE_ entries :"; |
$l_tab_info = "Show _MENU_ entries"; |
$l_tab_infoempty = "No matching records found"; |
|
$l_country_filter = "Current filtering : "; |
$l_country_filtering = " Country filtering"; |
$l_country_filtering_plus = " Country filtering advanced"; |
$l_phone_ban = " Phone Number banned"; |
$l_country_france_ena = "Authorize the french numbers"; |
$l_country_ue_ena = "Authorize european numbers"; |
$l_country_all_ena = "Authorize all countries"; |
$l_country_advanced_ena = "Advanced Authorization"; |
$l_advance = "Advanced"; |
} |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<HTML><!-- written by Rexy --> |
<head> |
<META HTTP-EQUIV="Refresh" CONTENT="30"> |
<!--<META HTTP-EQUIV="Refresh" CONTENT="30">--> |
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]"> |
<title>Auto enregistrement</title> |
<link rel="stylesheet" href="/css/style.css"> |
152,11 → 177,22 |
<!-- DataTables --> |
<script type="text/javascript" charset="utf8" src="../../../js/jquery.dataTables.js"></script> |
<script type="text/javascript"> |
function timedRefresh(timeoutPeriod) { |
var interval = setInterval(refreshPage, timeoutPeriod); |
} |
|
function refreshPage() { |
if ($("input[name=autoRefreshCheckboxes]").is(":checked")) { |
location.reload(true); |
} |
} |
|
$(document).ready( function () { |
|
$('#table_id').DataTable({ |
"language": { |
"paginate": { |
"sFirst": "<?php echo $l_tab_dirst; ?>", |
"sFirst": "<?php echo $l_tab_first; ?>", |
"sLast": "<?php echo $l_tab_last; ?>", |
"sPrevious": "<?php echo $l_tab_prev; ?>", |
"sNext": "<?php echo $l_tab_next; ?>" |
168,10 → 204,43 |
"sSearch": "<?php echo $l_tab_search; ?>" |
} |
}); |
|
$('#table_country').DataTable({ |
"language": { |
"paginate": { |
"sFirst": "<?php echo $l_tab_first; ?>", |
"sLast": "<?php echo $l_tab_last; ?>", |
"sPrevious": "<?php echo $l_tab_prev; ?>", |
"sNext": "<?php echo $l_tab_next; ?>" |
}, |
"lengthMenu": "<?php echo $l_tab_info; ?>", |
"zeroRecords": "<?php echo $l_tab_infoempty; ?>", |
"info": "<?php echo $l_tab_pmenu; ?>", |
"infoEmpty": "<?php echo $l_tab_infoempty; ?>", |
"sSearch": "<?php echo $l_tab_search; ?>" |
} |
} ); |
|
$(".showhide-div_country").slideUp("slow"); |
$(".showhide-div_ban").slideUp("slow"); |
$(".showhide-div_country_plus").slideUp("slow"); |
|
$(".showhide-but_country").on("click", function(){ |
$(".showhide-div_country").slideToggle("slow"); |
}); |
|
$(".showhide-but_country_plus").on("click", function(){ |
$(".showhide-div_country_plus").slideToggle("slow"); |
}); |
|
$(".showhide-but_ban").on("click", function(){ |
$(".showhide-div_ban").slideToggle("slow"); |
}); |
|
} ); |
</script> |
</head> |
<body> |
<body onload="JavaScript:timedRefresh(30000);"> |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0"> |
<?php |
echo " |
183,7 → 252,7 |
</tr> |
</TABLE> |
<br /> |
$l_autorefresh |
<input type='checkbox' checked='checked' name='autoRefreshCheckboxes' >".$l_autorefresh."</input> |
"; |
|
?> |
549,8 → 618,44 |
header('Location: autoregistration.php'); |
} |
|
# Edition etat pays |
if(isset($_GET['country_select'])){ |
$country=utf8_decode($_GET['country_select']); |
exec("sudo $script --change_country $country"); |
exec("sudo $script --change_country_filter advance"); |
header('Location: autoregistration.php'); |
} |
|
if(isset($_GET['b_france_enable'])){ |
exec("sudo $script --change_country_dis_all"); |
exec("sudo $script --change_country France"); |
exec("sudo $script --change_country_filter fr"); |
header('Location: autoregistration.php'); |
} |
|
if(isset($_GET['b_ue_enable'])){ |
exec("sudo $script --change_country_dis_all"); |
$array_ue = array("Allemagne","Autriche","Belgique","Bulgarie","Chypre","Croatie","Danemark","Espagne","Estonie","Finlande","France","Grece","Hongrie","Irlande","Italie","Lettonie","Lituanie","Luxembourg","Malte","Pays-Bas"," Pologne","Portugal","Republique Tcheque","Roumanie","Angleterre","Slovaquie","Slovenie","Suede"); |
foreach ($array_ue as $pays){ |
exec("sudo $script --change_country $pays"); |
} |
|
exec("sudo $script --change_country_filter ue"); |
header('Location: autoregistration.php'); |
} |
|
if(isset($_GET["b_country_enable"])){ |
exec("sudo $script --change_country_ena_all"); |
exec("sudo $script --change_country_filter all"); |
header('Location: autoregistration.php'); |
} |
|
if(isset($_GET["b_country_disable"])){ |
exec("sudo $script --change_country_dis_all"); |
header('Location: autoregistration.php'); |
} |
|
|
#Si une clé 3g est plugué |
echo "<form action=\"autoregistration.php\" methode=\"GET\"> |
|
632,7 → 737,6 |
exit(); |
} |
|
|
$con = mysqli_connect("$config[sql_server]","$config[sql_username]","$config[sql_password]","gammu"); |
|
if(mysqli_connect_errno()) |
640,9 → 744,100 |
echo "Fail to connect to $config[sql_type]" . mysqli_connect_error(); |
} |
|
|
# Country table |
|
?> |
|
<div style="border-radius: 5px; background: #BDBDBD; margin-top: 15px;"> |
<span class="showhide-but_country"><?php echo "<strong>$l_country_filtering<strong>" ?><img src="/images/down2.gif" width="15" height="15"></span> |
|
<div class="showhide-div_country"> |
<br /> |
<table width=100% style="background: #BDBDBD;"> |
<tr> |
<?php |
$result_country_filter = mysqli_query($con, "SELECT id FROM SMS_country WHERE name = 'FILTRAGE'"); |
$row = mysqli_fetch_array($result_country_filter); |
|
if($row['id'] == "advance") { |
$country_filter = $l_country_advanced_ena; |
} elseif($row['id'] == "ue") { |
$country_filter = $l_country_ue_ena; |
} elseif($row['id'] == "fr") { |
$country_filter = $l_country_france_ena; |
} elseif($row['id'] == "all") { |
$country_filter = $l_country_all_ena; |
} else { |
$country_filter = "Err."; |
} |
?> |
<td colspan="3" align="center"><strong><?php echo $l_country_filter; ?></strong><font size="3" color="red"><?php echo $country_filter; ?></font></td> |
</tr> |
<tr> |
<form action="autoregistration.php" methode="POST"> |
<td align="center" width=33%><button type="submit" name="b_france_enable"><?php echo "$l_country_france_ena" ?></button></td> |
<td align="center" width=34%><button type="submit" name="b_ue_enable"><?php echo "$l_country_ue_ena" ?></button></td> |
<td align="center" width=33%><button type="submit" name="b_country_enable"><?php echo "$l_country_all_ena" ?></button></td> |
</form> |
</tr> |
</table> |
<div style="border-radius: 5px; background: #D8D8D8; margin: 15px;"> |
<span class="showhide-but_country_plus"><?php echo "<strong>$l_country_filtering_plus<strong>" ?> <img src="/images/down2.gif" width="15" height="15"></span> |
<div class="showhide-div_country_plus"> |
<table id="table_country" class="display"> |
<thead> |
<tr> |
<th><b><font color="black">Pays</font></b></th> |
<th><b><font color="black">code</font></b></th> |
<th><b><font color="black">Etat</font></b></th> |
</tr> |
</thead> |
<tbody> |
<?php |
|
$result_country = mysqli_query($con, "SELECT * FROM SMS_country WHERE name != 'FILTRAGE'"); |
while($row = mysqli_fetch_array($result_country)) |
{ |
echo " |
<tr> |
<form action=\"autoregistration.php\" methode=\"POST\"> |
<td> |
<input type=\"hidden\" name=\"country_select\" value=\"" .$row['name']."\"> |
".$row['name']." |
</td> |
<td>".$row['id']."</td> |
"; |
|
if($row['status']=='0') |
{ |
echo "<td><input type='image' src=\"/images/state_error.gif\" width=\"15\" height=\"15\"></td>"; |
} |
if($row['status']=='1') |
{ |
echo "<td><input type='image' src=\"/images/state_ok.gif\" width=\"15\" height=\"15\"></td>"; |
} |
echo " </form> |
</tr> |
"; |
} |
?> |
</tbody> |
</table> |
</div> |
</div> |
</div> |
</div> |
<?php |
$result = mysqli_query($con, "SELECT * FROM SMS_ban_perm"); |
|
?> |
|
<div style="border-radius: 5px; background: #BDBDBD; margin-top: 15px;"> |
<span class="showhide-but_ban"><?php echo "<strong>$l_phone_ban</strong>" ?><img src="/images/down2.gif" width="15" height="15"></span> |
|
<div class="showhide-div_ban"> |
|
<table id="table_id" class="display"> |
<thead> |
<tr> |
683,6 → 878,8 |
?> |
</tbody> |
</table> |
</div> |
</div> |
<?php |
mysqli_close($con); |
} |