Subversion Repositories ALCASAR

Rev

Rev 1416 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1416 Rev 1452
Line 1... Line 1...
1
<?php
1
<?php
-
 
2
# CHECK IF the SMS service is enable
-
 
3
$service_SMS_status=false;
-
 
4
 
-
 
5
if(!$service_SMS_status){
-
 
6
	header('Location: ./');
-
 
7
}
-
 
8
?>
-
 
9
<?php
2
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
10
define ("CONF_FILE", "/usr/local/etc/alcasar.conf");
3
 
11
 
4
$ouvre=fopen(CONF_FILE,"r");
12
$ouvre=fopen(CONF_FILE,"r");
5
if($ouvre){
13
if($ouvre){
6
	while(!feof ($ouvre))
14
	while(!feof ($ouvre))
Line 48... Line 56...
48
	$l_tab_prev = "précédent";
56
	$l_tab_prev = "précédent";
49
	$l_tab_search = "Recherche :";
57
	$l_tab_search = "Recherche :";
50
	$l_tab_pmenu = "Affiche la page _PAGE_ sur _PAGES_";
58
	$l_tab_pmenu = "Affiche la page _PAGE_ sur _PAGES_";
51
	$l_tab_info = "Montrer _MENU_ résultats par page";
59
	$l_tab_info = "Montrer _MENU_ résultats par page";
52
	$l_tab_infoempty = "Aucun résultat";
60
	$l_tab_infoempty = "Aucun résultat";
-
 
61
	$l_autorefresh = "Rafraichissement : 10 sec";
53
	
62
	
54
} elseif($Language == 'en'){
63
} elseif($Language == 'en'){
55
	$l_title = "Autoregistration";
64
	$l_title = "Autoregistration";
56
	$l_num_exist = "Account enables";
65
	$l_num_exist = "Account enables";
57
	$l_num_flood = "Phone number banned: Number of trial exceeded.";
66
	$l_num_flood = "Phone number banned: Number of trial exceeded.";
Line 73... Line 82...
73
	$l_tab_search = "Search :";
82
	$l_tab_search = "Search :";
74
	$l_tab_pmenu = "Showing _PAGE_ to _PAGE_ of _PAGE_ entries :";
83
	$l_tab_pmenu = "Showing _PAGE_ to _PAGE_ of _PAGE_ entries :";
75
	$l_tab_info = "Show _MENU_ entries";
84
	$l_tab_info = "Show _MENU_ entries";
76
	$l_tab_infoempty = "No matching records found";
85
	$l_tab_infoempty = "No matching records found";
77
	
86
	
-
 
87
	$l_autorefresh = "Rafraichissement : 10 sec";
-
 
88
	
78
} else {
89
} else {
79
 
90
 
80
	$l_title = "Autoregistration";
91
	$l_title = "Autoregistration";
81
	$l_num_exist = "Account enables";
92
	$l_num_exist = "Account enables";
82
	$l_num_flood = "Phone number banned: Number of trial exceeded.";
93
	$l_num_flood = "Phone number banned: Number of trial exceeded.";
Line 97... Line 108...
97
	$l_tab_prev = "previous";
108
	$l_tab_prev = "previous";
98
	$l_tab_search = "Search :";
109
	$l_tab_search = "Search :";
99
	$l_tab_pmenu = "Showing _PAGE_ to _PAGE_ of _PAGE_ entries :";
110
	$l_tab_pmenu = "Showing _PAGE_ to _PAGE_ of _PAGE_ entries :";
100
	$l_tab_info = "Show _MENU_ entries";
111
	$l_tab_info = "Show _MENU_ entries";
101
	$l_tab_infoempty = "No matching records found";
112
	$l_tab_infoempty = "No matching records found";
-
 
113
	
-
 
114
	$l_autorefresh = "Refresh : 10 sec";
102
}
115
}
103
?>
116
?>
104
<!DOCTYPE HTML>
117
<!DOCTYPE HTML>
105
<HTML><!-- written by Rexy -->
118
<HTML><!-- written by Rexy -->
106
<head>
119
<head>
Line 113... Line 126...
113
<!-- jQuery -->
126
<!-- jQuery -->
114
<script type="text/javascript" charset="utf8" src="../js/jquery.js"></script>
127
<script type="text/javascript" charset="utf8" src="../js/jquery.js"></script>
115
<!-- DataTables -->
128
<!-- DataTables -->
116
<script type="text/javascript" charset="utf8" src="../js/jquery.dataTables.js"></script>
129
<script type="text/javascript" charset="utf8" src="../js/jquery.dataTables.js"></script>
117
<script type="text/javascript">
130
<script type="text/javascript">
-
 
