455,15 → 455,13 |
$link = @da_sql_pconnect($config); // on affiche pas les erreurs |
if ($link) { |
$user_uid = da_sql_escape_string($link, $_GET['uid']); |
$sql = "SELECT attribute, value FROM radreply WHERE username='$user_uid' AND attribute='Filter-Id'"; |
$sql = "SELECT value FROM radreply WHERE username='$user_uid' AND attribute='Alcasar-Imputability-Warning'"; |
$res = @da_sql_query($link, $config, $sql); // on affiche pas les erreurs |
if ($res) { |
$row = @da_sql_fetch_array($res, $config); |
$filter_id = $row['value']; // on obtient le Filter-Id de l'utilisateur |
if ($filter_id[3] === '1') { |
//set the fourth bit of filter-id to '0' |
$sql = "set @CurrentFilter=(SELECT value from radreply where username='$user_uid');set @CurrentFilterLeft=(SELECT LEFT(@CurrentFilter,3));set @CurrentFilterRight=(SELECT RIGHT(@CurrentFilter,4));UPDATE radreply SET value = CONCAT((@CurrentFilterLeft),'0', (@CurrentFilterRight)) WHERE username='$user_uid'"; |
$res = mysqli_multi_query($link,$sql); |
if ($row['value'] === '1') { |
$sql = "DELETE FROM radreply WHERE username='$user_uid' AND attribute='Alcasar-Imputability-Warning'"; |
@da_sql_query($link, $config, $sql); |
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 |
exit(); |
} |