41007e27ea04a111ca3f27b54d1612f3a93532df
[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 ?>
36
37 <BR>Sample links<BR>
38 <a href="welcome.php">Page One</a><BR>
39 <a href="page3.php">Page Three</a><BR>
40
41 <?PHP
42         bbs_page_footer();
43 ?>