Exemplo n.º 1
0
 if (isset($t_reply_mid) && is_numeric($t_reply_mid) && $t_reply_mid > 0) {
     if ($pm_data = pm_message_get($t_reply_mid)) {
         $pm_data['CONTENT'] = pm_get_content($t_reply_mid);
     } else {
         light_pm_error_refuse();
     }
 }
 if (isset($_POST['t_to_uid_others']) && strlen(trim($_POST['t_to_uid_others'])) > 0) {
     $t_recipient_array = preg_split("/[;|,]/u", trim($_POST['t_to_uid_others']));
     $t_new_recipient_array['TO_UID'] = array();
     $t_new_recipient_array['LOGON'] = array();
     $t_new_recipient_array['NICK'] = array();
     foreach ($t_recipient_array as $key => $t_recipient) {
         $to_logon = trim($t_recipient);
         if ($to_user = user_get_by_logon($to_logon)) {
             $peer_relationship = user_get_peer_relationship($to_user['UID'], $uid);
             if (!in_array($to_user['UID'], $t_new_recipient_array['TO_UID'])) {
                 $t_new_recipient_array['TO_UID'][] = $to_user['UID'];
                 $t_new_recipient_array['LOGON'][] = $to_user['LOGON'];
                 $t_new_recipient_array['NICK'][] = $to_user['NICKNAME'];
             }
             if ($to_radio == 'others') {
                 if ($peer_relationship ^ USER_BLOCK_PM && user_allow_pm($to_user['UID']) || session::check_perm(USER_PERM_FOLDER_MODERATE, 0)) {
                     pm_user_prune_folders();
                     if (pm_get_free_space($uid) < sizeof($t_new_recipient_array['TO_UID'])) {
                         $error_msg_array[] = gettext("You do not have enough free space to send this message.");
                         $valid = false;
                     }
                 } else {
                     $error_msg_array[] = sprintf(gettext("%s has opted out of receiving personal messages"), $to_logon);
                     $valid = false;
Exemplo n.º 2
0
        }
    }
    if ($peer_perms & USER_PERM_FOLDER_MODERATE && !session::check_perm(USER_PERM_CAN_IGNORE_ADMIN, 0)) {
        $peer_relationship = $peer_relationship & USER_IGNORED ? USER_NORMAL : $peer_relationship;
    }
    if (user_rel_update($_SESSION['UID'], $peer_uid, $peer_relationship, $peer_nickname)) {
        header_redirect("{$ret}&relupdated=true");
        exit;
    } else {
        $error_msg_array[] = gettext("Relationship updated failed!");
        $valid = false;
    }
}
if (isset($_POST['reset_nickname_x']) || isset($_POST['reset_nickname_y'])) {
    $peer_nickname = user_get_nickname($peer_uid);
    $peer_relationship = user_get_peer_relationship($_SESSION['UID'], $peer_uid);
    user_rel_update($_SESSION['UID'], $peer_uid, $peer_relationship, $peer_nickname);
}
$peer_user_display = format_user_name($user_peer['LOGON'], $user_peer['NICKNAME']);
html_draw_top(array('title' => sprintf(gettext('User Relationship - %s'), $peer_user_display), 'class' => 'window_title'));
$peer_relationship = user_get_relationship($_SESSION['UID'], $peer_uid);
$peer_nickname = user_get_peer_nickname($_SESSION['UID'], $peer_uid);
echo "<h1>", gettext("User Relationship"), html_style_image('separator'), "<a href=\"user_profile.php?webtag={$webtag}&amp;uid={$peer_uid}\" target=\"_blank\" class=\"popup 650x500\">", word_filter_add_ob_tags($peer_user_display, true), "</a></h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
    html_display_error_array($error_msg_array, '600', 'left');
} else {
    if ($peer_perms & USER_PERM_FOLDER_MODERATE && !session::check_perm(USER_PERM_CAN_IGNORE_ADMIN, 0)) {
        html_display_warning_msg(gettext("You cannot ignore this user, as they are a moderator."), '600', 'left');
    }
}
if (isset($_POST['preview_signature'])) {
Exemplo n.º 3
0
         $pm_data['CONTENT'] = pm_get_content($reply_mid);
     } else {
         html_draw_top(array('title' => gettext("Error")));
         pm_error_refuse();
         html_draw_bottom();
         exit;
     }
 }
 if (isset($_POST['to_logon']) && strlen(trim($_POST['to_logon'])) > 0) {
     $to_logon_array = preg_split('/,\\s*/u', trim($_POST['to_logon'], ', '));
     $to_logon_array = array_filter(array_map('trim', $to_logon_array), 'strlen');
     foreach ($to_logon_array as $key => $recipient) {
         $to_logon = trim($recipient);
         unset($to_logon_array[$key]);
         if (($to_user = user_get_by_logon($to_logon)) !== false) {
             $peer_relationship = user_get_peer_relationship($to_user['UID'], $_SESSION['UID']);
             $to_logon_array[$to_user['UID']] = array('UID' => $to_user['UID'], 'LOGON' => $to_user['LOGON'], 'NICKNAME' => $to_user['NICKNAME']);
             if (($peer_relationship & USER_BLOCK_PM) == 0 && user_allow_pm($to_user['UID']) || session::check_perm(USER_PERM_FOLDER_MODERATE, 0)) {
                 pm_user_prune_folders($_SESSION['UID']);
                 if (pm_get_free_space($_SESSION['UID']) < sizeof($to_logon_array)) {
                     $error_msg_array[] = gettext("You do not have enough free space to send this message.");
                     $valid = false;
                 }
             } else {
                 $error_msg_array[] = sprintf(gettext("%s has opted out of receiving personal messages"), htmlentities_array($to_logon));
                 $valid = false;
             }
         } else {
             $error_msg_array[] = sprintf(gettext("User %s not found"), htmlentities_array($to_logon));
             $valid = false;
         }