Line 17... |
Line 17... |
17 |
* along with this program; if not, write to the *
|
17 |
* along with this program; if not, write to the *
|
18 |
* Free Software Foundation, Inc., *
|
18 |
* Free Software Foundation, Inc., *
|
19 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
19 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
20 |
***************************************************************************/
|
20 |
***************************************************************************/
|
21 |
|
21 |
|
22 |
// $Id: portail.php 971 2012-08-13 17:16:03Z richard $
|
22 |
// $Id: portail.php 1478 2014-11-04 22:28:12Z richard $
|
23 |
|
23 |
|
24 |
// xml_utilisateur()
|
24 |
// xml_utilisateur()
|
25 |
|
25 |
|
26 |
function request ($texte) {
|
26 |
function request ($texte) {
|
27 |
$strResult = 0;
|
27 |
$strResult = 0;
|
28 |
// Déclaration des paramètres de connexion
|
28 |
// Déclaration des paramètres de connexion
|
29 |
$host = "localhost";
|
29 |
$host = "localhost";
|
30 |
$DB_USER = "radius";
|
30 |
$DB_USER = "radius";
|
31 |
$DB_RADIUS = "radius";
|
31 |
$DB_RADIUS = "radius";
|
32 |
$radiuspwd = "hxoGX9sw";
|
32 |
$radiuspwd = "J7YI65SW";
|
33 |
// Connexion au serveur
|
33 |
// Connexion au serveur
|
34 |
mysql_connect($host, $DB_USER,$radiuspwd) or die("erreur de connexion au serveur");
|
34 |
mysql_connect($host, $DB_USER,$radiuspwd) or die("erreur de connexion au serveur");
|
35 |
mysql_select_db($DB_RADIUS) or die("erreur de connexion a la base de donnees");
|
35 |
mysql_select_db($DB_RADIUS) or die("erreur de connexion a la base de donnees");
|
36 |
// Creation et envoi de la requete
|
36 |
// Creation et envoi de la requete
|
37 |
if ($texte == 'user') {$query = "SELECT UserName FROM userinfo";}
|
37 |
if ($texte == 'user') {$query = "SELECT UserName FROM userinfo";}
|
Line 109... |
Line 109... |
109 |
$nbr_grp = request ('group');
|
109 |
$nbr_grp = request ('group');
|
110 |
$nbr_user_online = exec ("sudo /usr/sbin/chilli_query list | cut -d\" \" -f5 | grep \"1\" | wc -l");
|
110 |
$nbr_user_online = exec ("sudo /usr/sbin/chilli_query list | cut -d\" \" -f5 | grep \"1\" | wc -l");
|
111 |
if (filtrageTest("/usr/local/etc/alcasar.conf", "/^PROTOCOLS_FILTERING=on/")){
|
111 |
if (filtrageTest("/usr/local/etc/alcasar.conf", "/^PROTOCOLS_FILTERING=on/")){
|
112 |
$network_filter_status = $text['enable'];}
|
112 |
$network_filter_status = $text['enable'];}
|
113 |
else { $network_filter_status = $text['disable'];}
|
113 |
else { $network_filter_status = $text['disable'];}
|
114 |
if (filtrageTest("/usr/local/etc/alcasar.conf","/^DNS_FILTERING=on/")){
|
- |
|
115 |
$domain_filter_status = $text['enable'];}
|
- |
|
116 |
else { $domain_filter_status = $text['disable'];}
|
- |
|
117 |
if (filtrageTest("/usr/local/etc/alcasar.conf","/^WEB_ANTIVIRUS=on/")){
|
- |
|
118 |
$web_antivir_status = $text['enable'];}
|
- |
|
119 |
else { $web_antivir_status = $text['disable'];}
|
- |
|
120 |
if ((filtrageTest("/var/www/html/index.php","/network_pb = False/")) && (internetTest($INSTALLEDVERSION))){
|
114 |
if ((filtrageTest("/var/www/html/index.php","/network_pb = False/")) && (internetTest($INSTALLEDVERSION))){
|
121 |
$internet_status = "<img src='/images/state_ok.gif'>".$text['enable'];
|
115 |
$internet_status = "<img src='/images/state_ok.gif'>".$text['enable'];
|
122 |
$version = dns_get_record("version.alcasar.net",DNS_TXT);
|
116 |
$version = dns_get_record("version.alcasar.net",DNS_TXT);
|
123 |
$AVAILABLEDVERSION = $version[0]['txt'];
|
117 |
$AVAILABLEDVERSION = $version[0]['txt'];
|
124 |
} else {
|
118 |
} else {
|
Line 149... |
Line 143... |
149 |
. " <tr>\n"
|
143 |
. " <tr>\n"
|
150 |
. " <td valign=\"top\"><font size=\"-1\">" . $text['net_filter'] . "</font></td>\n"
|
144 |
. " <td valign=\"top\"><font size=\"-1\">" . $text['net_filter'] . "</font></td>\n"
|
151 |
. " <td><font size=\"-1\">" . $network_filter_status . "</font></td>\n"
|
145 |
. " <td><font size=\"-1\">" . $network_filter_status . "</font></td>\n"
|
152 |
. " </tr>\n"
|
146 |
. " </tr>\n"
|
153 |
. " <tr>\n"
|
147 |
. " <tr>\n"
|
154 |
. " <td valign=\"top\"><font size=\"-1\">" . $text['web_antivirus'] . "</font></td>\n"
|
- |
|
155 |
. " <td><font size=\"-1\">" . $web_antivir_status . "</font></td>\n"
|
- |
|
156 |
. " </tr>\n"
|
- |
|
157 |
. " <tr>\n"
|
- |
|
158 |
. " <td valign=\"top\"><font size=\"-1\">" . $text['domain_filter'] . "</font></td>\n"
|
- |
|
159 |
. " <td><font size=\"-1\">" . $domain_filter_status . "</font></td>\n"
|
- |
|
160 |
. " </tr>\n"
|
- |
|
161 |
. " <tr>\n"
|
- |
|
162 |
. " <td valign=\"top\"><font size=\"-1\">" . $text['bl-version'] . "</font></td>\n"
|
148 |
. " <td valign=\"top\"><font size=\"-1\">" . $text['bl-version'] . "</font></td>\n"
|
163 |
. " <td><font size=\"-1\">" . $VERSIONBL . "</font></td>\n"
|
149 |
. " <td><font size=\"-1\">" . $VERSIONBL . "</font></td>\n"
|
164 |
. " </tr>\n"
|
150 |
. " </tr>\n"
|
165 |
. "</table>\n";
|
151 |
. "</table>\n";
|
166 |
return $_text;
|
152 |
return $_text;
|