} else { if (isset($_GET['search_keyword']) && strlen(trim($_GET['search_keyword'])) > 0) { $search_keyword = trim($_GET['search_keyword']); } else { $search_keyword = ''; } } if (isset($_POST['clear_search'])) { $search_keyword = ''; } if (isset($_POST['delete'])) { $valid = true; if (isset($_POST['delete_relationships']) && is_array($_POST['delete_relationships'])) { foreach ($_POST['delete_relationships'] as $peer_uid => $delete_relationship) { if ($delete_relationship == "Y") { if (!user_rel_update($uid, $peer_uid, 0)) { $valid = false; $error_msg_array[] = gettext("Failed to remove selected relationship"); } } } if ($valid) { $redirect = "edit_relations.php?webtag={$webtag}&relupdated=true"; header_redirect($redirect, gettext("Relationships Updated!")); exit; } } } // Check if we're searching for a user or simply listing the existing relationships. if (isset($search_keyword) && strlen(trim($search_keyword)) > 0) { $user_peers_array = user_search_relationships($search_keyword, $page, $uid);
} 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}&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'])) { if (($t_sig_content = user_get_sig($peer_uid)) !== false) {
} else { if (isset($_GET['search_keyword']) && strlen(trim($_GET['search_keyword'])) > 0) { $search_keyword = trim($_GET['search_keyword']); } else { $search_keyword = ''; } } if (isset($_POST['clear_search'])) { $search_keyword = ''; } if (isset($_POST['delete'])) { $valid = true; if (isset($_POST['delete_relationships']) && is_array($_POST['delete_relationships'])) { foreach ($_POST['delete_relationships'] as $peer_uid => $delete_relationship) { if ($delete_relationship == "Y") { if (!user_rel_update($_SESSION['UID'], $peer_uid, 0)) { $valid = false; $error_msg_array[] = gettext("Failed to remove selected relationship"); } } } if ($valid) { header_redirect($redirect = "edit_relations.php?webtag={$webtag}&relupdated=true"); exit; } } } // Check if we're searching for a user or simply listing the existing relationships. if (isset($search_keyword) && strlen(trim($search_keyword)) > 0) { $user_peers_array = user_search_relationships($search_keyword, $page, $_SESSION['UID']); } else {