Beispiel #1
0
function enter_message_0($msgHdr, $contentType, $data)
{
    $send = array();
    if (isset($msgHdr['newusermail'])) {
        array_unshift($send, $msgHdr['newusermail']);
    } else {
        array_unshift($send, "");
    }
    if (isset($msgHdr['supplied_euid'])) {
        array_unshift($send, $msgHdr['supplied_euid']);
    } else {
        array_unshift($send, "");
    }
    if (isset($msgHdr['bcc'])) {
        array_unshift($send, $msgHdr['bcc']);
    } else {
        array_unshift($send, "");
    }
    if (isset($msgHdr['cc'])) {
        array_unshift($send, $msgHdr['cc']);
    } else {
        array_unshift($send, "");
    }
    if (isset($msgHdr['do_confirm'])) {
        array_unshift($send, $msgHdr['do_confirm']);
    } else {
        array_unshift($send, "");
    }
    if (isset($msgHdr['newusername'])) {
        array_unshift($send, $msgHdr['newusername']);
    } else {
        array_unshift($send, "");
    }
    if (isset($msgHdr['subject'])) {
        array_unshift($send, $msgHdr['subject']);
    } else {
        array_unshift($send, "");
    }
    if (isset($msgHdr['format_type'])) {
        array_unshift($send, $msgHdr['format_type']);
    } else {
        array_unshift($send, "");
    }
    if (isset($msgHdr['anon_flag'])) {
        array_unshift($send, $msgHdr['anon_flag']);
    } else {
        array_unshift($send, "");
    }
    if (isset($msgHdr['recp'])) {
        array_unshift($send, $msgHdr['recp']);
    } else {
        array_unshift($send, "");
    }
    if (isset($msgHdr['post'])) {
        array_unshift($send, $msgHdr['post']);
    } else {
        array_unshift($send, "");
    }
    $params = implode('|', $send);
    serv_puts("ENT0 " . $params);
    $reply = serv_gets();
    if (substr($reply, 0, 1) != 4) {
        return array(false, array(), array());
    }
    serv_puts("Content-type: " . $contentType);
    serv_puts("");
    serv_puts($data . "\r\n");
    serv_puts("000");
}
Beispiel #2
0
<?php

include "ctdlheader.php";
bbs_page_header();
serv_puts("ENT0 ");
$response = serv_gets();
if (substr($response, 0, 1) != '2') {
    echo htmlspecialchars(substr($response, 3)) . '<br>';
} else {
    echo '<center>' . '<form ENCTYPE="multipart/form-data" ' . 'METHOD="POST" ACTION="postmsg.php" NAME="postmsg">' . '<input TYPE="submit" NAME="sc" VALUE="Save message">' . '<input TYPE="submit" NAME="sc" VALUE="Cancel">' . '<br>' . '<textarea NAME="msgtext" wrap=soft' . ' ROWS=25 COLS=80 WIDTH=80></textarea><br> ' . '</form>' . '</center> ';
}
bbs_page_footer();
Beispiel #3
0
<?php

include "ctdlheader.php";
bbs_page_header();
serv_puts("ENT0 1||0|4|");
$response = serv_gets();
if (substr($response, 0, 1) != '4') {
    echo htmlspecialchars(substr($response, 3)) . '<br>';
} else {
    serv_puts("Content-type: text/html");
    serv_puts("");
    text_to_server(stripslashes($_REQUEST["msgtext"]), TRUE);
}
echo "Message has been posted.<BR>\n";
bbs_page_footer();