示例#1
0
function get_message_partlist($msgnum)
{
    // Fetch the message from the server
    list($ok, $response, $fields) = ctdl_fetch_message($msgnum);
    // Bail out gracefully if the message isn't there.
    if (!$ok) {
        echo "Error: " . htmlspecialchars($response) . "<BR>";
        return false;
    }
    if (isset($fields['part'])) {
        $parts = explode('|', $fields['part']);
        print_r($parts);
        return $parts;
    }
    return false;
}
示例#2
0
fclose($configfh);
include "ctdlsession.php";
include "ctdlprotocol.php";
include "ctdlelements.php";
//define(CITADEL_DEBUG_HTML, FALSE);
establish_citadel_session();
create_new_user($user, $password);
ctdl_goto("My Citadel Config");
list($num_msgs, $response, $msgs) = ctdl_msgs("", "");
$Webcit_Preferences = array();
$Webcit_PrefMsgid = 0;
if ($num_msgs > 0) {
    foreach ($msgs as $msgnum) {
        print_r($msgnum);
        // Fetch the message from the server
        list($ok, $response, $fields) = ctdl_fetch_message($msgnum);
        // Bail out gracefully if the message isn't there.
        if (!$ok) {
            echo "Error: " . $response . "\n";
            return false;
        }
        if (isset($fields['part'])) {
            $parts = explode('|', $fields['part']);
            print_r($parts);
            if ($parts[4] == "text/x-vcard") {
                list($size, $OldVcard) = download_attachment($msgnum, $result[2]);
            } else {
                ctdl_dele($msgnum);
            }
        } else {
            if ($fields['subj'] == "__ WebCit Preferences __") {