<?php
/*
script: login.php
purpose: display the login page for users of the site. The actual "login" is handled
				by the file login.inc.php, located in the "includes" directory, which is
				automatically included by the config.inc.php file.
copyright: copyright 2004 Php Image Host. All Rights Reserved. You may modify this file for use on your
					site running a licenced copy of the Php Image Host scripts.
					You must not distribute this file or derivations of it.
Nullified By CrAcKlOvE

*/

//	include config settings and initializations (database, etc)

require_once(dirname(__FILE__).'/includes/config.inc.php');

// include the site header

require_once(dirname(__FILE__).'/header.php');

if( $loggedin ){
	// if already logged in, just display the standard logged in page and exit

	require(dirname(__FILE__).'/includes/loggedin.inc.php');
}

// display the content for the login page (editable in the page content section of the admin area.

$pagecontent->display('Login');

if( $banned ){

	$pagecontent->display('IP Banned');

}else{

	// display any error messages (incorrect username / password, etc)

	if( $loginerror != '' ){
?>
<div class="errors"><?php echo $loginerror;?></div>
<?php
	}

	if( $suspended ){

		// if user is suspended, just display the suspended message

		$pagecontent->display('Suspended Message');

	}elseif( $unconfirmed ){

		// if user has not yet confirmed their account, display relevant instructions

		$pagecontent->display('Unconfirmed Message');

	}else{

		// just display the login form.

?>
<form name="loginform" action="login.php" method="post">
<div class="memberform">
<table  align="center" class="membertable" cellspacing="1" cellpadding="0" border="0">
<tr>
	<td colspan="2" class="memberheading">Login</td>
</tr>
<tr>
	<td class="memberlabel">Username:</td>
	<td class="memberfield"><input class="memberinput" type="text" name="username" value="" /></td>
</tr>
<tr>
	<td class="memberlabel">Password:</td>
	<td class="memberfield"><input class="memberinput" type="password" name="password" /></td>
</tr>
<tr>
	<td class="memberlabel">&nbsp;</td>
	<td class="memberfield"><input class="memberinput" type="submit" name="login" value="Login" /></td>
</tr>
</table>
</div>
</form>
<script language="JavaScript" type="text/javascript">
<!--
document.forms.loginform['username'].focus();
//-->
</script>

<?php

	}

}

// include the site footer.

require_once(dirname(__FILE__).'/footer.php');

?>
