5f0ebf40ee64fbbc586530d094c1d966d2d17cb2
[citadel.git] / ctdlphp / myinfo.php
1 <?PHP
2 $vcard="";
3 include "ctdlheader.php";
4 bbs_page_header();
5
6 echo    "This is an example of the use of " .
7 "ctdl_get_registration_info() to display " .
8 "your personal data.<BR><BR>\n" ;
9
10 echo    "<TABLE border=1>" .
11 "<TR>" .
12 "<TD><B>User</B></TD>" .
13 "<TD><B>Room</B></TD>" .
14 "<TD><B>Host</B></TD>" .
15 "</TR>" ;
16
17 ctdl_goto("My Citadel Config");
18 list($num_msgs, $response, $msgs) = ctdl_msgs("", "");
19
20 echo "num_msgs: " . $num_msgs . "<BR>\n" ;
21 echo "response: " . htmlspecialchars($response) . "<BR>\n" ;
22
23 if ($num_msgs > 0) foreach ($msgs as $msgnum) {
24         print_r($msgnum);
25         $result = get_message_partlist($msgnum);
26         if (is_array($result) &&
27             ($result[4]=="text/x-vcard"))
28         {
29                 list($size, $vcard) = download_attachment($msgnum, $result[2]);
30         }
31 }
32
33 echo "</TABLE>\n <pre>\n".$vcard."</pre>";
34
35 echo "putting it back in!";
36 $entearray=array();
37 $entarray['post']=1;
38 $entarray['format_type']=FMT_RFC822;
39 enter_message_0($entarray, "text/x-vcard; charset=UTF-8", $vcard);
40 ?>
41
42 <BR>Sample links<BR>
43 <a href="welcome.php">Page One</a><BR>
44 <a href="page3.php">Page Three</a><BR>
45
46 <?PHP
47         bbs_page_footer();
48 ?>