131
function timedRefresh(timeoutPeriod) {
-
 
132
    var interval = setInterval(refreshPage, timeoutPeriod);
-
 
133
}
-
 
134
 
-
 
135
function refreshPage() {
-
 
136
    if ($("input[name=autoRefreshCheckboxes]").is(":checked")) {
-
 
137
        location.reload(true);
-
 
138
    }
-
 
139
}
-
 
140
 
118
$(document).ready( function () {
141
$(document).ready( function () {
119
    $('#table_id').DataTable({
142
    $('#table_id').DataTable({
120
		"language": {
143
		"language": {
121
			"paginate": {
144
			"paginate": {
122
			"sFirst": "<?php echo $l_tab_dirst; ?>",
145
			"sFirst": "<?php echo $l_tab_first; ?>",
123
			"sLast": "<?php echo $l_tab_last; ?>",
146
			"sLast": "<?php echo $l_tab_last; ?>",
124
			"sPrevious": "<?php echo $l_tab_prev; ?>",
147
			"sPrevious": "<?php echo $l_tab_prev; ?>",
125
			"sNext": "<?php echo $l_tab_next; ?>"
148
			"sNext": "<?php echo $l_tab_next; ?>"
126
			},
149
			},
127
            "lengthMenu": "<?php echo $l_tab_info; ?>",
150
            "lengthMenu": "<?php echo $l_tab_info; ?>",
Line 132... Line 155...
132
        }
155
        }
133
	});
156
	});
134
} );
157
} );
135
</script>
158
</script>
136
</head>
159
</head>
137
<body>
160
<body onload="JavaScript:timedRefresh(10000);">
138
 
161
 
139
<center>
162
<center>
140
 
163
 
141
 
164
 
142
<div id="logon">
165
<div id="logon">
Line 156... Line 179...
156
 
179
 
157
	<tr>
180
	<tr>
158
		<td align="center">
181
		<td align="center">
159
			<h3>	
182
			<h3>	
160
			<?php 	
183
			<?php 	
161
				$current_num = exec("sudo /usr/local/bin/alcasar-sms.sh --numero_alcasar");
184
				$current_num='XXXXXXXXXX';
162
				echo "$current_num";  
185
				echo "$current_num";
163
			?>
186
			?>
164
			</h3>
187
			</h3>
165
		</td>
188
		</td>
166
	</tr>
189
	</tr>
167
 
190
 
Line 197... Line 220...
197
 
220
 
198
$result = mysqli_query($con, "SELECT * 
221
$result = mysqli_query($con, "SELECT * 
199
				FROM `SMS_ban_perm` 
222
				FROM `SMS_ban_perm` 
200
				ORDER BY date_add DESC;");
223
				ORDER BY date_add DESC;");
201
?>
224
?>
202
 
-
 
-
 
225
<input type='checkbox' checked='checked' name='autoRefreshCheckboxes' ><?php echo $l_autorefresh; ?></input>
203
<table id="table_id" class="display">
226
<table id="table_id" class="display">
204
    <thead>
227
    <thead>
205
        <tr>
228
        <tr>
206
            <th><b><?php echo $l_num_num; ?></b></th>
229
            <th><b><?php echo $l_num_num; ?></b></th>
207
			<th><b><?php echo $l_num_raison; ?></b></th>
230
			<th><b><?php echo $l_num_raison; ?></b></th>