3 include "ctdlheader.php";
6 echo "This is an example of the use of " .
7 "ctdl_get_registration_info() to display " .
8 "your personal data.<BR><BR>\n" ;
10 echo "<TABLE border=1>" .
12 "<TD><B>User</B></TD>" .
13 "<TD><B>Room</B></TD>" .
14 "<TD><B>Host</B></TD>" .
17 ctdl_goto("My Citadel Config");
18 list($num_msgs, $response, $msgs) = ctdl_msgs("", "");
20 echo "num_msgs: " . $num_msgs . "<BR>\n" ;
21 echo "response: " . htmlspecialchars($response) . "<BR>\n" ;
22 $Webcit_Preferences = array();
23 $Webcit_PrefMsgid = 0;
24 if ($num_msgs > 0) foreach ($msgs as $msgnum) {
27 // Fetch the message from the server
28 list($ok, $response, $fields) = ctdl_fetch_message($msgnum);
30 // Bail out gracefully if the message isn't there.
32 echo "Error: " . htmlspecialchars($response) . "<BR>" ;
35 if (isset($fields['part']))
37 $parts = explode('|', $fields['part']);
39 if ($parts[4]=="text/x-vcard")
40 list($size, $vcard) = download_attachment($msgnum, $result[2]);
44 else if ($fields['subj'] == "__ WebCit Preferences __")
46 $Webcit_PrefMsgid = $msgnum;
47 $Webcit_Preferences = $fields;
51 echo "</TABLE>\n--------------------------------------- <pre>\n". $vcard."</pre>";
53 echo "putting it back in!";
57 n:Surename;CName;mitte;Mrs;IV
61 adr:blarg;Road To nowhere ;10;Metropolis;NRW;12345;Country
64 email;internet:user@samplecitadel.org
65 email;internet:me@samplecitadel.org
66 email;internet:myself@samplecitadel.org
67 email;internet:i@samplecitadel.org
68 FBURL;PREF:http://samplecitadel.org/Cname_Lastname.vfb
69 UID:Citadel vCard: personal card for Cname Lastname at samplecitadel.org
72 preg_replace('/Sir/', 'Mrs',$vcard);
73 echo "Now its: <pre>\n".$vcard."</pre>";
76 $entarray['format_type']=FMT_RFC822
;
77 enter_message_0($entarray, "text/x-vcard; charset=UTF-8", $vcard);
80 if ($Webcit_PrefMsgid != '0')
82 ctdl_dele($Webcit_PrefMsgid);
86 $entarray['format_type']=FMT_FIXED
;
87 $entarray['subject'] = $Webcit_Preferences['subj'];
88 $entarray['anon_flag'] = '0';
89 enter_message_0($entarray,
91 "somevar|somevalue\r\n".$Webcit_Preferences['text']);
96 <a href
="welcome.php">Page One
</a
><BR
>
97 <a href
="page3.php">Page Three
</a
><BR
>