Open auth.php
At the bottom, before ?> add:
Code:
// Force Login
if ($login == '')
func_header_location($http_location);
This will prevent the user from accessing the cart without being logged in.
Open your .htaccess file and set the DirectoryIndex to index.php:
Code:
DirectoryIndex index.php home.php index.html
Create an index.php and input a login form page, something like:
Code:
<?php
require "./top.inc.php";
require "./init.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Your Home Page Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="/login/skin1/skin1.css" />
</head>
<body>
<table width="100%" height="100%">
<tr>
<td align="center" valign="middle">
<h1>Your Home Page Title</h1>
<p>Your Message</p>
<form action="<?php echo $https_location; ?>/include/login.php" method="post" name="authform">
<input type="hidden" name="mode" value="login" />
<input type="hidden" name="usertype" value="C" />
<input type="hidden" name="redirect" value="customer" />
<div style="padding: 10px; background-color: #E5E5E5; width: 400px;">
<table cellpadding="2" cellspacing="2">
<tr>
<td>Username:</td>
<td><input type="text" name="username" size="16" value="" /></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password" size="16" maxlength="64" value="" /></td>
</tr>
<tr>
<td colspan="2" align="right">
<input type="submit" name="login" value="Login" />
</td>
</tr>
</table>
</div>
</form>
</td>
</tr>
</table>
</body>
</html>
I would also customize this page and your include/login.php to send them back to this index.php with an error message when a login is incorrect, etc., but this should get you going in the right direction.