Location: PHPKode > projects > DoubleSpeak > igloo-0.1/html/login.php
<?

/*
 | This file is part of the Igloo Weblog system.
 | Igloo is available under the GNU General Public
 | License.  For details on the GNU General Public
 | License, read the COPYING or the LICENSE file
 | that you received with this distribution.  If
 | you did not receive one of these files with the
 | distribution, you can find more information at
 | http://www.gnu.org.
 |
 | Igloo is the creation of Brad Johnson.  It is not
 | based on any other works.  Brad Johnson is the
 | sole owner of the copyright, but he welcomes all
 | to take the software, use it, modify it, change
 | it, or to do whatever they can do with it under
 | the provisions of the GNU General Public License.
 |
 | This software is provided as-is, with no warranty
 | whatsoever.  The author is not responsible for
 | anything that may happen as a result of your
 | using this software unless you have purchased an
 | extended warranty.  If you would like to
 | purchase an extended warranty, please contact
 | Brad Johnson via e-mail at hide@address.com
 |
 | This software may destroy your system, date your
 | sister, drink your beer, eat the last of the
 | potato chips, cause Democrats to get elected,
 | kick your dog, burn your house, wreck your car,
 | cause nuclear war, force you to kiss your
 | grandmother, or make you eat brussel sprouts.
 | You have been warned.
 |
 | If it breaks, you may feel free to keep both
 | pieces.
 */

  require "config.inc";
  require "$config[private]/local.inc";

  common_header();

  if ($check_user && $pass) {

    $validate = check_user($check_user, $pass);

    if ($validate) {

      $Results = do_mysql_query("SELECT * FROM users WHERE nickname='$check_user'")
        or die("I could not SELECT FROM the database\n");
      $Row = mysql_fetch_array($Results);
      mysql_free_result($Results);
      $uid = $Row[id];

      print "           <tr>\n";
      print "             <td>\n";
      print "               Welcome back, $Row[nickname]!\n";
      print "             </td>\n";
      print "           </tr>\n";

    } else {

      print "            <tr>\n";
      print "              <td>\n";
      print "                Your user id could not be validated.  Either you mis-typed\n";
      print "                your password, or you don't have an account.  If you need\n";
      print "                to create an account, please click <a href=\"/ui/create_acct.php\">\n";
      print "                here</a>\n";
      print "              </td>\n";
      print "            </tr>\n";
      login_form();

    }

  } else {

    login_form();
  
  }

  common_footer();

?>
Return current item: DoubleSpeak