Subversion Repositories ALCASAR

Rev

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

Rev 2166 Rev 2167
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: intercept.php 2166 2017-04-08 15:25:35Z tom.houdayer $
2
# $Id: intercept.php 2167 2017-04-08 15:54:53Z tom.houdayer $
3
#
3
#
4
# intercept.php for ALCASAR captive portal
4
# intercept.php for ALCASAR captive portal
5
# Copyright (C) 2003, 2004 Mondru AB.
5
# Copyright (C) 2003, 2004 Mondru AB.
6
# Modify by REXY & steweb57
6
# Modify by REXY & steweb57
7
# UI & css style by stephane ERARD
7
# UI & css style by stephane ERARD
Line 444... Line 444...
444
if($result == 1)
444
if($result == 1)
445
{
445
{
446
        if ((is_file("./acc/manager/lib/sql/drivers/mysql/functions.php"))&&(is_file("/etc/freeradius-web/config.php"))){
446
        if ((is_file("./acc/manager/lib/sql/drivers/mysql/functions.php"))&&(is_file("/etc/freeradius-web/config.php"))){
447
        include_once("/etc/freeradius-web/config.php");
447
        include_once("/etc/freeradius-web/config.php");
448
        include_once("./acc/manager/lib/sql/drivers/mysql/functions.php");
448
        include_once("./acc/manager/lib/sql/drivers/mysql/functions.php");
-
 
449
        $link = @da_sql_pconnect($config); // on affiche pas les erreurs
449
        $user_uid=da_sql_escape_string($link, $_GET['uid']);
450
        $user_uid=da_sql_escape_string($link, $_GET['uid']);
450
        $sql = "SELECT attribute, value FROM radreply WHERE username='$user_uid'";
451
        $sql = "SELECT attribute, value FROM radreply WHERE username='$user_uid'";
451
        $link = @da_sql_pconnect($config); // on affiche pas les erreurs
-
 
452
        if ($link){
452
        if ($link){
453
                $res = @da_sql_query($link,$config,$sql); // on affiche pas les erreurs
453
                $res = @da_sql_query($link,$config,$sql); // on affiche pas les erreurs
454
                if ($res){
454
                if ($res){
455
                        while(($row = @da_sql_fetch_array($res,$config))){
455
                        while(($row = @da_sql_fetch_array($res,$config))){
456
                                if ($row['attribute'] == "Filter-Id") $filter_id = $row['value']; // on obtient le Filter-Id de l'utilisateur
456
                                if ($row['attribute'] == "Filter-Id") $filter_id = $row['value']; // on obtient le Filter-Id de l'utilisateur