<?php
require('utilities.inc');
include('public.inc');
include_once ('header_edit.php');
$db = login_db_connect();
?>
<style>
body{background-image: none;}
#body{background-image: none;}</style>
<?php
$login = $_POST['login'];
$password = $_POST['password'];
If ($login || $password) {
if (!($login)) {
$error_message = "Please enter the login you used to join. ";
}
else if (!($password)) {
$error_message = "Please enter your password. ";
}
else {
$command = "SELECT id, login FROM abook_logins WHERE login='".addslashes($login)."'
AND password=password('".addslashes($password)."');";
$result = mysql_query($command);
if ($data = mysql_fetch_object($result)) {
$_SESSION['id'] = $data->id;
$_SESSION['login'] = $data->login;
}
else {
$error_message = "Sorry, your login was incorrect. Please contact us if you've forgotten your password.";
}
}
}
if ($_SESSION['id']==1) {
$myurl = 'localhost/ABOOK/CMS_BASIC/';
?>
<?
header("Location: downloads_unsplit.php");
//header("Location: downloads_unsplit_no_public.php");
}
else {
?>
<h1 style="color:#2f2f2f; text-align:center; font-style:italic; padding:10px; background:none;">FILE MANAGEMENT</h1>
<span style="color:red;font-size:12px;">
<?
if ($error_message) {
echo $error_message;
}
?>
</span>
<div align="center">
<form method="POST" action="login.php">
<table class="login">
<tr>
<td>
Username:
</td>
<td>
<input type="text" size=25 max=50 name="login">
</td>
</tr>
<tr>
<td>
Password:
</td>
<td>
<input type="password" size=25 max=50 name="password">
</td>
</tr>
<tr>
<td>
<input type="submit" value="SUBMIT">
</td>
</tr>
</TABLE><br>
</form></div>
<?php
}
?>
<div style="clear:both;"></div>
</div>
</div>
<div id="clear"></div>
<?php
include_once ('footer_bohemia.php');
?>