<?php
/**
 * index.php
 *
 * This is an example of the main page of a website. Here
 * users will be able to login. However, like on most sites
 * the login form doesn't just have to be on the main page,
 * but re-appear on subsequent pages, depending on whether
 * the user http://file-manager.000webhost.com/index.php
 * has logged in or not.
 *
 * Written by: Xbl Blue
 * Last Updated: March 2, 2011
 */
include("core/session.php");

/**
 * User has already logged in, so display relavent links, including
 * a link to the admin center if the user is an administrator.
 */
if($session->logged_in){
    Header("Location: main.php");
}
?>

<html>
<body style="text-align:center">
<link href="include/login.css" rel="stylesheet" type="text/css" />
<title>PhantaC Login</title>
<?php
/**
 * User not logged in, display the login form.
 * If user has already tried to login, but errors were
 * found, display the total number of errors.
 * If errors occurred, they will be displayed.
 */
if($form->num_errors > 0){
   echo "<font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font>";
}
?>
<br>
<br>
<br>
<br>
<br>
<br>
<form id="loginForm" name="loginForm" action="core/process.php" method="POST">
  <table width="500" border="0" align="center" cellpadding="2" cellspacing="0">

	 <tr>
  		<td align="center" colspan=2>
                    <img alt=""  src="images/login.png" />
		</td>
	 </tr>

    <tr>
      <td width="112" align="right"><b>Login</b></td>
      <td width="188"><input name="user" type="text" maxlength="30" value="<?php echo $form->value("user"); ?>"/>
	  </td>
	  <td>
	  <?php echo $form->error("user"); ?>
	  </td>
    </tr>

    <tr>
      <td align="right"><b>Password</b></td>
      <td><input type="password" name="pass" maxlength="30" value="<?php echo $form->value("pass"); ?>"></td>
	  	  <td>
	  <?php echo $form->error("pass"); ?>
	  </td>
    </tr>


	<tr>
	<td colspan="2" align="left">&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="checkbox" name="remember" <?php if($form->value("remember") != ""){ echo "checked"; } ?>/>

<font size="2">Remember me</font> &nbsp;&nbsp;&nbsp;&nbsp;
<input type="hidden" name="sublogin" value="1">
<input type="submit" value="Login">
</td>
</tr>

<tr>
<td colspan="2" align="left">
<br>
<font size="2">[<a href="user/forgotpass.php">Forgot Password?</a>]</font>
</td>
</tr>

  </table>
</form>
</body>
<br><br><br><br><br><br><br><br>
<div id="footer">
<div id="footer-content">
Copyright &copy; 2011 - 2012, PhantaC Booter. Coded by Xbl Blue&trade; <br />
<p style="text-align: center;">
<strong><?php echo date(DATE_RFC822); ?></strong>.</p>
</div>
</div>
</html>