Hits: 41179
Try: ca/tecreations/ViewFile.php -- Online
<?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/Base.php";
$_SESSION = array();
$email = $email_err = "";
//if (isset($_SESSION['uid'])) unset($_SESSION['uid']);
if (isset($_SESSION['email']) && !isset($_REQUEST['email'])) unset($_SESSION['email']);
if (isset($_REQUEST['email'])) {
$email = $_REQUEST['email'];
if (empty($email)) $email_err = "Empty";
else {
$_SESSION['email'] = $_REQUEST['email'];
$_SESSION['uid'] = $user->getUID($email);
$_SESSION['level'] = $user->getLevel($uid);
header("Location: $PREFIX_DIR/Login/Questions.php");
}
}
include_once $_SERVER['DOCUMENT_ROOT'] . "$PREFIX_DIR/start.php";
?>
<title>Forgotten Password Recovery</title>
<style type="text/css">
.wrapper { width: 600px; padding: 25px; }
</style>
</head>
<body>
<?php include_once $_SERVER['DOCUMENT_ROOT'] . "$PREFIX_DIR/header_start.php"; ?>
<?php include_once $_SERVER['DOCUMENT_ROOT'] . "$PREFIX_DIR/menu/login.php"; ?>
<?php include_once $_SERVER['DOCUMENT_ROOT'] . "$PREFIX_DIR/menu/register.php"; ?>
<?php include_once $_SERVER['DOCUMENT_ROOT'] . "$PREFIX_DIR/header_finish.php"; ?>
<div class="wrapper">
<center><h2>Forgotten Password Recovery</h2></center>
<p>Please enter the email address for your account.</p>
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="get">
<div class="form-group <?php echo (!empty($email_err)) ? 'has-error' : ''; ?>">
<label>Email</label>
<input type="text" name="email" class="form-control" value="<?php echo htmlspecialchars($email); ?>">
<span class="help-block"><?php echo $email_err; ?></span>
</div>
<div class="form-group">
<input type="submit" class="btn btn-primary" value="Submit">
<input type="reset" class="btn btn-default" value="Reset">
</div>
</form>
</div>
</body>
</html>