Added a comma after each msgnum exported. The parser was globbing them all together...
[citadel.git] / ctdlphp / do_login.php
index b60eebc4ec4fe1c6280d6364b49610a3de3c6023..97c87d9f80f2d935224bb482ae07f2cc4cc5c033 100644 (file)
@@ -1,29 +1,41 @@
 <?PHP
-       include "ctdlheader.php";
-       bbs_page_header();
-
-
-       if ($_POST["action"] == "Login") {
-               list($retval, $msg) =
-                       login_existing_user($_POST["user"], $_POST["pass"]);
-                       echo $msg, "<BR>\n";
-       }
-       if ($_POST["action"] == "New User") {
-               list($retval, $msg) =
-                       create_new_user($_POST["user"], $_POST["pass"]);
-                       echo $msg, "<BR>\n";
-       }
-       else {
-               echo "uuuuhhhhhhhh....<BR>\n";
-       }
 
-?>
+// $Id$
+//
+// The login form displayed in login.php submits to this page.
+// 
+// Copyright (c) 2003 by Art Cancro <ajc@uncensored.citadel.org>
+// This program is released under the terms of the GNU General Public License.
 
+include "ctdlheader.php";
 
-<a href="page2.php">Page Two</a><BR>
-<a href="page3.php">Page Three</a><BR>
+bbs_page_header();
+
+if ($_REQUEST["action"] == "Login") {
+       list($retval, $msg) =
+               login_existing_user($_REQUEST["user"], $_REQUEST["pass"]);
+}
+else if ($_REQUEST["action"] == "New User") {
+       list($retval, $msg) =
+               create_new_user($_REQUEST["user"], $_REQUEST["pass"]);
+}
+else {
+       echo "uuuuhhhhhhhhh....<BR>\n" ;
+}
+
+
+if ($retval == FALSE) {
+       echo "<DIV ALIGN=CENTER>", $msg, "<BR><BR>\n" ;
+       echo "<a href=\"login.php\">Try again</A><BR>\n" ;
+       echo "<a href=\"logout.php\">Log out</A><BR>\n" ;
+}
+else {
+       echo "<A HREF=\"welcome.php\">Logged in.  ";
+       echo "Click to continue if your browser does not refresh.</a><BR>";
+       echo "<meta http-equiv=\"refresh\" content=\"15;url=welcome.php\">\n";
+}
+
+bbs_page_footer();
 
-<?PHP
-       bbs_page_footer();
 ?>