Location: PHPKode > projects > top serious project > bco/login.php

 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.


if ((isset($_POST)) && ($_POST['submit'] == "login")) {
    if (bco_login($_POST)) {
		header("Location: " . $GLOBALS['base_url'] . urldecode($_POST['refer']));
	} else {
		exit("This is bad.");	

if ((!isset($_GET['back'])) || ($_GET['back'] == "")) {
	$back = "index.php";
} else {
	$back = urlencode($_GET['back']);

bco_html_header("Login - " . BOARD_TITLE);


echo <<< END
<a href="reset_password.php">Forgot your password?</a>
<form method="post" action="$PHP_SELF">
<table width="100%" cellpadding="2" cellspacing="0" class="replytable">
        <td width="100" align="right">username:</td>
        <td align="left"><input type="text" name="username" maxlength="25" size="18" class="textfield" /></td>
        <td width="100" align="right">password:</td>
        <td align="left"><input type="password" name="password" maxlength="25" size="18" class="textfield" /></td>
        <td width="100" align="right">length:</td>
        <td align="left">
        <input type="radio" name="time" value="session" checked="checked" />session
        <input type="radio" name="time" value="day" />day
        <input type="radio" name="time" value="month" />month
        <input type="radio" name="time" value="year" />year
        <td width="100" align="right">&nbsp;</td>
        <td align="left"><input type="submit" name="submit" value="login" class="button" /></td>
<input type="hidden" name="refer" value="$back" />


Return current item: top serious project