Exemplo n.º 1
0
    $left_frame_width = 280;
}
if (!($folder_info = threads_get_folders())) {
    html_draw_error(gettext("There are no folders available."));
}
if (isset($_GET['edit_success']) && validate_msg($_GET['edit_success'])) {
    $edit_success = "&edit_success={$_GET['edit_success']}";
} else {
    $edit_success = "";
}
if (isset($_GET['delete_success']) && validate_msg($_GET['delete_success'])) {
    $delete_success = "&delete_success={$_GET['delete_success']}";
} else {
    $delete_success = "";
}
if (isset($_GET['folder']) && is_numeric($_GET['folder']) && folder_is_accessible($_GET['folder'])) {
    $fid = $_GET['folder'];
    if ($msg = messages_get_most_recent($uid, $fid)) {
        html_draw_top('frame_set_html', 'pm_popup_disabled');
        $frameset = new html_frameset_cols('discussion', "{$left_frame_width},*");
        $frameset->html_frame("thread_list.php?webtag={$webtag}&mode=0&folder={$fid}", html_get_frame_name('left'));
        $frameset->html_frame("messages.php?webtag={$webtag}&msg={$msg}{$edit_success}{$delete_success}", html_get_frame_name('right'));
        $frameset->output_html();
        html_draw_bottom(true);
    } else {
        html_draw_error(gettext("No Messages"));
    }
} else {
    if (isset($_GET['msg']) && validate_msg($_GET['msg'])) {
        html_draw_top('frame_set_html', 'pm_popup_disabled');
        $frameset = new html_frameset_cols('discussion', "{$left_frame_width},*");
Exemplo n.º 2
0
    $fid = $_GET['fid'];
} else {
    if (isset($_POST['fid']) && is_numeric($_POST['fid'])) {
        $fid = $_POST['fid'];
    } else {
        html_draw_error(gettext("The requested folder could not be found or access was denied."));
    }
}
// Get the folder ID for the current message
if (!($folder_data = folder_get($fid))) {
    html_draw_error(gettext("The requested folder could not be found or access was denied."));
}
// UID of the current user.
$uid = session::get_value('UID');
// Get the existing thread data.
if (!folder_is_accessible($fid)) {
    html_draw_error(gettext("The requested folder could not be found or access was denied."));
}
// Array to hold error messages
$error_msg_array = array();
// Submit Code
if (isset($_POST['save'])) {
    $valid = true;
    if (isset($_POST['interest']) && is_numeric($_POST['interest'])) {
        $folder_data['INTEREST'] = $_POST['interest'];
        if (!user_set_folder_interest($fid, $folder_data['INTEREST'])) {
            $error_msg_array[] = gettext("Failed to update folder interest");
            $valid = false;
        }
    }
    if ($valid) {