Subversion Repositories ALCASAR

Rev

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

Rev 1504 Rev 1506
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: index.php 1504 2014-11-27 22:59:10Z richard $
2
# $Id: index.php 1506 2014-11-28 08:52:26Z franck $
3
#
3
#
4
# index.php for ALCASAR captive portal
4
# index.php for ALCASAR captive portal
5
# by REXY
5
# by REXY
6
# UI & css style by stephane ERARD
6
# UI & css style by stephane ERARD
7
# The contents of this file may be used under the terms of the GNU
7
# The contents of this file may be used under the terms of the GNU
Line 42... Line 42...
42
	exit("Error opening the file ".CONF_FILE);
42
	exit("Error opening the file ".CONF_FILE);
43
}
43
}
44
fclose($ouvre);
44
fclose($ouvre);
45
$organisme = trim($conf["ORGANISM"]);
45
$organisme = trim($conf["ORGANISM"]);
46
$domainname = trim($conf["DOMAIN"]);
46
$domainname = trim($conf["DOMAIN"]);
47
$service_SMS_status = trim($conf["SMS_REGISTRATION"]);
-
 
48
$hostname = "alcasar.".$domainname;
47
$hostname = "alcasar.".$domainname;
49
$network_pb = False;
48
$network_pb = False;
50
$cert_add = "http://$hostname/certs";
49
$cert_add = "http://$hostname/certs";
51
$direct_access = False;
50
$direct_access = False;
52
$diagnostic = "can't contact the default router";
51
$diagnostic = "can't contact the default router";
Line 89... Line 88...
89
			
88
			
90
			if ($res){
89
			if ($res){
91
				$connection_history.= "<ul>";
90
				$connection_history.= "<ul>";
92
				while(($row = @da_sql_fetch_array($res,$config))){
91
				while(($row = @da_sql_fetch_array($res,$config))){
93
					$connected = "";
92
					$connected = "";
94
					if ($row['acctstoptime'] == "") $connected = " ($l_connected)";
93
					if ($row[acctstoptime] == "") $connected = " ($l_connected)";
95
					$connection_history.="<li title='$row['username'] $row['acctstarttime'] $row['acctstoptime'] (".secondsToDuration($row['acctsessiontime']).")'>$row['acctstarttime'] (".secondsToDuration($row['acctsessiontime']).") $connected</li>";
94
					$connection_history.="<li title='$row[username] $row[acctstarttime] $row[acctstoptime] (".secondsToDuration($row[acctsessiontime]).")'>$row[acctstarttime] (".secondsToDuration($row[acctsessiontime]).") $connected</li>";
96
				}
95
				}
97
				$connection_history.="</ul>";
96
				$connection_history.="</ul>";
98
			}
97
			}
99
		}
98
		}
100
	}
99
	}
Line 297... Line 296...
297
//search here in the blacklist categories (if ((! $direct_access) && (! $network_pb)){}
296
//search here in the blacklist categories (if ((! $direct_access) && (! $network_pb)){}
298
?>
297
?>
299
			</div>
298
			</div>
300
<?php
299
<?php
301
# CHECK IF the SMS service is enable
300
# CHECK IF the SMS service is enable
302
//$service_SMS_status="off";
301
$service_SMS_status="false";
303
if (($service_SMS_status == "on") || ($service_SMS_status == "On")){
302
if ($service_SMS_status == "true") {
304
$sms_div='	
303
$sms_div='	
305
			<div class="box_menu" id="box_acc" onmouseover="valoriserDiv5(text_acc);">
304
			<div class="box_menu" id="box_acc" onmouseover="valoriserDiv5(text_acc);">
306
				<span>'.$l_sms_access.'</span>
305
				<span>'.$l_sms_access.'</span>
307
				<img src="'.$img_rep.''.$img_sms.'">
306
				<img src="'.$img_rep.''.$img_sms.'">
308
			</div>
307
			</div>