$poster = $_POST['poster'];
$message = $_POST['message'];
if (isset($_GET['parent'])) {
    $parent = $_GET['parent'];
} else {
    $parent = $_POST['parent'];
}
if (!$area) {
    $area = 1;
}
if (!$error) {
    if (!$parent) {
        $parent = 0;
        if (!$title) {
            $title = 'NEW POST';
        }
    } else {
        //get post name
        $title = 'Re: ' . $title;
    }
    //make sure titile will still fit in db
    $title = substr($title, 0, 20);
    //prepend a quoting pattern to the post you are replying to
    $message = add_quoting(get_post_message($parent));
}
do_html_header($title);
display_new_post_form($parent, $area, $title, $message, $poster);
if ($error) {
    echo "<p>Your message was not stored.</p>\n\t\t\t<p>Make sure you have filled in all fields and try again.</p>";
}
do_html_footer();
Ejemplo n.º 2
0
         if ($_POST) {
             display_new_message_form($_SESSION['auth_user'], $to, $cc, $subject, $body);
         } else {
             display_new_message_form($_SESSION['auth_user']);
         }
         break;
     }
     break;
 case 'forward':
     //set message as quoted body of current message
     if (!$imap) {
         $imap = open_mailbox($_SESSION['auth_user'], $_SESSION['selected_account']);
     }
     if ($imap) {
         $header = imap_header($imap, $messageid);
         $body = add_quoting(stripslashes(imap_body($imap, $messageid)));
         $subject = 'Fwd: ' . $header->subject;
         imap_close($imap);
         if ($_POST) {
             display_new_message_form($_SESSION['auth_user'], $to, $cc, $subject, $body);
         } else {
             display_new_message_form($_SESSION['auth_user']);
         }
         break;
     }
     break;
 case 'new-message':
     if (isset($to) && isset($cc) && isset($subject) && isset($body)) {
         display_new_message_form($_SESSION['auth_user'], $to, $cc, $subject, $body);
     } else {
         display_new_message_form($_SESSION['auth_user']);