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. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.*/ //////////////////////////////////////////////////////////////////////// ob_start(); session_start(); require('include/functions.inc.php'); $db = dbConnect(); if(check_install() == "1") { header('Location: install/install.php'); } else { if(isset($_SESSION['username']) && $db->numRows("SELECT * FROM members WHERE username = '".$_SESSION['username']."'") > 0) { header('Location: home.php'); } else { ?> SMI Login

SMI Login '; } ?>
Username :
Password :
   
$_POST['username'], 'event' => $_POST['username'].'logged in from '.getenv('REMOTE_ADDR'), 'timestamp' => $timestamp ); } else { $error = "Invalid username or password, try again"; echo form($error); } } } else { if(isset($_GET['logout'])) { session_destroy(); $error = "Logged Out Success - Try Again"; echo form($error); } else { if (isset($_SESSION['username'])) { if (login_check($_SESSION['username'],$_SESSION['password'])) { } else { $error = "Please Login"; echo form($error); } } else { $error = "Welcome, Please Login"; echo form($error); } } } ?>