Subversion Repositories ALCASAR

Rev

Rev 3185 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3185 Rev 3227
Line 1... Line 1...
1
<?php
1
<?php
2
# $Id: intercept.php 3185 2024-03-08 23:56:49Z rexy $
2
# $Id: intercept.php 3227 2024-10-08 09:35:31Z rexy $
3
#
3
#
4
# intercept.php for ALCASAR captive portal
4
# intercept.php for ALCASAR captive portal
5
# by Rexy & steweb57
5
# by Rexy & steweb57
6
# UI & css style by Stéphane ERARD & Alexandre VEZIN
6
# UI & css style by Stéphane ERARD & Alexandre VEZIN
7
# Help for language translation by B. AUBARD (thanks)
7
# Help for language translation by B. AUBARD (thanks)
Line 451... Line 451...
451
			$user_uid = da_sql_escape_string($link, $_GET['uid']);
451
			$user_uid = da_sql_escape_string($link, $_GET['uid']);
452
			$sql = "SELECT value FROM radreply WHERE username='$user_uid' AND attribute='Alcasar-Imputability-Warning'";
452
			$sql = "SELECT value FROM radreply WHERE username='$user_uid' AND attribute='Alcasar-Imputability-Warning'";
453
			$res = @da_sql_query($link, $config, $sql);
453
			$res = @da_sql_query($link, $config, $sql);
454
			if ($res) {
454
			if ($res) {
455
				$row = @da_sql_fetch_array($res, $config);
455
				$row = @da_sql_fetch_array($res, $config);
456
				if ($row['value'] === '1') {
456
				if ($row && $row['value'] === '1') {
457
					$sql = "DELETE FROM radreply WHERE username='$user_uid' AND attribute='Alcasar-Imputability-Warning'";
457
					$sql = "DELETE FROM radreply WHERE username='$user_uid' AND attribute='Alcasar-Imputability-Warning'";
458
					@da_sql_query($link, $config, $sql);
458
					@da_sql_query($link, $config, $sql);
459
					header('Location: '.(($conf['HTTPS_LOGIN'] === 'on') ? 'https' : 'http').'://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'].'/index.php?warn=1&url='.urlencode($_GET['userurl']));   //we present to user information about imputability logs 
459
					header('Location: '.(($conf['HTTPS_LOGIN'] === 'on') ? 'https' : 'http').'://'.$conf['HOSTNAME'].'.'.$conf['DOMAIN'].'/index.php?warn=1&url='.urlencode($_GET['userurl']));   //we present to user information about imputability logs 
460
					exit();
460
					exit();
461
				}
461
				}