* The code which loads expire policies had been incompletely ported to strbuf, causin...
[citadel.git] / ctdlphp / api.html
blob5215453e0e9eccb1fd1da1096f6edb07b6319228
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-15">
5 <TITLE></TITLE>
6 <META NAME="GENERATOR" CONTENT="OpenOffice.org 1.0.3 (Linux)">
7 <META NAME="CREATED" CONTENT="20031103;22165400">
8 <META NAME="CHANGED" CONTENT="20031103;22264800">
9 <STYLE>
10 <!--
11 @page { size: 21.59cm 27.94cm; margin-left: 3.18cm; margin-right: 3.18cm; margin-top: 2.54cm; margin-bottom: 2.54cm }
12 P { margin-bottom: 0.21cm }
13 -->
14 </STYLE>
15 </HEAD>
16 <BODY LANG="en-US">
17 <P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT FACE="Sans-serif">Citadel/UX
18 Web Framework for PHP</FONT></P>
19 <P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT FACE="Sans-serif"><I>something
20 resembling documentation</I></FONT></P>
21 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal"><BR>
22 </P>
23 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal"><FONT FACE="Sans-serif"><U>Global
24 variables</U></FONT></P>
25 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
26 <FONT FACE="Sans-serif">You can count on these being available:</FONT></P>
27 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
28 <BR>
29 </P>
30 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
31 <FONT FACE="Sans-serif">$_SESSION[&quot;serv_nodename&quot;] &ndash;
32 Short nodename of the Citadel server.</FONT></P>
33 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
34 <FONT FACE="Sans-serif">$_SESSION[&quot;serv_humannode&quot;] &ndash;
35 Human-readable name of the site.</FONT></P>
36 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
37 <FONT FACE="Sans-serif">$_SESSION[&quot;serv_fqdn&quot;] &ndash;
38 Fully-qualified domain name of the Citadel server.</FONT></P>
39 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
40 <FONT FACE="Sans-serif">$_SESSION[&quot;serv_software&quot;] &ndash;
41 The server software (e.g. Citadel/UX 9.99)</FONT></P>
42 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
43 <FONT FACE="Sans-serif">$_SESSION[&quot;serv_city&quot;] &ndash;
44 Geographic location of the Citadel server.</FONT></P>
45 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
46 <FONT FACE="Sans-serif">$_SESSION[&quot;serv_sysadmin&quot;] &ndash;
47 Name of the system administrator.</FONT></P>
48 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
49 <BR>
50 </P>
51 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
52 <FONT FACE="Sans-serif">$_SESSION[&quot;ctdlsession&quot;] &ndash;
53 Name of the session ID. Not very useful.</FONT></P>
54 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
55 <FONT FACE="Sans-serif">$_SESSION[&quot;username&quot;] &ndash; Name
56 of the user currently logged in.</FONT></P>
57 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
58 <FONT FACE="Sans-serif">$_SESSION[&quot;password&quot;] &ndash;
59 Current user's password. Don't use this.</FONT></P>
60 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
61 <BR>
62 </P>
63 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal"><FONT FACE="Sans-serif"><U>Session
64 stuff</U></FONT></P>
65 <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
66 </P>
67 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
68 <FONT FACE="Sans-serif">Upon establishment of a new PHP session, a
69 copy of &ldquo;sessionproxy.php&rdquo; will be spawned. This is a
70 session proxy which maintains a connection to the Citadel server. It
71 will time out after 15 minutes if no additional connections are made.</FONT></P>
72 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
73 <BR>
74 </P>
75 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
76 <FONT FACE="Sans-serif">Only the login.php, do_login.php, and
77 logout.php pages may be displayed when there is no user logged in.
78 Any attempt to load another page without logging in will
79 automatically be redirected to login.php.</FONT></P>
80 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
81 <BR>
82 </P>
83 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
84 <FONT FACE="Sans-serif">When a successful login is completed,
85 welcome.php will be loaded.</FONT></P>
86 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
87 <BR>
88 </P>
89 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
90 <FONT FACE="Sans-serif">To end the session, simply link to
91 logout.php. There is code on that page to end the session and shut
92 everything down.</FONT></P>
93 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
94 <BR>
95 </P>
96 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal"><FONT FACE="Sans-serif"><U>Protocol
97 library</U></FONT></P>
98 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
99 <BR>
100 </P>
101 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
102 <FONT FACE="Sans-serif">ctdl_iden() </FONT>
103 </P>
104 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
105 <FONT FACE="Sans-serif">Called without any arguments. This just
106 identifies our client to the Citadel server. This is called by
107 ctdlsession.php so you probably don't need to use it.</FONT></P>
108 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
109 <BR>
110 </P>
111 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
112 <FONT FACE="Sans-serif">ctdl_get_server_info()</FONT></P>
113 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
114 <FONT FACE="Sans-serif">Also called by ctdlsession.php, this loads up
115 most of the global variables listed above.</FONT></P>
116 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
117 <BR>
118 </P>
119 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
120 <FONT FACE="Sans-serif">login_existing_user($user, $pass)</FONT></P>
121 <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-style: normal"><FONT FACE="Sans-serif">create_new_user($user,
122 $pass)</FONT></SPAN></SPAN></P>
123 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
124 <FONT FACE="Sans-serif">ctdl_mesg($banner_name)</FONT></P>
125 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
126 <FONT FACE="Sans-serif">ctdl_rwho()</FONT></P>
127 <P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-style: normal; text-decoration: none">
128 <BR>
129 </P>
130 </BODY>
131 </HTML>