Example #1
0
#
# $Id: compose.php,v 1.5 2005/02/19 00:32:34 filetreefrog Exp $
##################################################
if (!defined("PATHOS")) {
    exit("");
}
if ($user) {
    $msg = null;
    if (isset($_GET['recipient'])) {
        $msg->recipient = $_GET['recipient'];
    }
    if (isset($_GET['replyto'])) {
        $orig = $db->selectObject("privatemessage", "id=" . $_GET['replyto']);
        $msg->recipient = $orig->from_id;
        $msg->subject = "Re: " . $orig->subject;
        $msg->body = "";
    } else {
        if (isset($_GET['subject'])) {
            $msg->subject = $_GET['subject'];
        }
        if (isset($_GET['body'])) {
            $msg->body = $_GET['body'];
        }
    }
    $form = privatemessage::form($msg);
    $form->meta("module", "inboxmodule");
    $form->meta("action", "send");
    $template = new template("inboxmodule", "_form_compose", $loc);
    $template->assign("form_html", $form->toHTML());
    $template->output();
}