* cleanup
authorArt Cancro <ajc@citadel.org>
Sun, 9 Nov 2003 20:34:05 +0000 (20:34 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 9 Nov 2003 20:34:05 +0000 (20:34 +0000)
ctdlphp/ctdlheader.php
ctdlphp/ctdlprotocol.php
ctdlphp/who.php

index 1a9ac6583d47e059e59a91f052be5892dbbec8e2..c5b8f5e6421fce1a0db4770f753c35d5c4c04002 100644 (file)
@@ -9,14 +9,20 @@
 // Copyright (c) 2003 by Art Cancro <ajc@uncensored.citadel.org>
 // This program is released under the terms of the GNU General Public License.
 
+
+// All of the back-end magic gets included from here.  The rest of the
+// pages in the system then only have to include ctdlheader.php (since it
+// is required) and they get the others automatically.
+//
 include "ctdlsession.php";
 include "ctdlprotocol.php";
 
 function bbs_page_header() {
+
+       // Make sure we're connected to Citadel.  Do not remove this!!
        establish_citadel_session();
 
        echo <<<LITERAL
-
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
@@ -52,7 +58,6 @@ LITERAL;
 <HR>
 
 LITERAL;
-
 }
 
 
@@ -62,4 +67,5 @@ function bbs_page_footer() {
        echo "</BODY></HTML>\n";
 }
 
+
 ?>
index a15686f3529ed4b6718579e610ea10a8620e4c20..0ab08bdf276ee59de104465e52f6de876327d750 100644 (file)
@@ -108,6 +108,28 @@ function create_new_user($user, $pass) {
 //
 function become_logged_in($server_parms) {
        $_SESSION["logged_in"] = 1;
+
+       $tok = strtok($server_parms, "|");
+       if ($tok) $thisline["username"] = $tok;
+
+       $tok = strtok("|");
+       if ($tok) $thisline["axlevel"] = $tok;
+               
+       $tok = strtok("|");
+       if ($tok) $thisline["calls"] = $tok;
+               
+       $tok = strtok("|");
+       if ($tok) $thisline["posts"] = $tok;
+               
+       $tok = strtok("|");
+       if ($tok) $thisline["userflags"] = $tok;
+               
+       $tok = strtok("|");
+       if ($tok) $thisline["usernum"] = $tok;
+               
+       $tok = strtok("|");
+       if ($tok) $thisline["lastcall"] = $tok;
+               
        ctdl_goto("_BASEROOM_");
 }
 
index 019354a33252035e35c50dd4510c729ea1533e32..6d5295f23a6fa3d7bc5b04309579473a6bc219cd 100644 (file)
@@ -1,4 +1,8 @@
 <?PHP
+
+       // This is an example of the use of ctdl_rwho() to display the
+       // list of users currently logged in.
+
        include "ctdlheader.php";
        bbs_page_header();