File size: 668B
<?php
require_once('../wu_init.php');
if (!wu_token()) { exit('wu-error'); }
if (!USER_LOGGED) { exit('wu-error'); }
//Отслеживание
$adm = mysqli_fetch_assoc(mysqli_query($connect_db, "SELECT id,log_act FROM ".DB_PREFIX."_config LIMIT 1"));
if($_POST['not'] == 'true'){
wu_log_act(0, 'Включил уведомления на E-mail');
mysqli_query($connect_db, "UPDATE `".DB_PREFIX."_users` SET `tomail` = '1' WHERE uid = '$u_id' LIMIT 1");
exit('1');
} else {
wu_log_act(0, 'Отключил уведомления на E-mail');
mysqli_query($connect_db, "UPDATE `".DB_PREFIX."_users` SET `tomail` = '0' WHERE uid = '$u_id' LIMIT 1");
exit('0');
}
?>