From: Wilfried Göesgens Date: Tue, 12 Jun 2007 19:32:26 +0000 (+0000) Subject: * parse function reply properly X-Git-Tag: v7.86~3321 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=633a472d785b3893ab0f7a4d5c0b976bd42a84a7 * parse function reply properly * use text/x-vcard * print the vcard. --- diff --git a/ctdlphp/ctdlelements.php b/ctdlphp/ctdlelements.php index e165b71eb..a0d422f46 100644 --- a/ctdlphp/ctdlelements.php +++ b/ctdlphp/ctdlelements.php @@ -72,6 +72,7 @@ function get_message_partlist($msgnum) { if (isset($fields['part'])) { $parts = explode('|', $fields['part']); + print_r($parts); return $parts; } diff --git a/ctdlphp/ctdlprotocol.php b/ctdlphp/ctdlprotocol.php index 93ff6f7d4..4b921f223 100644 --- a/ctdlphp/ctdlprotocol.php +++ b/ctdlphp/ctdlprotocol.php @@ -708,7 +708,7 @@ function ctdl_msg4_from_server() { -function downoad_attachment($msgnum, $attindex) +function download_attachment($msgnum, $attindex) { $command = "DLAT ".$msgnum."|".$attindex; serv_puts($command); diff --git a/ctdlphp/myinfo.php b/ctdlphp/myinfo.php index a473318f6..41007e27e 100644 --- a/ctdlphp/myinfo.php +++ b/ctdlphp/myinfo.php @@ -1,5 +1,5 @@ " ; ctdl_goto("My Citadel Config"); - list($num_msgs, $response, $msgs) = ctdl_msgs($_REQUEST["mode"], - $_REQUEST["count"] ); + list($num_msgs, $response, $msgs) = ctdl_msgs("", ""); echo "num_msgs: " . $num_msgs . "
\n" ; echo "response: " . htmlspecialchars($response) . "
\n" ; @@ -25,27 +24,13 @@ print_r($msgnum); $result = get_message_partlist($msgnum); if (is_array($result) && - ($result[4]=="text/vcard")) + ($result[4]=="text/x-vcard")) { - $vcard = downoad_attachment($msgnum, $result[2]); - - + list($size, $vcard) = download_attachment($msgnum, $result[2]); } } -///phpinfo(); -/// list($num_users, $wholist) = -// ctdl_get_registration_info(); -/* - if ($num_users > 0) foreach ($wholist as $x) { - echo ""; - echo "", htmlspecialchars($x["user"]), ""; - echo "", htmlspecialchars($x["room"]), ""; - echo "", htmlspecialchars($x["host"]), ""; - echo "\n"; - } -*/ - echo "\n"; + echo "\n
\n".$vcard."
"; ?>