Файл: _modules/mail/setting/index.php
Строк: 23
<?php
    # mark core  v1.0
    # author Drk in
    # date 24.10.19     
    # core
    require_once ( $_SERVER['DOCUMENT_ROOT']."/_core/system.php" );
    # user
    system::access(true);
    # meta
    $title = 'Настройки почты :: '.domain;
    # post
    if (isset($_POST['CFMS'])): 
    $mail  = system::abs($_POST['mail']);    
    
    if ($mail == 0 || $mail == 1 || $mail == 2):
    if ($CK == $user['CK']):
    DB :: $dbh -> query("UPDATE user SET mail = ? WHERE id = ?; LIMIT 1", array($mail,$user['id']));    
        
    cache_user::save($user['id']);
    system::header('?','Успешно');    
    # error
    
    else: system::header('?', 'Ошибка, возможно вам подкинули эту ссылку'); endif;
    else: system::header('?', 'Ошибка, не верно выбран параметр'); endif;
    
    endif;    
    # head
    require_once ( head );
    echo '
    '.system::dis().'
    <div class="fights fights-about">
    <form method="post">
    Принимать почту: <br>
    <input type="hidden" name="CK" value="'.$user['CK'].'">
    <input type="radio" name="mail" value="0" '.($user['mail'] == 0 ? 'checked="checked"':'').'> От всех<br>
    <input type="radio" name="mail" value="1" '.($user['mail'] == 1 ? 'checked="checked"':'').'> От друзей <br>
    <input type="radio" name="mail" value="2" '.($user['mail'] == 2 ? 'checked="checked"':'').'> Закрыта почта от всех
    <input type="submit" name="CFMS" value="Сохранить">
    </form>
    </div>
    <div class="fights-link" style="margin: 2px 5px"><a href="/mail">Назад в диалоги</a></div>
    <div class="line"></div>';
    # foot
    require_once ( foot );
?>