Line 1... |
Line 1... |
1 |
<?php
|
1 |
<?php
|
2 |
# $Id: autoregistration.php 2185 2017-04-26 17:29:44Z tom.houdayer $
|
2 |
# $Id: autoregistration.php 2294 2017-06-20 16:45:48Z richard $
|
3 |
|
3 |
|
4 |
# Test présence de clé/modem
|
4 |
# Test if 3G/4G key is plugged
|
5 |
$exec_com=exec("lsusb | grep -i 067b | cut -d ' ' -f6 | cut -d ' ' -f1");
|
5 |
$exec_com=exec("lsusb | grep -i 067b: | cut -d ' ' -f6"); // converter "USB to UART" PL2303 (several USB-serial cables, Wavecom GSM Modem)
|
6 |
$exec_com2=exec("lsusb | grep -i 12d1 | cut -d ' ' -f6 | cut -d ' ' -f1");
|
6 |
$exec_com2=exec("lsusb | grep -i 12d1: | cut -d ' ' -f6"); // Huawei Technologies (E220/E230/E270/E870
|
7 |
|
- |
|
8 |
//$exec_com2=exec("lsusb | grep -i d-link | cut -d ' ' -f7");
|
7 |
//$exec_com2=exec("lsusb | grep -i 2001: | cut -d ' ' -f6"); // Dlink (to test)
|
9 |
|
8 |
|
10 |
$status_key="false";
|
9 |
$status_key="false";
|
11 |
$script="/usr/local/bin/alcasar-sms.sh";
|
10 |
$script="/usr/local/bin/alcasar-sms.sh";
|
12 |
|
11 |
|
13 |
#Define
|
12 |
#Define
|
Line 31... |
Line 30... |
31 |
if($Language == 'fr'){
|
30 |
if($Language == 'fr'){
|
32 |
$l_title = "Auto enregistrement (SMS)";
|
31 |
$l_title = "Auto enregistrement (SMS)";
|
33 |
$l_conf = "Configuration";
|
32 |
$l_conf = "Configuration";
|
34 |
$l_conf_actu = "Configuration actuelle";
|
33 |
$l_conf_actu = "Configuration actuelle";
|
35 |
$l_pin = "Code PIN";
|
34 |
$l_pin = "Code PIN";
|
36 |
$l_num_alcasar = "Le numero de téléphone de la clé 3G";
|
35 |
$l_num_alcasar = "Numero de téléphone du MODEM GSM";
|
37 |
$l_ban_temp = "Nombre d'essais avant le blocage";
|
36 |
$l_ban_temp = "Nombre d'essais avant le blocage";
|
38 |
$l_time_account = "Durée pour une session créée";
|
37 |
$l_time_account = "Durée pour une session créée";
|
39 |
$l_time_perm = "Durée du blocage (en jours)";
|
38 |
$l_time_perm = "Durée du blocage (en jours)";
|
40 |
$l_status_gammu = "Etat du service";
|
39 |
$l_status_gammu = "Etat du service";
|
41 |
$l_start = "Démarrer";
|
40 |
$l_start = "Démarrer";
|
42 |
$l_status_device = "Status de votre clé 3G";
|
41 |
$l_status_device = "Status de votre MODEM GSM (clé 2G/3G/4G)";
|
43 |
$l_key_diseable = "Aucun périphérique détecté";
|
42 |
$l_key_diseable = "Aucun périphérique détecté";
|
44 |
$l_key_enable = "Votre clé est connectée";
|
43 |
$l_key_enable = "Votre MODEM GSM est connectée à la vitesse de : ";
|
45 |
$l_force_signal = "Force du signal";
|
44 |
$l_force_signal = "Force du signal";
|
46 |
$l_imei_device = "IMEI du périphérique";
|
45 |
$l_imei_device = "IMEI du périphérique";
|
47 |
$l_sms_received = "Nombre de SMS reçu";
|
46 |
$l_sms_received = "Nombre de SMS reçu";
|
48 |
$l_stop = "Arrêter";
|
47 |
$l_stop = "Arrêter";
|
49 |
$l_gammu_on="Gammu est lancé";
|
48 |
$l_gammu_on="Le service est démarré";
|
50 |
$l_gammu_off="Gammu est arrêté";
|
49 |
$l_gammu_off="Le service est arrêté";
|
51 |
$l_edit = "Editer";
|
50 |
$l_edit = "Modifier";
|
52 |
$l_error_label_empty = "Le champ est vide";
|
51 |
$l_error_label_empty = "Le champ est vide";
|
53 |
$l_error_label_num = "Ce n'est pas un PIN valide";
|
52 |
$l_error_label_num = "Ce n'est pas un PIN valide";
|
54 |
$l_error_label_num2 = "Ce n'est pas un nombre";
|
53 |
$l_error_label_num2 = "Ce n'est pas un nombre";
|
55 |
$l_error_label_num3 = "Le format n'est pas correct: +xxxYYYYYYYYY (xxx: code pays / YYYYYYYYY: numéro de téléphone)";
|
54 |
$l_error_label_num3 = "Le format n'est pas correct: +xxxYYYYYYYYY (xxx: code pays / YYYYYYYYY: numéro de téléphone)";
|
56 |
$l_error_writefail = "Le service semble ne pas parvenir à discuter avec la clé (port ttyUSB0).";
|
55 |
$l_error_writefail = "Le service ne parvient pas à discuter avec le port du MODEM GSM (ttyUSB0).";
|
57 |
$l_error_timeoutfail = "Impossible de se connecter à la clé 3G. Timeout.";
|
56 |
$l_error_timeoutfail = "Impossible de se connecter au MODEM GSM (vérifiez la vitesse de connexion)";
|
58 |
$l_error_simfail = "Un problème au niveau de la carte SIM a été détecté. Est elle présente?";
|
57 |
$l_error_simfail = "Un problème au niveau de la carte SIM a été détecté. Est elle présente?";
|
59 |
$l_error_simsecu_l = "Attention, lors du dernier démarrage, votre code PIN était erroné.<br>
|
58 |
$l_error_simsecu_l = "Attention, lors du dernier démarrage, votre code PIN était erroné.<br>
|
60 |
La SIM doit être bloqué (code PUK). Consultez la documentation.";
|
59 |
La SIM doit être bloqué (code PUK). Consultez la documentation.";
|
61 |
$l_autorefresh = "Rafraichissement : 30 sec";
|
60 |
$l_autorefresh = "Rafraichissement : 30 sec";
|
62 |
$l_days = "jours ";
|
61 |
$l_days = "jours ";
|
63 |
|
- |
|
64 |
$l_num_block="Liste des numéros bloqués";
|
62 |
$l_num_block="Liste des numéros bloqués";
|
65 |
$l_num_num="Numéro";
|
63 |
$l_num_num="Numéro";
|
66 |
$l_num_raison="Raison";
|
64 |
$l_num_raison="Raison";
|
67 |
$l_num_expiration="Date d'expiration";
|
65 |
$l_num_expiration="Date d'expiration";
|
68 |
$l_num_action="Action";
|
66 |
$l_num_action="Action";
|
Line 71... |
Line 69... |
71 |
$l_num_unlock="Effacer";
|
69 |
$l_num_unlock="Effacer";
|
72 |
$l_country_enable="Activer";
|
70 |
$l_country_enable="Activer";
|
73 |
$l_country_disable="Désactiver";
|
71 |
$l_country_disable="Désactiver";
|
74 |
$l_service_status_img_ok="Démarré";
|
72 |
$l_service_status_img_ok="Démarré";
|
75 |
$l_service_status_img_ko="Arrété";
|
73 |
$l_service_status_img_ko="Arrété";
|
76 |
|
- |
|
77 |
$l_conf_name="Configuration : ";
|
74 |
$l_conf_name="Modifier la vitesse de connexion : ";
|
78 |
$l_current_connect = "Connexion";
|
- |
|
79 |
|
- |
|
80 |
$l_tab_first = "premier";
|
75 |
$l_tab_first = "premier";
|
81 |
$l_tab_last = "dernier";
|
76 |
$l_tab_last = "dernier";
|
82 |
$l_tab_next = "suivant";
|
77 |
$l_tab_next = "suivant";
|
83 |
$l_tab_prev = "précédent";
|
78 |
$l_tab_prev = "précédent";
|
84 |
$l_tab_search = "Recherche :";
|
79 |
$l_tab_search = "Recherche :";
|
85 |
$l_tab_pmenu = "Affiche la page _PAGE_ sur _PAGES_";
|
80 |
$l_tab_pmenu = "Affiche la page _PAGE_ sur _PAGES_";
|
86 |
$l_tab_info = "Montrer _MENU_ résultats par page";
|
81 |
$l_tab_info = "Montrer _MENU_ résultats par page";
|
87 |
$l_tab_infoempty = "Aucun résultat";
|
82 |
$l_tab_infoempty = "Aucun résultat";
|
88 |
|
- |
|
89 |
$l_country_filter = "Filtrage en cours : ";
|
83 |
$l_country_filter = "Filtrage en cours : ";
|
90 |
$l_country_filtering = " Filtrage par pays";
|
84 |
$l_country_filtering = " Filtrage par pays";
|
91 |
$l_country_filtering_plus = " Filtrage par pays avancé";
|
85 |
$l_country_filtering_plus = " Filtrage par pays avancé";
|
92 |
$l_phone_ban = " Numéro de téléphone bloqués";
|
86 |
$l_phone_ban = " Numéro de téléphone bloqués";
|
93 |
$l_country_france_ena = "Autorise les numéros français";
|
87 |
$l_country_france_ena = "Autorise les numéros français";
|
Line 99... |
Line 93... |
99 |
else {
|
93 |
else {
|
100 |
$l_title = "Auto registration (SMS)";
|
94 |
$l_title = "Auto registration (SMS)";
|
101 |
$l_conf = "Configuration";
|
95 |
$l_conf = "Configuration";
|
102 |
$l_conf_actu = "Current configuration";
|
96 |
$l_conf_actu = "Current configuration";
|
103 |
$l_pin = "PIN password";
|
97 |
$l_pin = "PIN password";
|
104 |
$l_num_alcasar = "Phone number (3G key)";
|
98 |
$l_num_alcasar = "Phone number of the GSM MODEM";
|
105 |
$l_ban_temp = "Max number of try before a permanent ban";
|
99 |
$l_ban_temp = "Max number of try before a permanent ban";
|
106 |
$l_time_account = "Time for a new session";
|
100 |
$l_time_account = "Time for a new session";
|
107 |
$l_time_perm = "Duration of a ban (for example, after X try)";
|
101 |
$l_time_perm = "Duration of a ban (for example, after X try)";
|
108 |
$l_status_gammu = "Service status";
|
102 |
$l_status_gammu = "Service status";
|
109 |
$l_start = "Start";
|
103 |
$l_start = "Start";
|
110 |
$l_status_device = "Status of your 3G key";
|
104 |
$l_status_device = "Status of your GSM MODEM (2G/3G/4G key)";
|
111 |
$l_key_diseable = "No device detected";
|
105 |
$l_key_diseable = "No device detected";
|
112 |
$l_key_enable = "Your 3g key is connected";
|
106 |
$l_key_enable = "Your GSM MODEM is connected at the speed of : ";
|
113 |
$l_force_signal = "Signal strength";
|
107 |
$l_force_signal = "Signal strength";
|
114 |
$l_imei_device = "Device IMEI";
|
108 |
$l_imei_device = "Device IMEI";
|
115 |
$l_sms_received = "Number of SMS received";
|
109 |
$l_sms_received = "Number of SMS received";
|
116 |
$l_stop = "Stop";
|
110 |
$l_stop = "Stop";
|
117 |
$l_gammu_on="Gammu is running";
|
111 |
$l_gammu_on="The service is running";
|
118 |
$l_gammu_off="Gammu is down";
|
112 |
$l_gammu_off="The service is down";
|
119 |
$l_edit = "Edit";
|
113 |
$l_edit = "Modify";
|
120 |
$l_error_label_empty = "Field empty";
|
114 |
$l_error_label_empty = "Field empty";
|
121 |
$l_error_label_num = "It's not a valid PIN password";
|
115 |
$l_error_label_num = "It's not a valid PIN password";
|
122 |
$l_error_label_num2 = "It's not a number";
|
116 |
$l_error_label_num2 = "It's not a number";
|
123 |
$l_error_label_num3 = "The phone number is not good: +xxxYYYYYYYYY (xxx: code pays / YYYYYYYYY: numéro de téléphone)";
|
117 |
$l_error_label_num3 = "The phone number is not good: +xxxYYYYYYYYY (xxx: code pays / YYYYYYYYY: numéro de téléphone)";
|
124 |
$l_error_writefail = "Can not listen the ttyUSB0 port.";
|
118 |
$l_error_writefail = "Can not communicate with the GSM MODEM port (ttyUSB0).";
|
125 |
$l_error_timeoutfail = "Timeout. Can not connect to modem.";
|
119 |
$l_error_timeoutfail = "Can not connect to the GSM MODEM (verify the connection speed).";
|
126 |
$l_error_simfail = "An issue with your Sim card was detected. Is it in the key?";
|
120 |
$l_error_simfail = "An issue with your Sim card was detected. Is it in the key?";
|
127 |
$l_error_simsecu_l = "Warning, during the last startup, the PIN code was wrong. <br>
|
121 |
$l_error_simsecu_l = "Warning, during the last startup, the PIN code was wrong. <br>
|
128 |
The Sim card must be blocked. Please read the documentation.";
|
122 |
The Sim card must be blocked. Please read the documentation.";
|
129 |
$l_autorefresh = "Refresh : 30 sec";
|
123 |
$l_autorefresh = "Refresh : 30 sec";
|
130 |
$l_days = "days ";
|
124 |
$l_days = "days ";
|
131 |
|
- |
|
132 |
$l_num_block="List of blocked phone";
|
125 |
$l_num_block="List of blocked phone";
|
133 |
$l_num_num="Phone number";
|
126 |
$l_num_num="Phone number";
|
134 |
$l_num_raison="Reason";
|
127 |
$l_num_raison="Reason";
|
135 |
$l_num_expiration="Expiration date";
|
128 |
$l_num_expiration="Expiration date";
|
136 |
$l_num_action="Action";
|
129 |
$l_num_action="Action";
|
Line 139... |
Line 132... |
139 |
$l_num_unlock="Erase";
|
132 |
$l_num_unlock="Erase";
|
140 |
$l_country_enable="Enable";
|
133 |
$l_country_enable="Enable";
|
141 |
$l_country_disable="Disable";
|
134 |
$l_country_disable="Disable";
|
142 |
$l_service_status_img_ok="Running";
|
135 |
$l_service_status_img_ok="Running";
|
143 |
$l_service_status_img_ko="Stopped";
|
136 |
$l_service_status_img_ko="Stopped";
|
144 |
|
- |
|
145 |
$l_conf_name="Configuration : ";
|
137 |
$l_conf_name="Modify the speed : ";
|
146 |
$l_current_connect = "Connection";
|
- |
|
147 |
|
- |
|
148 |
$l_tab_first = "first";
|
138 |
$l_tab_first = "first";
|
149 |
$l_tab_last = "last";
|
139 |
$l_tab_last = "last";
|
150 |
$l_tab_next = "next";
|
140 |
$l_tab_next = "next";
|
151 |
$l_tab_prev = "previous";
|
141 |
$l_tab_prev = "previous";
|
152 |
$l_tab_search = "Search :";
|
142 |
$l_tab_search = "Search :";
|
153 |
$l_tab_pmenu = "Showing _PAGE_ to _PAGE_ of _PAGE_ entries :";
|
143 |
$l_tab_pmenu = "Showing _PAGE_ to _PAGE_ of _PAGE_ entries :";
|
154 |
$l_tab_info = "Show _MENU_ entries";
|
144 |
$l_tab_info = "Show _MENU_ entries";
|
155 |
$l_tab_infoempty = "No matching records found";
|
145 |
$l_tab_infoempty = "No matching records found";
|
156 |
|
- |
|
157 |
$l_country_filter = "Current filtering : ";
|
146 |
$l_country_filter = "Current filtering : ";
|
158 |
$l_country_filtering = " Country filtering";
|
147 |
$l_country_filtering = " Country filtering";
|
159 |
$l_country_filtering_plus = " Country filtering advanced";
|
148 |
$l_country_filtering_plus = " Country filtering advanced";
|
160 |
$l_phone_ban = " Phone Number banned";
|
149 |
$l_phone_ban = " Phone Number banned";
|
161 |
$l_country_france_ena = "Authorize the french numbers";
|
150 |
$l_country_france_ena = "Authorize the french numbers";
|
Line 171... |
Line 160... |
171 |
<!--<META HTTP-EQUIV="Refresh" CONTENT="30">-->
|
160 |
<!--<META HTTP-EQUIV="Refresh" CONTENT="30">-->
|
172 |
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
|
161 |
<meta http-equiv="Content-Type" content="text/html; charset=$config[general_charset]">
|
173 |
<title>Auto enregistrement</title>
|
162 |
<title>Auto enregistrement</title>
|
174 |
<link rel="stylesheet" href="/css/style.css">
|
163 |
<link rel="stylesheet" href="/css/style.css">
|
175 |
<!-- DataTables CSS -->
|
164 |
<!-- DataTables CSS -->
|
176 |
<link rel="stylesheet" type="text/css" href="../../../css/jquery.dataTables.css">
|
165 |
<link rel="stylesheet" type="text/css" href="/css/jquery.dataTables.css">
|
177 |
<!-- jQuery -->
|
166 |
<!-- jQuery -->
|
178 |
<script type="text/javascript" charset="utf8" src="../../../js/jquery.js"></script>
|
167 |
<script type="text/javascript" charset="utf8" src="/js/jquery.js"></script>
|
179 |
<!-- DataTables -->
|
168 |
<!-- DataTables -->
|
180 |
<script type="text/javascript" charset="utf8" src="../../../js/jquery.dataTables.js"></script>
|
169 |
<script type="text/javascript" charset="utf8" src="/js/jquery.dataTables.js"></script>
|
181 |
<script type="text/javascript">
|
170 |
<script type="text/javascript">
|
182 |
function timedRefresh(timeoutPeriod) {
|
171 |
function timedRefresh(timeoutPeriod) {
|
183 |
var interval = setInterval(refreshPage, timeoutPeriod);
|
172 |
var interval = setInterval(refreshPage, timeoutPeriod);
|
184 |
}
|
173 |
}
|
185 |
|
174 |
|
Line 220... |
Line 209... |
220 |
"info": "<?php echo $l_tab_pmenu; ?>",
|
209 |
"info": "<?php echo $l_tab_pmenu; ?>",
|
221 |
"infoEmpty": "<?php echo $l_tab_infoempty; ?>",
|
210 |
"infoEmpty": "<?php echo $l_tab_infoempty; ?>",
|
222 |
"sSearch": "<?php echo $l_tab_search; ?>"
|
211 |
"sSearch": "<?php echo $l_tab_search; ?>"
|
223 |
}
|
212 |
}
|
224 |
});
|
213 |
});
|
225 |
|
- |
|
226 |
$(".showhide-div_country").slideUp("slow");
|
214 |
$(".showhide-div_country").slideUp("slow");
|
227 |
$(".showhide-div_ban").slideUp("slow");
|
215 |
$(".showhide-div_ban").slideUp("slow");
|
228 |
$(".showhide-div_country_plus").slideUp("slow");
|
216 |
$(".showhide-div_country_plus").slideUp("slow");
|
229 |
|
- |
|
230 |
$(".showhide-but_country").on("click", function(){
|
217 |
$(".showhide-but_country").on("click", function(){
|
231 |
$(".showhide-div_country").slideToggle("slow");
|
218 |
$(".showhide-div_country").slideToggle("slow");
|
232 |
});
|
219 |
});
|
233 |
|
- |
|
234 |
$(".showhide-but_country_plus").on("click", function(){
|
220 |
$(".showhide-but_country_plus").on("click", function(){
|
235 |
$(".showhide-div_country_plus").slideToggle("slow");
|
221 |
$(".showhide-div_country_plus").slideToggle("slow");
|
236 |
});
|
222 |
});
|
237 |
|
- |
|
238 |
$(".showhide-but_ban").on("click", function(){
|
223 |
$(".showhide-but_ban").on("click", function(){
|
239 |
$(".showhide-div_ban").slideToggle("slow");
|
224 |
$(".showhide-div_ban").slideToggle("slow");
|
240 |
});
|
225 |
});
|
241 |
|
- |
|
242 |
} );
|
226 |
} );
|
243 |
</script>
|
227 |
</script>
|
244 |
</head>
|
228 |
</head>
|
245 |
<body onload="JavaScript:timedRefresh(30000);">
|
229 |
<body onload="JavaScript:timedRefresh(30000);">
|
246 |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
|
230 |
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
|
Line 252... |
Line 236... |
252 |
<tr bgcolor=\"#FFCC66\">
|
236 |
<tr bgcolor=\"#FFCC66\">
|
253 |
<td><img src=\"/images/pix.gif\" width=\"1\" height=\"2\"></td>
|
237 |
<td><img src=\"/images/pix.gif\" width=\"1\" height=\"2\"></td>
|
254 |
</tr>
|
238 |
</tr>
|
255 |
</TABLE>
|
239 |
</TABLE>
|
256 |
<br />
|
240 |
<br />
|
257 |
<input type='checkbox' checked='checked' name='autoRefreshCheckboxes' >".$l_autorefresh."</input>
|
241 |
<input type='checkbox' checked='checked' name='autoRefreshCheckboxes' >".$l_autorefresh."
|
258 |
";
|
242 |
";
|
259 |
|
- |
|
260 |
?>
|
243 |
?>
|
261 |
<center>
|
244 |
<center>
|
262 |
<br /><br />
|
245 |
<br /><br />
|
- |
|
246 |
<form form="GET" action="./autoregistration.php">
|
263 |
<table border=1 width=100%>
|
247 |
<table border=1 width=100%>
|
264 |
<tr>
|
248 |
<tr>
|
265 |
<td colspan=3><h3><?php echo $l_status_device ?></h3></td>
|
249 |
<td colspan=2><h3><?php echo $l_status_device ?></h3></td>
|
266 |
</tr>
|
250 |
</tr>
|
267 |
|
251 |
|
268 |
<tr>
|
252 |
<tr>
|
269 |
<?php
|
253 |
<?php
|
270 |
if(!empty($exec_com) || !empty($exec_com2))
|
254 |
if(!empty($exec_com) || !empty($exec_com2))
|
271 |
{
|
255 |
{
|
272 |
|
- |
|
273 |
if(isset($_GET['config_submit'])){
|
256 |
if(isset($_GET['config_submit'])){
|
274 |
switch ($_GET['config']) {
|
257 |
switch ($_GET['config']) {
|
275 |
case "at":
|
258 |
case "at":
|
276 |
exec("sudo $script --replace_connect ");
|
259 |
exec("sudo $script --replace_connect ");
|
277 |
break;
|
260 |
break;
|
Line 282... |
Line 265... |
282 |
exec("sudo $script --replace_connect 19200");
|
265 |
exec("sudo $script --replace_connect 19200");
|
283 |
break;
|
266 |
break;
|
284 |
case "115200":
|
267 |
case "115200":
|
285 |
exec("sudo $script --replace_connect 115200");
|
268 |
exec("sudo $script --replace_connect 115200");
|
286 |
break;
|
269 |
break;
|
287 |
|
- |
|
288 |
}
|
270 |
}
|
289 |
}
|
271 |
}
|
290 |
|
- |
|
291 |
$current_connect = exec("sudo $script --connect");
|
272 |
$current_connect = exec("sudo $script --connect");
|
292 |
|
- |
|
293 |
|
- |
|
294 |
echo '<td width="50%">'.$l_key_enable.'</td>';
|
- |
|
295 |
echo '<td width="20%">'.$l_current_connect.' : '.$current_connect.'</td>';
|
273 |
echo '<td width="50%">'.$l_key_enable.$current_connect.' Bauds</td>';
|
296 |
echo ' <form form="GET" action="./autoregistration.php">
|
- |
|
297 |
<td align="right"> '.$l_conf_name.'
|
274 |
echo ' <td align="right"> '.$l_conf_name.'
|
298 |
<select name="config">
|
275 |
<select name="config">
|
299 |
<option value="at">at</option>
|
276 |
<option value="at"></option>
|
300 |
<option value="9600">at9600</option>
|
277 |
<option value="9600">9600 Bauds</option>
|
301 |
<option value="19200">at19200</option>
|
278 |
<option value="19200">19200 Bauds</option>
|
302 |
<option value="115200">at115200</option>
|
279 |
<option value="115200">115200 Bauds</option>
|
303 |
</select>
|
280 |
</select>
|
304 |
<input type="submit" name="config_submit"></submit>
|
281 |
<input type="submit" name="config_submit">
|
305 |
</td>
|
282 |
</td>
|
306 |
</form>
|
- |
|
307 |
';
|
283 |
';
|
308 |
|
- |
|
309 |
$status_key="true";
|
284 |
$status_key="true";
|
310 |
}
|
285 |
}
|
311 |
else
|
286 |
else
|
312 |
{
|
287 |
{
|
313 |
echo "<td>$l_key_diseable</td>";
|
288 |
echo "<td>$l_key_diseable</td>";
|
314 |
$status_key="false";
|
289 |
$status_key="false";
|
315 |
}
|
290 |
}
|
316 |
?>
|
291 |
?>
|
317 |
</tr>
|
292 |
</tr>
|
318 |
</table>
|
293 |
</table>
|
- |
|
294 |
</form>
|
319 |
</center>
|
295 |
</center>
|
320 |
<br /><br />
|
296 |
<br /><br />
|
321 |
|
297 |
|
322 |
<?php
|
298 |
<?php
|
323 |
|
299 |
|
324 |
#Test si gammu est lancé
|
300 |
#Test if gammu is started
|
325 |
$gammu_pid=exec("sudo $script --pidof");
|
301 |
$gammu_pid=exec("sudo $script --pidof");
|
326 |
|
- |
|
327 |
|
- |
|
328 |
if ($status_key=="false")
|
302 |
if ($status_key=="false")
|
329 |
{
|
303 |
{
|
330 |
if ($gammu_pid!="")
|
304 |
if ($gammu_pid!="")
|
331 |
{
|
305 |
{
|
332 |
exec("sudo $script stop");
|
306 |
exec("sudo $script stop");
|
Line 702... |
Line 676... |
702 |
<td><button type=\"submit\" name=\"b_pin\" $gammu_status_on>$l_edit</button></td>
|
676 |
<td><button type=\"submit\" name=\"b_pin\" $gammu_status_on>$l_edit</button></td>
|
703 |
<td><center><font color=\"green\">$current_pin</font></center></td>
|
677 |
<td><center><font color=\"green\">$current_pin</font></center></td>
|
704 |
</tr>
|
678 |
</tr>
|
705 |
<tr><td colspan=\"4\"><font color=red><b>$error_pin</b></font></td></tr>
|
679 |
<tr><td colspan=\"4\"><font color=red><b>$error_pin</b></font></td></tr>
|
706 |
|
680 |
|
- |
|
681 |
<tr>
|
707 |
<td> $l_time_account </td><td><input type=text name='time_account'> $l_days </td>
|
682 |
<td> $l_time_account </td><td><input type=text name='time_account'> $l_days </td>
|
708 |
<td><button type=\"submit\" name=\"b_time_account\" $gammu_status_on>$l_edit</button></td>
|
683 |
<td><button type=\"submit\" name=\"b_time_account\" $gammu_status_on>$l_edit</button></td>
|
709 |
<td><center><font color=\"blue\">$current_time_account</font></center></td>
|
684 |
<td><center><font color=\"blue\">$current_time_account</font></center></td>
|
710 |
</tr>
|
685 |
</tr>
|
711 |
<tr><td colspan=\"4\"><font color=red><b>$error_time_account</b></font></td></tr>
|
686 |
<tr><td colspan=\"4\"><font color=red><b>$error_time_account</b></font></td></tr>
|
Line 721... |
Line 696... |
721 |
<td>$l_time_perm</td><td><input type=text name='time_perm'> $l_days</td>
|
696 |
<td>$l_time_perm</td><td><input type=text name='time_perm'> $l_days</td>
|
722 |
<td><button type=\"submit\" name=\"b_time_perm\" $gammu_status_on>$l_edit</button></td>
|
697 |
<td><button type=\"submit\" name=\"b_time_perm\" $gammu_status_on>$l_edit</button></td>
|
723 |
<td><center><font color=\"orange\">$current_time_perm</font></center></td>
|
698 |
<td><center><font color=\"orange\">$current_time_perm</font></center></td>
|
724 |
</tr>
|
699 |
</tr>
|
725 |
<tr><td colspan=\"4\"><font color=red><b>$error_time_perm</b></font></td></tr>
|
700 |
<tr><td colspan=\"4\"><font color=red><b>$error_time_perm</b></font></td></tr>
|
726 |
|
- |
|
727 |
|
- |
|
728 |
</tr>
|
- |
|
729 |
</table>
|
701 |
</table>
|
730 |
</form>";
|
702 |
</form>";
|
731 |
|
703 |
|
732 |
|
704 |
|
733 |
require('/etc/freeradius-web/config.php');
|
705 |
require('/etc/freeradius-web/config.php');
|