Файл: system/AJAX/php/mail.php
Строк: 20
<?php
FOREACH (ARRAY('config', 'connect', 'users') AS $connect) {
INCLUDE_ONCE ("../../../system/connections/global/$connect.php");
}
ACCESS('users');
IF (!EMPTY(HTTP_X_REQUESTED_WITH) && STRTOLOWER(HTTP_X_REQUESTED_WITH) == 'xmlhttprequest' || !EMPTY(HTTP_X_REQUESTED_WITH) && STRTOLOWER(HTTP_X_REQUESTED_WITH) == 'XMLHttpRequest'){
$mail = DB::GET_STRING("SELECT * FROM `MAIL` WHERE `USER_ID` = '".INTVAL(GET('id'))."' AND `MY_ID` = '".$user['ID']."' LIMIT 1");
$account = DB::GET_STRING("SELECT * FROM `USERS` WHERE `ID` = '".$mail['USER_ID']."' LIMIT 1");
$msg = DB::GET_STRING("SELECT * FROM `MAIL_MESSAGE` WHERE (`USER_ID` = '".$user['ID']."' OR `MY_ID` = '".$user['ID']."') AND `ID` = '".INTVAL(GET('id_msg'))."' LIMIT 1");
IF (ISSET($mail['ID']) && ISSET($account['ID']) && ISSET($msg['ID'])){
ECHO "<div class='list-menu'>";
ECHO "<a href='/users/profile/?path=mail§ion=message&id=".$account['ID']."&delete_my=".$msg['ID']."&page=".INTVAL(GET('page'))."'>".LG('Удалить у меня')."</a>";
ECHO "</div>";
ECHO "<div class='list-menu'>";
ECHO "<a href='/users/profile/?path=mail§ion=message&id=".$account['ID']."&delete_all=".$msg['ID']."&page=".INTVAL(GET('page'))."'>".LG('Удалить у всех')."</a>";
ECHO "</div>";
}ELSE{
ECHO LG('Ошибка');
}
}ELSE{
REDIRECT('/index');
}
?>