Importación inicial

git-svn-id: https://192.168.0.254/svn/Proyectos.LaFactoriaVerde_Web/trunk@1 017afc1c-778d-45dc-8efe-cc7a6876851a
This commit is contained in:
David Arranz 2010-07-21 17:15:00 +00:00
commit 15a736b810
60 changed files with 3835 additions and 0 deletions

19
activate.html Normal file
View File

@ -0,0 +1,19 @@
<HTML>
<HEAD>
<TITLE>Activar cuenta</TITLE>
</HEAD>
<BODY>
<H1><font face="Verdana" size="4" color="#2852A8">Activar tu cuenta</font></H1>
<FORM METHOD="POST" ACTION="redirect.php">
<P><font face="Verdana" size="2" color="#2852A8"><STRONG>Usuario:</STRONG><BR>
</font><font color="#2852A8" face="Verdana">
<INPUT TYPE="text" NAME="username" SIZE=25 MAXLENGTH=25></font></p>
<P><font face="Verdana" size="2" color="#2852A8"><STRONG>Contraseña:</STRONG><BR>
</font><font color="#2852A8" face="Verdana">
<INPUT TYPE="password" NAME="password" SIZE=25 MAXLENGTH=25></font></p>
<input type="hidden" name="activate" value="Yes"></p>
<P><font color="#2852A8">
<INPUT TYPE="submit" NAME="submit" VALUE="Activar" style="font-family: Verdana"></font></P>
</FORM>
</BODY>
</HTML>

160
admin/adduser.php Normal file
View File

@ -0,0 +1,160 @@
<?
//prevents caching
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
session_start();
//require the config file
require ("../config.php");
require ("../functions.php");
if ($page == ""){$page = 1;}
if ($max_results == ""){$max_results = 5;}
//check required fields
if (($_POST[username] == ""))
{
echo "The Username Field can not be left blank. Please <a href=\"adminpage.php?page=$page&max_results=$max_results\">Go Back</a> and re-enter the information";
exit;
}
//check the password length
$pass_len = password_check($min_pass, $max_pass, $_POST[password]);
if ($pass_len == "no")
{
echo "<p>You must use a password between $min_pass and $max_pass characters in length, please <a href=\"adminpage.php?page=$page&max_results=$max_results\">Go Back </a>and try again.</p>";
exit;
}
//check for authority to view this page
if (allow_access(Administrators) != "yes")
{
echo "not authorized to perform this function";
}
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//make query to database
$sql ="SELECT * FROM $table_name WHERE username= '$_POST[username]'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
//get the number of rows in the result set
$num = mysql_num_rows($result);
//check if that username already exists
if ($num != 0){
echo "<P>Sorry, that username already exists.</P>";
echo "<P><a href=\"#\" onClick=\"history.go(-1)\">Try Another Username.</a></p>";
echo "$_POST[username]";
exit;
}else{
//or add it to the database
$sql_add = "INSERT INTO $table_name (firstname, lastname, username, password, group1, group2, group3,
pchange, email, redirect, verified, last_login) VALUES
('$_POST[firstname]', '$_POST[lastname]', '$_POST[username]', password('$_POST[password]'),
'$_POST[group1]', '$_POST[group2]', '$_POST[group3]', '$_POST[pchange]', '$_POST[email]',
'$_POST[redirect]', '1', 'last_login()')";
$result = @mysql_query($sql_add,$connection) or die(mysql_error());
}
if ($_POST[email_user] == "Yes")
{
$mailheaders = "From: $domain\n";
$mailheaders .= "Dear $_POST[firstname] $_POST[lastname],\n";
$mailheaders .= "\n";
$mailheaders .= "An account has been created for you at $domain.\n";
$mailheaders .= "Please log in with the following account information:\n";
$mailheaders .= "Username: $_POST[username]\n";
$mailheaders .= "Password: $_POST[password]\n";
$mailheaders .= "\n";
$mailheaders .= "Please login at:\n";
$mailheaders .= "$base_dir/login.html\n";
$mailheaders .= "Should you have any complications, please email the System Administrator at:\n";
$mailheaders .= "$adminemail\n";
$to = "$_POST[email]";
$subject = "Your account has been created !!";
mail($to, $subject, $mailheaders, "From: No Reply <$adminemail>\n");
}
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel="stylesheet" type="text/css" href="adminpage.css">
<meta http-equiv="refresh" content="5; url=adminpage.php">
<title>Add User</title>
</head>
<body>
<p><b><font face="Tahoma">User Added:</font></b></p>
<table border="1" id="table1">
<tr>
<td width="154"><font face="Tahoma" size="2">First Name:</td>
<td><?php echo $_POST[firstname]; ?></font></td>
</tr>
<tr>
<td width="154"><font face="Tahoma" size="2">Last Name:</td>
<td><?php echo $_POST[lastname]; ?></font></td>
</tr>
<tr>
<td width="154"><font face="Tahoma" size="2">Username:</td>
<td><?php echo $_POST[username]; ?></font></td>
</tr>
<tr>
<td width="154"><font face="Tahoma" size="2">Password:</td>
<td><?php echo $_POST[password]; ?></font></td>
</tr>
<tr>
<tr>
<td width="154"><font face="Tahoma" size="2">E-Mail:</td>
<td><?php echo $_POST[email]; ?></font></td>
</tr>
<td width="154"><font face="Tahoma" size="2">Group Memberships:</td>
<td><?php echo $_POST[group1]; ?>&nbsp;</td>
</tr>
<tr>
<td width="154">&nbsp;</td>
<td><?php echo $_POST[group2]; ?>&nbsp;</td>
</tr>
<tr>
<td width="154">&nbsp;</td>
<td><?php echo $_POST[group3]; ?>&nbsp;</font></td>
</tr>
<tr>
<td width="154"><font face="Tahoma" size="2">Redirect to:</font></td>
<td><?php echo $_POST[redirect]; ?></font></td>
</tr>
<tr>
<td width="154"><font face="Tahoma" size="2">Password Change Req'd:</td>
<td><?php if($_POST[pchange] == "1"){$ans1="Yes";}else{$ans1="No";} echo $ans1; ?></td>
</tr>
<tr>
<td width="154"><font face="Tahoma" size="2">User E-Mailed:</td>
<td><?php echo $_POST[email_user]; ?></font></td>
</tr>
</table>
</body>
</html>

BIN
admin/admin_add.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
admin/admin_add_up.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
admin/admin_mod.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
admin/admin_mod_up.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
admin/admin_options.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
admin/admin_options_up.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

10
admin/adminpage.css Normal file
View File

@ -0,0 +1,10 @@
a:active { font-family: Verdana; font-size: 8pt; color: #800000; text-decoration: none}
a:hover { font-family: Verdana; font-size: 8pt; color: #800000; text-decoration:
overline underline }
a:link { font-family: Verdana; font-size: 8pt; text-decoration: none; color: #800000 }
a:visited { font-family: Verdana; font-size: 8pt; text-decoration: none; color: #800000 }
body { font-family: Verdana; font-size: 8pt }
html { font-family: Verdana; font-size: 8pt }
table { font-family: Verdana; font-size: 8pt }
option { font-family: Verdana; font-size: 8pt }
input { font-family: Verdana; font-size: 8pt }

993
admin/adminpage.php Normal file
View File

@ -0,0 +1,993 @@
<?php
//prevents caching
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
session_start();
require('../config.php');
require('../functions.php');
//check for administrative rights
if (allow_access(Administrators) != "yes")
{
include ('../no_access.html');
exit;
}
//make connection to dbase
$connection = @mysql_connect($server, $dbusername, $dbpassword)
or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)
or die(mysql_error());
//build and issue the query
$sql ="SELECT * FROM $table_name";
$result = @mysql_query($sql,$connection) or die(mysql_error());
?>
<head>
<meta http-equiv="Content-Language" content="en-us">
<link rel="stylesheet" type="text/css" href="adminpage.css">
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<table border="0" width="100%" id="table1">
<tr>
<td align="center">
<table border="0" width="800" id="table2" cellspacing="0" cellpadding="0">
<tr>
<td width="280">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td width="280"><b><font size="2">Panel de control</font></b></td>
<td align="right"><i><a href="../logs/index.php">Ver el registro de accesos</a></i></td>
</tr>
<tr>
<td width="280">Sesión iniciada como <?php echo $_SESSION[user_name]; ?></td>
<td align="right"><i><a href="../logout.php">Salir</a></i></td>
</tr>
<tr>
<td width="280">&nbsp;</td>
<td>
<p align="right"><i><a href="mail_all.htm">Mandar e-mail a todos los usuarios</a></i></td>
</tr>
<tr>
<td width="280" valign="top">
<table border="0" width="100%" id="table3" cellspacing="0" cellpadding="0">
<tr>
<td width="38%" valign="top">
<table border="0" width="100%" id="table38" cellspacing="0" cellpadding="0">
<tr>
<td>
<?php
if ($_POST[alter2] == "add")
{
?>
<form method="POST" action="<?php $PHP_SELF; ?>">
<p><input type="hidden" name="alterup2" value="up"><input type="image" img src="admin_add_up.gif" ></p>
</form>
<?php
}else
{
?>
<form method="POST" action="<?php $PHP_SELF; ?>">
<p><input type="hidden" name="alter2" value="add"><input type="image" img src="admin_add.gif" ></p>
</form>
<?php
}
?>
</td>
</tr>
<tr>
<td>
<?php
if ($_POST[alter2] == "add")
{
?>
<form method="POST" action="<? echo "adduser.php?page=$page&max_results=$max_results"; ?>">
<font size="1" face="Tahoma">
<table border="1" width="100%" id="table44" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF">
<tr>
<td width="140">Nombre:</td>
<td><font size="1" face="Tahoma">
<input type="text" name="firstname" size="20"></font></td>
</tr>
<tr>
<td width="140">Apellidos:</td>
<td><font size="1" face="Tahoma">
<input type="text" name="lastname" size="20"></font></td>
</tr>
<tr>
<td width="140">Usuario:</td>
<td><font size="1" face="Tahoma">
<input type="text" name="username" size="20"></font></td>
</tr>
<tr>
<td width="140">Contraseña:</td>
<td><font size="1" face="Tahoma">
<input type="text" name="password" size="20" maxlength="667"></font></td>
</tr>
<tr>
<td width="140">E-Mail:</td>
<td><font size="1" face="Tahoma">
<input type="text" name="email" size="20"></font></td>
</tr>
<tr>
<td width="140">Grupo:</td>
<td><font size="1" face="Tahoma">
<select size="1" name="group1">
<?php
echo "<option>Usuarios</option>";
$i = 0;
while ($i < $num_groups)
{
echo "<option value=\"$group_array[$i]\">$group_array[$i]</option>";
$i++;
}
?>
</select></font></td>
</tr>
<tr>
<td width="140">&nbsp;</td>
<td><font size="1" face="Tahoma">
<select size="1" name="group2">
<?php
echo "<option></option>";
$i = 0;
while ($i < $num_groups)
{
echo "<option value=\"$group_array[$i]\">$group_array[$i]</option>";
$i++;
}
?>
</select></font></td>
</tr>
<tr>
<td width="140">&nbsp;</td>
<td><font size="1" face="Tahoma">
<select size="1" name="group3">
<?php
echo "<option></option>";
$i = 0;
while ($i < $num_groups)
{
echo "<option value=\"$group_array[$i]\">$group_array[$i]</option>";
$i++;
}
?>
</select></font></td>
</tr>
<tr>
<td width="140">Redirigir a:</td>
<td><font size="1" face="Tahoma">
<input type="text" name="redirect" size="20" value="http://"></font></td>
</tr>
<tr>
<td width="140">Obligar a cambiar la contraseña en el siguiente inicio de sesión:</td>
<td><font size="1" face="Tahoma">
<select size="1" name="pchange">
<option value="0" selected>No</option>
<option value="1">Si</option>
</select></font></td>
</tr>
<tr>
<td width="140">E-Mail User Account
Information:</td>
<td><font size="1" face="Tahoma">
<select size="1" name="email_user">
<option value="No" selected>No</option>
<option value="Yes">Si</option>
</select></font></td>
</tr>
<tr>
<td width="140"><font size="1" face="Tahoma">
<input type="submit" value="Submit" name="B4"></font></td>
<td>&nbsp;</td>
</tr>
</table>
</font>
</td>
</tr>
<tr>
</form>
<?php
}
?>
</tr>
<tr>
<td><font size="1" face="Tahoma">
<?php
if ($_POST[alter1] == "modify" || $_POST[username] != "")
{
?>
<form method="POST" action="<? $PHP_SELF; ?>">
<p>
<input type="hidden" name="alter1" size="20" value="up"><input type="image" img src="admin_mod_up.gif" value="Enviar" alt="Enviar"></p>
</form>
<?php
}
else{
?>
<form method="POST" action="<? $PHP_SELF; ?>">
<p>
<input type="hidden" name="alter1" size="20" value="modify"><input type="image" img src="admin_mod.gif" value="Enviar" alt="Enviar"></p>
</form>
<?php
}
?>
</td>
<?
if (($_POST[alter1] == "modify") || ($_POST[username] != ""))
{
?>
<tr>
<td>
<font size="1" face="Tahoma">
<form name="myform" id="myform" action="<? $PHP_SELF; ?>" method="POST">
<table border="1" width="100%" id="table41" cellspacing="0" cellpadding="0" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF">
<tr>
<td width="140">Username:</td>
<td><font size="1" face="Tahoma">
<select size="1" name="username" onChange="document.myform.submit()">
<?
if ($_POST[username] != "")
{
echo "<option>$_POST[username]</option>";
echo "<option value=\"\"></option>";
}
else
{
echo "<option></option>";
}
//require the config file
require ("../config.php");
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//build and issue the query
$sql ="SELECT * FROM $table_name";
$result = @mysql_query($sql,$connection) or die(mysql_error());
while ($sql = mysql_fetch_object($result))
{
$uname = $sql -> username;
echo "<option value=\"$uname\">$uname</option>";
}
?>
</select></font></td>
</tr>
</table>
</form>
</font>
</td>
</tr>
<?php
if ($_POST[username] != "")
{
//require the config file
require ("../config.php");
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//build and issue the query
$sql ="SELECT * FROM $table_name WHERE username = '$_POST[username]'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
while ($sql = mysql_fetch_object($result))
{
$m_first = $sql -> firstname;
$m_last = $sql -> lastname;
$g_1 = $sql -> group1;
$g_2 = $sql -> group2;
$g_3 = $sql -> group3;
$chng = $sql -> pchange;
$m_email = $sql -> email;
$direct = $sql -> redirect;
}
?>
<tr>
<td>
<form method="POST" action="mod_user.php">
<font size="1" face="Tahoma">
<table border="1" width="100%" id="table1" cellspacing="0" cellpadding="0" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF">
<tr>
<td width="140">Nombre:</td>
<td><font size="1" face="Tahoma">
<input type="hidden" name="username" value="<? echo $_POST[username]; ?>">
<input type="text" name="mod_first" value="<? echo $m_first; ?>" size="20"></font></td>
</tr>
<tr>
<td width="140">Apellidos:</td>
<td><font size="1" face="Tahoma">
<input type="text" name="mod_last" value="<? echo $m_last; ?>" size="20"></font></td>
</tr>
<tr>
<td width="140">
Contraseña:</td>
<td><font size="1" face="Tahoma">
<input type="text" name="mod_pass" size="20" value="Same as Old"></font></td>
</tr>
<tr>
<td width="140">
E-Mail:</td>
<td><font size="1" face="Tahoma">
<input type="text" name="mod_email" value="<? echo $m_email; ?>" size="20"></font></td>
</tr>
<tr>
<td width="140">
Grupo:</td>
<td><font size="1" face="Tahoma">
<select size="1" name="mod_group1">
<?php
echo "<option>$g_1</option>";
$i = 0;
while ($i < $num_groups)
{
echo "<option value=\"$group_array[$i]\">$group_array[$i]</option>";
$i++;
}
?>
</select></font></td>
</tr>
<tr>
<td width="140">
&nbsp;</td>
<td><font size="1" face="Tahoma">
<select size="1" name="mod_group2">
<?php
echo "<option>$g_2</option>";
$i = 0;
while ($i < $num_groups)
{
echo "<option value=\"$group_array[$i]\">$group_array[$i]</option>";
$i++;
}
?>
</select></font></td>
</tr>
<tr>
<td width="140">
&nbsp;</td>
<td><font size="1" face="Tahoma">
<select size="1" name="mod_group3">
<?php
echo "<option>$g_3</option>";
$i = 0;
while ($i < $num_groups)
{
echo "<option value=\"$group_array[$i]\">$group_array[$i]</option>";
$i++;
}
?>
</select></font></td>
</tr>
<tr>
<td width="140">
Redirigir a:</td>
<td><font size="1" face="Tahoma">
<input type="text" name="mod_redirect" value="<? echo $direct; ?>" size="20"></font></td>
</tr>
<tr>
<td width="140">
Obligar a cambiar la contraseña en el siguiente inicio de sesión:</td>
<td><font size="1" face="Tahoma">
<select size="1" name="mod_chng">
<option value="0" selected>No</option>
<option value="1">Yes</option>
</select></font></td>
</tr>
<tr>
<td width="140">
E-Mail User Account Information:</td>
<td><font size="1" face="Tahoma">
<select size="1" name="mod_send">
<option value="No" selected>No</option>
<option value="Yes">Yes</option>
</select></font></td>
</tr>
<tr>
<td width="140">
<font size="1" face="Tahoma">
<input type="submit" value="Enviar" name="B5"></font></td>
<td>&nbsp;</td>
</tr>
</table>
</font>
</form>
</td>
</tr>
<?php
}
?>
<?
}
?>
</td>
</tr>
<tr>
<td width="38%">
<?php
if ($_POST[alter] == "options")
{
?>
<form method="POST" action="<?php $PHP_SELF; ?>">
<p>
<input type="hidden" name="alter" value="up">
<input type="image" src="admin_options_up.gif" value="Enviar" alt="Enviar"></p>
</form>
<?php
}
else
{
?>
<form method="POST" action="<?php $PHP_SELF; ?>">
<p>
<input type="hidden" name="alter" value="options">
<input type="image" src="admin_options.gif" value="Enviar" alt="Enviar"></p>
</form>
<?php
}
?>
</td>
</tr>
<tr>
<td width="33%" valign="top" height="0">
<?php
if ($_POST[alter] == "options")
{
?>
<form method="POST" action="mod_user.php">
<table border="1" width="100%" id="table43" cellspacing="0" cellpadding="0" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF">
<tr>
<td width="140">Borrar usuario</td>
<td>
<font size="1" face="Tahoma">
<select size="1" name="del_user">
<option></option>
<?php
//require the config file
require ("../config.php");
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//build and issue the query
$sql ="SELECT username FROM $table_name ORDER BY username";
$result = @mysql_query($sql,$connection) or die(mysql_error());
while ($sql = mysql_fetch_object($result))
{
$uname = $sql -> username;
if ($uname != $_SESSION[user_name])
{
echo "<option value=\"$uname\">$uname</option>";
}
}
?>
</select></font></td>
</tr>
<tr>
<td width="140">Restaurar usuario</td>
<td>
<font size="1" face="Tahoma">
<select size="1" name="restore">
<option></option>
<?php
//require the config file
require ("../config.php");
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//build and issue the query
$sql ="SELECT username FROM trash ORDER BY username";
$result = @mysql_query($sql,$connection) or die(mysql_error());
while ($sql = mysql_fetch_object($result))
{
$uname = $sql -> username;
if ($uname != $_SESSION[user_name])
{
echo "<option value=\"$uname\">$uname</option>";
}
}
?>
</select></font></td>
</tr>
<tr>
<td width="140">Banear usuario</td>
<td>
<font size="1" face="Tahoma">
<select size="1" name="ban_user">
<option></option>
<?php
//require the config file
require ("../config.php");
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//build and issue the query
$sql ="SELECT username FROM $table_name ORDER BY username";
$result = @mysql_query($sql,$connection) or die(mysql_error());
while ($sql = mysql_fetch_object($result))
{
$uname = $sql -> username;
if ($uname != $_SESSION[user_name])
{
echo "<option value=\"$uname\">$uname</option>";
}
}
?>
</select></font></td>
</tr>
<tr>
<td width="140">Bloquear dirección IP</td>
<td>
<font size="1" face="Tahoma">
<input type="text" name="oct1" size="3" maxlength="3"></font>.<font size="1" face="Tahoma"><input type="text" name="oct2" size="3" maxlength="3"></font><font face="Tahoma">.</font><font size="1" face="Tahoma"><input type="text" name="oct3" size="3" maxlength="3"><font face="Tahoma">.</font><input type="text" name="oct4" size="3" maxlength="3"></font></td>
</tr>
<tr>
<td width="140">Lift User Ban</td>
<td>
<font size="1" face="Tahoma">
<select size="1" name="lift_user_ban">
<option></option>
<?php
//require the config file
require ("../config.php");
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//build and issue the query
$sql ="SELECT * FROM banned WHERE type = 'user'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
while ($sql = mysql_fetch_object($result))
{
$banned = $sql -> no_access;
echo "<option value=\"$banned\">$banned</option>";
}
?>
</select></font></td>
</tr>
<tr>
<td width="140">Lift IP Ban</td>
<td>
<font size="1" face="Tahoma">
<select size="1" name="lift_ip_ban">
<option></option>
<?php
//require the config file
require ("../config.php");
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//build and issue the query
$sql ="SELECT * FROM banned WHERE type = 'ip'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
while ($sql = mysql_fetch_object($result))
{
$banned = $sql -> no_access;
echo "<option value=\"$banned\">$banned</option>";
}
?>
</select></font></td>
</tr>
<tr>
<td width="140">Vaciar la papelera</td>
<td><font size="1" face="Tahoma">
<select size="1" name="empt_trash">
<option></option>
<option value="yes">Si</option>
</select></font></td>
</tr>
<tr>
<td width="140">Purgar cuentas inactivas desde</td>
<td><select size="1" name="amt_time">
<option></option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select><font size="1" face="Tahoma"><select size="1" name="incr_time">
<option></option>
<option value="DAY">días</option>
<option value="MONTH">meses</option>
<option value="YEAR">años</option>
</select></font></td>
</tr>
<tr>
<td width="140"><font size="1" face="Tahoma">
<input type="submit" value="Enviar" name="B6"></font></td>
<td>&nbsp;</td>
</tr>
</table>
</form>
<?php
}
?>
</td>
</tr>
<tr>
<td width="38%">
&nbsp;</td>
</tr>
<tr>
<td width="38%">
&nbsp;</td>
</tr>
<tr>
<td width="38%">
&nbsp;</td>
</tr>
<tr>
<td width="38%">
&nbsp;</td>
</tr>
<tr>
<td width="38%">
&nbsp;</td>
</tr>
<tr>
<td width="38%">
&nbsp;</td>
</tr>
<tr>
<td width="38%">
&nbsp;</td>
</tr>
<tr>
<td width="38%">
&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td valign="top">
<?
if ($user_det == "")
{
if (!isset($_GET['max_results']))
{
$max_results = 5;
}else{
$max_results = $_GET['max_results'];
}
if(!isset($_GET['page'])){
$page = 1;
} else {
$page = $_GET['page'];
}
if (isset($_GET['search']))
{
$s_string = $_GET['search'];
$explodeit = explode(" ", "$s_string");
$c = count($explodeit);
if ($c > 1)
{
for ($i=0; $i<$c; $i++)
{
$search = $explodeit[$i]."+";
}
}else{
$search = $s_string;
}
}
echo "Show Number of Results Per Page: <a href=\"".$_SERVER['PHP_SELF']."?page=$page&max_results=5&search=$search\">5</a>";
echo " <a href=\"".$_SERVER['PHP_SELF']."?page=$page&max_results=10&search=$search\">10</a><br>";
// Figure out the limit for the query based
// on the current page number.
$from = (($page * $max_results) - $max_results);
// Perform MySQL query on only the current page number's results
if (!isset($_GET['search']))
{
$set_lim = "SELECT * FROM $table_name ORDER BY username LIMIT $from, $max_results";
}else{
$search = $_GET['search'];
$set_lim = "SELECT * FROM $table_name WHERE username LIKE '%$search%' || firstname LIKE '%$search%'
|| lastname LIKE '%$search%' || group1 LIKE '%$search%' || group2 LIKE '%$search%' || group3 LIKE '%$search%'
|| email LIKE '%$search%' ORDER BY username LIMIT $from, $max_results";
}
$set_res = @mysql_query($set_lim,$connection) or die(mysql_error());
while ($set_lim = mysql_fetch_object($set_res))
{
$fname = $set_lim -> firstname;
$lname = $set_lim -> lastname;
$uname = $set_lim -> username;
$p_change = $set_lim -> pchange;
$verif_d = $set_lim -> verified;
$last = $set_lim -> last_login;
$re_direct = $set_lim -> redirect;
$groupA = $set_lim -> group1;
$groupB = $set_lim -> group2;
$groupC = $set_lim -> group3;
$e_mail = $set_lim -> email;
if ($p_change == 1)
{$p_change = "Yes";}else{$p_change = "No";}
if ($verif_d == "0")
{$verif_d= "No";}else{$verif_d= "Yes";}
echo "<table border=\"1\" width=\"100%\" id=\"table5\">";
echo "<tr>";
echo "<td width=\"100\"><b><a href=\"".$SERVER['PHP_SELF']."?user_det=$uname&ret_page=$page&ret_max=$max_results&search=$search\">$uname</a></b></td>";
echo "<td width=\"80\">E-Mail:</font></td>";
echo "<td><a href=\"mailto:$e_mail\">$e_mail</a></td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"100\">&nbsp;</td>";
echo "<td width=\"100\">Name:</td>";
echo "<td>$fname $lname</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=\"100\">&nbsp;</td>";
echo "<td width=\"100\">Last Login:</td>";
echo "<td>$last</td>";
echo "</tr>";
echo "</table>";
}
// Figure out the total number of results in DB:
if (!isset($_GET['search']))
{
$total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM authorize"),0);
}else{
$total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM authorize
WHERE username LIKE '%$search%' || firstname LIKE '%$search%'
|| lastname LIKE '%$search%' || group1 LIKE '%$search%' || group2 LIKE '%$search%' || group3 LIKE '%$search%'
|| email LIKE '%$search%'"),0);
}
// Figure out the total number of pages. Always round up using ceil()
$total_pages = ceil($total_results / $max_results);
// Build Page Number Hyperlinks
echo "<center>Select a Page<br />";
// Build Previous Link
if($page > 1){
$prev = ($page - 1);
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$prev&max_results=$max_results&search=$search\">&lt;&lt;&nbsp;&nbsp; </a> ";
}
for($i = 1; $i <= $total_pages; $i++){
if(($page) == $i){
echo "$i ";
} else {
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$i&max_results=$max_results&search=$search\">$i</a> ";
}
}
// Build Next Link
if($page < $total_pages){
$next = ($page + 1);
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$next&max_results=$max_results&search=$search\">&nbsp;&nbsp; &gt;&gt;</a>";
}
echo "</center>";
}else{
echo "<b>Details for $user_det</b><br>";
$dsql = "SELECT * FROM $table_name WHERE username = '$user_det'";
$dresults = @mysql_query($dsql,$connection) or die(mysql_error());
while ($dsql = mysql_fetch_object($dresults))
{
$fname = $dsql -> firstname;
$lname = $dsql -> lastname;
$uname = $dsql -> username;
$p_change = $dsql -> pchange;
$verif_d = $dsql -> verified;
$last = $dsql -> last_login;
$re_direct = $dsql -> redirect;
$groupA = $dsql -> group1;
$groupB = $dsql -> group2;
$groupC = $dsql -> group3;
$e_mail = $dsql -> email;
if ($p_change == "0")
{
$p_change = "No";
}else{
$p_change = "Yes";
}
if ($verif_d == "0")
{
$verif_d = "No";
}else{
$verif_d = "Yes";
}
?>
<table border="1" width="100%" id="table1" bordercolorlight="#FFFFFF" bordercolordark="#C0C0C0">
<tr>
<td width="100" rowspan="10" valign="top"><? echo $uname; ?></td>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td width="177">E-Mail:</td>
<td><a href="<? echo $e_mail; ?>"><? echo $e_mail; ?></a></td>
</tr>
<tr>
<td width="177">Real Name:</td>
<td><? echo "$fname $lname &nbsp;"; ?></td>
</tr>
<tr>
<td width="177">Last Login:</td>
<td><? echo $last; ?>&nbsp;</td>
</tr>
<tr>
<td width="177">Password Change Required:</td>
<td><? echo $p_change; ?>&nbsp;</td>
</tr>
<tr>
<td width="177">Verified Through E-Mail:</td>
<td><? echo $verif_d; ?>&nbsp;</td>
</tr>
<tr>
<td width="177">Group Memberships:</td>
<td><? echo $groupA; ?>&nbsp;</td>
</tr>
<tr>
<td width="177">&nbsp;</td>
<td><? echo $groupB; ?>&nbsp;</td>
</tr>
<tr>
<td width="177">&nbsp;</td>
<td><? echo $groupC; ?>&nbsp;</td>
</tr>
<tr>
<td width="177">Redirect to:</td>
<td><? echo $re_direct; ?></td>
</tr>
</table>
<center><a href="<? echo $_SERVER['PHP_SELF']."?page=$ret_page&max_results=$ret_max&search=$search"; ?>">Back to List</a></center>
<?
}}
if ($search != "")
{
if ($ret_max)
{ $page=$ret_page; $max_results=$ret_max; }
echo "<center><a href=\"".$_SERVER['PHP_SELF']."?page=$page&max_results=$max_results\">Exit Search</a>";
}else{
echo "<br><br>";
}
?>
<center>
<form method="GET" action="<? echo $_SERVER['PHP_SELF']."?page=$page&max_results=$max_results&search="; ?>"><p>Search
<input type="text" name="search" size="20"><input type="submit" value="Submit" name="B1"></p>
</form>
</center>
</td>
</tr>
</table>

24
admin/mail_all.htm Normal file
View File

@ -0,0 +1,24 @@
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>E-Mail Subject</title>
<link rel="stylesheet" type="text/css" href="adminpage.css">
</head>
<body>
<form method="POST" action="mail_all.php">
<p>E-Mail Subject:<br>
<input type="text" name="e_subject" size="20"><br>
From Line to Read:<br>
<input type="text" name="e_from" size="20"><br>
Message:<br>
<textarea rows="15" name="e_message" cols="76"></textarea><br>
<input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>

40
admin/mail_all.php Normal file
View File

@ -0,0 +1,40 @@
<?
//prevents caching
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
session_start();
//require config and functions files
require('../config.php');
require('../functions.php');
//check for administrative rights
if (allow_access(Administrators) != "yes")
{
include ('../no_access.html');
exit;
}
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//make the dbase query selecting only email address
$sql ="SELECT * FROM $table_name";
$result = @mysql_query($sql,$connection) or die(mysql_error());
echo "Your Message Has Been Sent to the Following Users:<br><br>";
while ($sql = mysql_fetch_object($result))
{
$e_addr = $sql -> email;
$e_user = $sql -> username;
$subject = $_POST[e_subject];
$mailheaders = $_POST[e_message];
mail($e_addr, $subject, $mailheaders, "From: No Reply <$adminemail>\n");
echo "$e_user<br>";
}
?>

264
admin/mod_user.php Normal file
View File

@ -0,0 +1,264 @@
<?php
//prevents caching
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
session_start();
include ('../config.php');
include ('../functions.php');
//make connection to dbase
$connection = @mysql_connect($server, $dbusername, $dbpassword)
or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)
or die(mysql_error());
if ($_POST[del_user] != "")
{
$sql = "SELECT * FROM $table_name WHERE username = '$_POST[del_user]'";
$result = @mysql_query($sql, $connection) or die(mysql_error());
//get the number of rows in the result set
$num = mysql_num_rows($result);
//set session variables if there is a match
if ($num != 0)
{
while ($sql = mysql_fetch_object($result))
{
$first = $sql -> firstname;
$last = $sql -> lastname;
$uname = $sql -> username;
$pass = $sql -> password;
$gr1 = $sql -> group1;
$gr2 = $sql -> group2;
$gr3 = $sql -> group3;
$change = $sql -> pchange;
$e_mail = $sql -> email;
$re_direct = $sql -> redirect;
$ver_d = $sql -> verified;
$last_log = $sql -> last_login;
$del_dat = last_login();
}
$trash_user = "INSERT INTO trash (firstname, lastname, username, password, group1, group2, group3,
pchange, email, redirect, verified, last_login, del_date)VALUES
('$first', '$last', '$uname', '$pass', '$gr1', '$gr2', '$gr3',
'$change', '$e_mail', '$re_direct', '$ver_d', '$last_log', '$del_dat')";
$del = "DELETE FROM $table_name WHERE username = '$_POST[del_user]'";
$result = @mysql_query($del,$connection) or die(mysql_error());
$result1 = @mysql_query($trash_user,$connection) or die(mysql_error());
$msg .= "User $_POST[del_user] has been trashed from the database.<br>";
}else{
$msg .= "User $_POST[del_user] could not be located in the database.<br>";
}
$del_banned = "DELETE FROM banned WHERE no_access = '$_POST[del_user]'";
$result = @mysql_query($del_banned,$connection) or die(mysql_error());
}
if (($_POST[username] != "") && ($_POST[mod_pass] == "Same as Old"))
{
$sql = "SELECT * FROM $table_name WHERE username = '$_POST[username]'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
while ($sql = mysql_fetch_object($result))
{
$pass = $sql -> password;
$last = $sql -> last_login;
}
$sql = "DELETE FROM $table_name WHERE username = '$_POST[username]'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
$sql = "INSERT INTO $table_name (firstname, lastname, username, password, group1, group2, group3,
pchange, email, redirect, verified, last_login) VALUES ('$_POST[mod_first]', '$_POST[mod_last]',
'$_POST[username]', '$pass', '$_POST[mod_group1]', '$_POST[mod_group2]',
'$_POST[mod_group3]', '$_POST[mod_chng]', '$_POST[mod_email]', '$_POST[mod_redirect]',
'1', '$last')";
$result = @mysql_query($sql,$connection) or die(mysql_error());
$msg .= "The information for $_POST[username] has been changed updated.<br>";
}
if (($_POST[username] != "") && ($_POST[mod_pass] != "Same as Old"))
{
$sql = "SELECT * FROM $table_name WHERE username = '$_POST[username]'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
while ($sql = mysql_fetch_object($result))
{
$pass = $sql -> password;
$last = $sql -> last_login;
}
$sql = "DELETE FROM $table_name WHERE username = '$_POST[username]'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
$sql = "INSERT INTO $table_name (firstname, lastname, username, password, group1, group2, group3,
pchange, email, redirect, verified, last_login) VALUES ('$_POST[mod_first]', '$_POST[mod_last]',
'$_POST[username]', password('$_POST[mod_pass]'), '$_POST[mod_group1]', '$_POST[mod_group2]',
'$_POST[mod_group3]', '$_POST[mod_chng]', '$_POST[mod_email]', '$_POST[mod_redirect]',
'1', '$last')";
$result = @mysql_query($sql,$connection) or die(mysql_error());
$msg .= "The information for $_POST[username] has been changed updated.<br>";
}
if ($_POST[ban_user] != "")
{
$ban = "INSERT INTO banned (no_access, type) VALUES ('$_POST[ban_user]', 'user')";
$result = @mysql_query($ban,$connection) or die(mysql_error());
$msg .= "User $_POST[ban_user] has been banned.<br>";
}
$ip_addr = "$_POST[oct1].$_POST[oct2].$_POST[oct3].$_POST[oct4]";
if ($ip_addr != "...")
{
$ban_ip = "INSERT INTO banned (no_access, type) VALUES ('$ip_addr', 'ip')";
$result = @mysql_query($ban_ip,$connection) or die(mysql_error());
$msg .= "IP Address $ip_addr has been banned.<br>";
}
if ($_POST[lift_user_ban] != "")
{
$lift_user = "DELETE FROM banned (no_access, type) WHERE no_access = '$_POST[lift_user_ban]'";
$result = @mysql_query($lift_user,$connection) or die(mysql_error());
$msg .= "The Ban for user $_POST[lift_user_ban] has been lifted.<br>";
}
if ($_POST[lift_ip_ban] != "")
{
$lift_ip = "DELETE FROM banned (no_access, type) WHERE no_access = '$_POST[lift_ip_ban]'";
$result = @mysql_query($lift_ip,$connection) or die(mysql_error());
$msg .= "The Ban for IP Address $_POST[lift_ip_ban] has been lifted.<br>";
}
if ($_POST[restore] != "")
{
$ruser = "SELECT * FROM trash WHERE username = '$_POST[restore]'";
$result0 = @mysql_query($ruser, $connection) or die(mysql_error());
//get the number of rows in the result set
$num = mysql_num_rows($result0);
//set session variables if there is a match
if ($num != 0)
{
while ($ruser = mysql_fetch_object($result0))
{
$rfirst = $ruser -> firstname;
$rlast = $ruser -> lastname;
$runame = $ruser -> username;
$rpass = $ruser -> password;
$rgr1 = $ruser -> group1;
$rgr2 = $ruser -> group2;
$rgr3 = $ruser -> group3;
$rchange = $ruser -> pchange;
$re_mail = $ruser -> email;
$rre_direct = $ruser -> redirect;
$rver_d = $ruser -> verified;
$rlast_log = $ruser -> last_login;
}
$r_user = "INSERT INTO $table_name (firstname, lastname, username, password, group1, group2, group3,
pchange, email, redirect, verified, last_login) VALUES
('$rfirst', '$rlast', '$runame', '$rpass', '$rgr1', '$rgr2', '$rgr3',
'$rchange', '$re_mail', '$rre_direct', '$rver_d', '$rlast_log')";
$del = "DELETE FROM trash WHERE username = '$_POST[restore]'";
$result = @mysql_query($del,$connection) or die(mysql_error());
$result1 = @mysql_query($r_user,$connection) or die(mysql_error());
$msg .= "User $_POST[restore] has been restored.<br>";
}else{
$msg .= "User $_POST[restore] could not be located in the database.<br>";
}
}
if ($_POST[empt_trash] == "yes")
{
$empty = "DELETE FROM trash";
$gone = @mysql_query($empty, $connection) or die(mysql_error());
$msg .= "The trash has been emptied.<br>";
}
if ($_POST[amt_time] != "" && $_POST[incr_time] != "")
{
$msg .= "The following accounts were inactive for $amt_time $incr_time or more and have been moved to the trash.<br><br>";
$killtime = "NOW() - INTERVAL $_POST[amt_time] $_POST[incr_time]";
$xfer = "SELECT * FROM $table_name WHERE last_login < $killtime";
$resultp1 = @mysql_query($xfer, $connection) or die(mysql_error());
while ($xfer = mysql_fetch_object($resultp1))
{
$pfirst = $xfer -> firstname;
$plast = $xfer -> lastname;
$puname = $xfer -> username;
$ppass = $xfer -> password;
$pgr1 = $xfer -> group1;
$pgr2 = $xfer -> group2;
$pgr3 = $xfer -> group3;
$ppchange = $xfer -> pchange;
$pe_mail = $xfer -> email;
$pre_direct = $xfer -> redirect;
$pver_d = $xfer -> verified;
$plast_log = $xfer -> last_login;
$pdel_date = last_login();
$msg .= "$puname<br>";
$xfer2 = "INSERT INTO trash (firstname, lastname, username, password, group1, group2, group3,
pchange, email, redirect, verified, last_login, del_date) VALUES ('$pfirst', ' $plast', '$puname',
'$ppass', '$pgr1', '$pgr2', '$pgr3', '$ppchange', '$pe_mail', '$pre_direct', '$pver_d', '$plast_log', '$pdel_date')";
$resultp2 = @mysql_query($xfer2, $connection) or die(mysql_error());
}
$purge = "DELETE FROM $table_name WHERE last_login < $killtime";
$resultp3 = @mysql_query($purge, $connection) or die(mysql_error());
}
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"adminpage.css\">";
echo $msg;
if ($_POST[username] == $_SESSION[user_name])
{
session_destroy();
echo "<html>";
echo "<head>";
echo "<meta http-equiv=\"refresh\" content=\"3; url=../login.html\">";
echo "<title>New Page 2</title>";
echo "</head>";
exit;
}
?>
<html>
<head>
<meta http-equiv="refresh" content="3; url=adminpage.php">
<title>Modify User</title>
</head>
<body>
</body>
</html>

15
banned.html Normal file
View File

@ -0,0 +1,15 @@
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Unauthorized</title>
</head>
<body>
<p><b><font size="7">YOU'VE BEEN BANNED</font></b></p>
</body>
</html>

23
check_login.php Normal file
View File

@ -0,0 +1,23 @@
<?
session_start();
//check to see if the user already has an open session
if (($_SESSION[user_name] != "") && ($_SESSION[password] != ""))
{
header("Location:$_SESSION[redirect]");
exit;
}
//check to see if cookies have been set previously
if(($lr_user != "") && ($lr_pass != ""))
{
header("Location:redirect.php");
exit;
}
//if neither is true, redirect to login
header("Location:login.html");
?>

46
config.php Normal file
View File

@ -0,0 +1,46 @@
<?
//set up the names of the database and table
$db_name ="dqxjaadh_factoriaverde";
$table_name ="authorize";
//connect to the server and select the database
$server = "localhost";
$dbusername = "dqxjaadh_factori";
$dbpassword = "q3gm78v69f";
//domain information
$domain = ".lafactoriaverde.es";
//Change to "0" to turn off the login log
$log_login = "1";
//base_dir is the location of the files, ie http://www.yourdomain/login
$base_dir = "http://www.rodax-software.net/lafactoriaverde.es/";
//length of time the cookie is good for - 7 is the days and 24 is the hours
//if you would like the time to be short, say 1 hour, change to 60*60*1
$duration = time()+(60*60*24*30);
//the site administrator\'s email address
$adminemail = "info@rodax-software.com";
//sets the time to EST
$zone=3600*+1;
//do you want the verify the new user through email if the user registers themselves?
//yes = "0" : no = "1"
$verify = "0";
//default redirect, this is the URL that all self-registered users will be redirected to
$default_url = "http://www.rodax-software.net/lafactoriaverde.es/";
//minimum and maximum password lengths
$min_pass = 4;
$max_pass = 8;
$num_groups = 0+2;
$group_array = array("Usuarios","Administradores");
?>

34
email_change.html Normal file
View File

@ -0,0 +1,34 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Chane E-Mail Address</title>
<script Language="JavaScript">
<!--
function Form1_Validator(theForm)
{
if (theForm.email.value == "")
{
alert("The \"E-Mail Address\" field cannot be left blank.");
theForm.email.focus();
return (false);
}
}
//--></script>
</head>
<body>
<form method="POST" action="email_change.php" onsubmit="return Form1_Validator(this)" language="JavaScript" name="Form1">
<p><b><font face="Tahoma">E-Mail Address Change</font></b></p>
<p><font face="Tahoma"><font size="2">New E-Mail Address:<br>
</font><input name="email" size="20"><font size="2"><br>
<br>
</font><input type="submit" value="Submit" name="B1"></font></p>
</form>
&nbsp;</body>
</html>

38
email_change.php Normal file
View File

@ -0,0 +1,38 @@
<?php
//prevents caching
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
session_start();
//include config and functions pages
include ('config.php');
include ('functions.php');
//if a user is trying to access this page without logging in first - send them back to login
if (!$_SESSION[user_name])
{
header('Location:login.html');
exit;
}
//make connection to dbase
$connection = @mysql_connect($server, $dbusername, $dbpassword)
or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)
or die(mysql_error());
//update the table with the new email address
$sql = "UPDATE $table_name SET
email = '$_POST[email]'
WHERE username = '$_SESSION[user_name]'";
$result = @mysql_query($sql, $connection) or die(mysql_error());
//after table is updated, send the use back to their redirect to page
header("Location:$_SESSION[redirect]");
exit;
?>

17
emailpass.html Normal file
View File

@ -0,0 +1,17 @@
<HTML>
<HEAD>
<TITLE>Username and Password Request</TITLE>
</HEAD>
<BODY>
<H1><font face="Verdana" size="4" color="#0080C0">Request Your Username &amp; Password</font></H1>
<FORM METHOD="POST" ACTION="emailpass.php">
<P><font color="#0080C0"><strong><font size="2" face="Verdana">Email Address</font></strong><font face="Verdana"><STRONG><font size="2">:</font></STRONG><BR>
</font></font><font color="#0080C0" face="Verdana">
<INPUT TYPE="text" NAME="email" SIZE=25 MAXLENGTH=50></font></p>
<P>
<font color="#0080C0">
<INPUT TYPE="submit" NAME="submit" VALUE="Submit" style="font-family: Verdana"></font></P>
</FORM>
</BODY>
</HTML>

83
emailpass.php Normal file
View File

@ -0,0 +1,83 @@
<?
//prevents caching
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
session_start();
//require the config file
require ("config.php");
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//build and issue the query
$sql ="SELECT * FROM $table_name WHERE email = '$_POST[email]'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
//get the number of rows in the result set
$num = mysql_num_rows($result);
//If match was found, get username and email from database
if ($num != 0)
{
while ($sql = mysql_fetch_object($result))
{
$email = $sql -> email;
$uname = $sql -> username;
}
//Update database with new password
$newpass = rand(10000000,99999999);
$chng = "UPDATE $table_name SET
password = password('$newpass'), pchange = '1'
WHERE email = '$email'";
$result2 = @mysql_query($chng,$connection) or die(mysql_error());
//create message to user
$msg = "<p>Your username & temporary password has been emailed to you.</p>";
$msg .= "<p>You must change this password immediately after your next login.</p>";
$msg .= "<p></p>";
$msg .= "<p><a href=\"login.html\">Login</a></p>";
//create mail message
$mailheaders = "From: www$domain\n";
$mailheaders .= "Your username is $uname.\n";
$mailheaders .= "Your password is $newpass.\n";
$mailheaders .= "$base_dir/login.html";
}
else
{
//If no email was found in the database send a notification to the admin
$email = $adminemail;
$msg = "<p>Your email address could not be located</p>";
$msg .="<p>The Website Administrator has been emailed, you should contacted by them shortly.</p>";
$mailheaders = "From: www$domain\n";
$mailheaders .= "A user with the email address of $_POST[email] has requested a username and password reminder.\n";
$mailheaders .= "$_POST[email] could not be located in the database.\n";
}
//Email the request
$to = "$email";
$subject = "Your Username & Password for www$domain";
mail($to, $subject, $mailheaders, "From: No Reply <$adminemail>\n");
?>
<HTML>
<HEAD>
<TITLE>Username and Password Request</TITLE>
</HEAD>
<BODY>
<? echo "$msg"; ?>
</BODY>
</HTML>

25
errorlogin.html Normal file
View File

@ -0,0 +1,25 @@
<HTML>
<HEAD>
<TITLE>Error Login</TITLE>
</HEAD>
<BODY>
<h1><font face="Verdana" size="4" color="#2852A8">There was an error logging you
in, please try again...</font></h1>
<FORM METHOD="POST" ACTION="redirect.php">
<P><font face="Verdana" size="2" color="#2852A8"><STRONG>Username:</STRONG><BR>
</font><font color="#2852A8" face="Verdana">
<INPUT TYPE="text" NAME="username" SIZE=25 MAXLENGTH=25></font></p>
<P><font face="Verdana" size="2" color="#2852A8"><STRONG>Password:</STRONG><BR>
</font><font color="#2852A8" face="Verdana">
<INPUT TYPE="password" NAME="password" SIZE=25 MAXLENGTH=25></font></p>
<P><font face="Verdana"><font color="#2852A8">
<input type="checkbox" name="remember" value="Yes"></font><font size="2" color="#2852A8">Remember
me from this computer</font></font></p>
<P><font color="#2852A8">
<INPUT TYPE="submit" NAME="submit" VALUE="Login" style="font-family: Verdana"></font></P>
</FORM>
<p><font color="#2852A8" face="Verdana" size="2"><a href="../../loginredir/emailpass.html">
<font color="#2852A8">Click here if would like your username and password to be
e-mailed to the address we have on file.</font></a></font></p>
</BODY>
</HTML>

86
favorites/edit_links.php Normal file
View File

@ -0,0 +1,86 @@
<?php
//prevent caching
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
//start session
session_start();
//include config and functions files
include ("../config.php");
include ("../functions.php");
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//make query to database
$sql ="SELECT * FROM favorites WHERE username= '$_SESSION[user_name]'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
$result1 = @mysql_query($sql,$connection) or die(mysql_error());
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Edit Favorites</title>
</head>
<body>
<form method="POST" action="edit_links_2.php">
<p><font face="Tahoma" size="2"><u><b><font color="#000080">Add a Favorite:</font></b></u><br>
Nickname: <br>
</font><font face="Tahoma">
<input type="text" name="nick" size="20" style="font-family: Tahoma; font-size: 10pt"><br>
<font size="2">URL: <br>
</font>
<input type="text" name="link" size="20" value="http://" style="font-family: Tahoma; font-size: 10pt"></font></p>
<p><font face="Tahoma" size="2"><u><b><font color="#000080">Delete a
Favorite:</font></b></u>
<br>
<select size="1" name="del_fav" style="font-family: Tahoma; font-size: 10pt">
<option></option>
<?php
while ($sql = mysql_fetch_object($result))
{
$_nickname = $sql -> nickname;
echo "<option value=\"$_nickname\">$_nickname</option>";
}
?>
</select></font></p>
<p><font face="Tahoma" size="2"><u><font color="#000080"><b>Edit a Favorite:</b></font></u><br>
Edit this Favorite:<br>
<select size="1" name="this_fav" style="font-family: Tahoma; font-size: 10pt">
<option></option>
<?php
while ($sql = mysql_fetch_object($result1))
{
$_nick = $sql -> nickname;
echo "<option value=\"$_nick\">$_nick</option>";
}
?>
</select><br>
To this Nickname: <br>
</font><font face="Tahoma">
<input type="text" name="new_nick" size="20" style="font-family: Tahoma; font-size: 10pt"><br>
<font size="2">And this URL: <br>
</font>
<input type="text" name="new_link" size="20" value="http://" style="font-family: Tahoma; font-size: 10pt"><br>
<br>
</font>
<input type="submit" value="Submit" name="B1" style="font-family: Tahoma; font-size: 10pt"></p>
</form>
</body>
</html>

View File

@ -0,0 +1,49 @@
<?php
//prevent caching
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
//start session
session_start();
//include config and functions files
include ("../config.php");
include ("../functions.php");
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//make query to database
$sql ="SELECT * FROM favorites WHERE username= '$_SESSION[user_name]'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
if ($_POST[nick] != "")
{
//make query to database
$sql ="INSERT INTO favorites VALUES ('$_SESSION[user_name]', '$_POST[nick]', '$_POST[link]')";
$result = @mysql_query($sql,$connection) or die(mysql_error());
}
if ($_POST[del_fav] != "")
{
//make query to database
$sql ="DELETE FROM favorites WHERE username = '$_SESSION[user_name]' AND nickname = '$_POST[del_fav]'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
}
if ($_POST[this_fav] != "")
{
//make query to database
$sql ="DELETE FROM favorites WHERE username = '$_SESSION[user_name]' AND nickname = '$_POST[this_fav]'";
$sql2 = "INSERT INTO favorites VALUES ('$_SESSION[user_name]', '$_POST[new_nick]', '$_POST[new_link]')";
$result = @mysql_query($sql,$connection) or die(mysql_error());
$result2 = @mysql_query($sql2,$connection) or die(mysql_error());
}
header("Location:links.php");
?>

16
favorites/index.htm Normal file
View File

@ -0,0 +1,16 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<p><iframe name="I1" src="links.php" width="187" height="517">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe></p>
</body>
</html>

27
favorites/links.php Normal file
View File

@ -0,0 +1,27 @@
<?php
//start session
session_start();
//include config and functions files
include ("../config.php");
include ("../functions.php");
echo "<p><b><font face=\"Tahoma\" size=\"2\"><a href=\"edit_links.php\">Add/Change Favorites</a></font></b></p>";
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//make query to database
$sql ="SELECT * FROM favorites WHERE username= '$_SESSION[user_name]'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
while ($sql = mysql_fetch_object($result))
{
$_link = $sql -> link;
$_nickname = $sql -> nickname;
echo "<font face=\"Tahoma\" size=\"2\"><a target=\"_blank\" href=\"$_link\">$_nickname</a></font><br>";
}
?>

View File

@ -0,0 +1,37 @@
<?php
//prevent caching
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
//start session
session_start();
//include config and functions files
include ("../config.php");
include ("../functions.php");
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//make query to database
$sql ="CREATE TABLE IF NOT EXISTS favorites
(
username VARCHAR(20),
nickname VARCHAR(20),
link VARCHAR(100)
)";
$result = @mysql_query($sql,$connection) or die(mysql_error());
if ($result)
{
echo "<font face=\"Tahoma\" size=\"2\">Your Favorites table has been created.</font><br>";
}
?>
<html>
<meta http-equiv="refresh" content="3; url=index.htm">
</html>

80
functions.php Normal file
View File

@ -0,0 +1,80 @@
<?php
//function to get the date
function last_login()
{
$date = gmdate("Y-m-d");
return $date;
}
//function that sets the session variable
function sess_vars($base_dir, $server, $dbusername, $dbpassword, $db_name, $table_name, $user, $pass)
{
//make connection to dbase
$connection = @mysql_connect($server, $dbusername, $dbpassword)
or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)
or die(mysql_error());
$sql = "SELECT * FROM $table_name WHERE username = '$user' and password = password('$pass')";
$result = @mysql_query($sql, $connection) or die(mysql_error());
//get the number of rows in the result set
$num = mysql_num_rows($result);
//set session variables if there is a match
if ($num != 0)
{
while ($sql = mysql_fetch_object($result))
{
$_SESSION[first_name] = $sql -> firstname;
$_SESSION[last_name] = $sql -> lastname;
$_SESSION[user_name] = $sql -> username;
$_SESSION[password] = $sql -> password;
$_SESSION[group1] = $sql -> group1;
$_SESSION[group2] = $sql -> group2;
$_SESSION[group3] = $sql -> group3;
$_SESSION[pchange] = $sql -> pchange;
$_SESSION[email] = $sql -> email;
$_SESSION[redirect] = $sql -> redirect;
$_SESSION[verified] = $sql -> verified;
$_SESSION[last_login] = $sql -> last_login;
}
}else{
$_SESSION[redirect] = "$base_dir/errorlogin.html";
}
}
//functions that will determine if access is allowed
function allow_access($group)
{
if ($_SESSION[group1] == "$group" || $_SESSION[group2] == "$group" || $_SESSION[group3] == "$group" ||
$_SESSION[group1] == "Administrators" || $_SESSION[group2] == "Administrators" || $_SESSION[group3] == "Administrators" ||
$_SESSION[user_name] == "$group")
{
$allowed = "yes";
}else{
$allowed = "no";
}
return $allowed;
}
//function to check the length of the requested password
function password_check($min_pass, $max_pass, $pass)
{
$valid = "yes";
if ($min_pass > strlen($pass) || $max_pass < strlen($pass))
{
$valid = "no";
}
return $valid;
}
?>

BIN
images/lr_13_header_01.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
images/lr_13_header_02.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
images/lr_13_header_03.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
images/lr_13_header_04.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
images/lr_13_header_05.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

BIN
images/lr_13_header_06.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

BIN
images/mpdolan_logo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
images/mpdolan_logo_top.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

312
index.html Normal file
View File

@ -0,0 +1,312 @@
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Welcome to Login - Redirect</title>
</head>
<body>
<table border="0" width="100%" id="table2" cellspacing="0" cellpadding="0">
<tr>
<td><i><b><font face="Tahoma" size="2" color="#0000FF">This is Version 1.3 of Login - Redirect.</font></b></i></td>
<td>
<p align="right"><i><b><font face="Tahoma" size="2">
<a href="install/install.html">Begin Installation</a></font></b></i></td>
</tr>
</table>
<p><font face="Tahoma" size="2">This script is not only a secure login script,
it also allows great control and can be integrated easily into most sites as
well as the following features:</font></p>
<p><font face="Tahoma" size="2"><b>Redirection based on the users login information</b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - The site administrator can dictate
the page that the user will be redirected to once the user has been
authenticated<br>
<b>Control Panel Administration</b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - The control panel administration
allows Administrators the following functions:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Add Users<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Modify user information<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Add users to groups<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Delete users<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Undelete Users<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Ban Users<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Lift user bans<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Ban IP Addresses<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Lift IP Address bans<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- View and sort login information<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Require users to change their password at next login<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- Require users to activate their account as to verify their e-mail address
before they are able to login<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- View all user information<br>
<b>Other functionality of this package:</b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Control access to pages through
username or groups<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Allows users to request an e-mail
of their login information<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Allows users to change their own
password and e-mail address<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Allows users to self-register<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
All of the pages viewed by users have been written in html as to allow site
creators easy integration into their site.<br>
All html pages can be altered, just do not change the functionality of the page.<br>
For example, if the html page contains to fields named X and Y and the form is
posted to page.php, do not change the name of the field or the name of the page
that the information is posted to unless you know what you are doing.</font></p>
<p><font face="Tahoma" size="2"><b>Requirements:</b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Website server with php
functionality.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - MySQL Database<br>
<br>
The installation process is very simple.&nbsp; You will need the following
information to complete the installation:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - a MySQL database<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - The username and password for that
database<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Knowledge of the database server
(typically localhost, but it could be different as with 1&amp;1 hosted sites)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - FTP ability<br>
That's it, the installation walks you through all of the steps and creates all
of the table required as well as the configurations settings and the
administrator account setup.<br>
<br>
<b>Package Contents and Description:</b></font></p>
<table border="1" id="table1" cellpadding="0">
<tr>
<td><b><font face="Tahoma" size="2">../</font></b></td>
<td>&nbsp;</td>
</tr>
<tr>
<td><font face="Tahoma" size="2">*activate.html</font></td>
<td><font face="Tahoma" size="2">This page allows the user to activate
their account.&nbsp; If you has set the configuration to verify e-mail
address, the user will register and an e-mail will be sent requesting
the user to visit this page and activate the account.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">*banned.html</font></td>
<td><font face="Tahoma" size="2">This page is displayed to user if
either their IP Address or User account has been banned.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">check_login.php</font></td>
<td><font face="Tahoma" size="2">This page is a server-side page that
checks to see if the user still has an open session or has elected
cookies to be set as to limit the number of times the user must login.&nbsp;
You do not have to use this page - If you require your users to login in
every time, I would suggest you remove the &quot;Remember me from this
computer&quot; section from login.html and errorlogin.html.&nbsp; If you
chose to use it and have a &quot;Login&quot; link somewhere on your page, have it
link to check_login.php.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">config.php</font></td>
<td><font face="Tahoma" size="2">This is the page with all of the
configuration settings, the code for this page is generated during the
installation process, you will simply need to copy and paste it into
this page and upload.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">*email_change.html</font></td>
<td><font face="Tahoma" size="2">This page allows users to change their
own e-mail address.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">email_change.php</font></td>
<td><font face="Tahoma" size="2">This is the server-side page that
handles the changing of the user's e-mail address.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">*errorlogin.html</font></td>
<td><font face="Tahoma" size="2">This is the page that the user is
directed to should their be an error with their credentials.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">functions.php</font></td>
<td><font face="Tahoma" size="2">This page contains various functions
that are used throughout the package.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">*login.html</font></td>
<td><font face="Tahoma" size="2">This is the main login page for the
users.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">loglogin.php</font></td>
<td><font face="Tahoma" size="2">This is a server-side page that records
the login information to the log_login table.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">*no_access.html</font></td>
<td><font face="Tahoma" size="2">This is the page that is displayed
should a user try to gain access to a page that they are no allowed
access to visit.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">*not_activated.html</font></td>
<td><font face="Tahoma" size="2">This is the page that is displayed
should a user try to login without activating their account, that is if
you have required e-mail verification.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">*pass_change.html</font></td>
<td><font face="Tahoma" size="2">This page allows users to change their
own password.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">pass_change.php</font></td>
<td><font face="Tahoma" size="2">This is the server-side page that
handles the password change.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">redirect.php</font></td>
<td><font face="Tahoma" size="2">This is the server-side page that sets
the session and redirects the user to the page specified by the
administrator.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">*register.html</font></td>
<td><font face="Tahoma" size="2">This page allows user to register
themselves for your site.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">register.php</font></td>
<td><font face="Tahoma" size="2">This is the server-side page that
handles the registration.</font></td>
</tr>
<tr>
<td><b><font face="Tahoma" size="2">**../install</font></b></td>
<td>&nbsp;</td>
</tr>
<tr>
<td><font face="Tahoma" size="2">**create_admin.php</font></td>
<td><font face="Tahoma" size="2">This is the administrator interface to
create the administrator's account.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">**install.html</font></td>
<td><font face="Tahoma" size="2">The first installation page, requests
configurations information.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">**install_1.php</font></td>
<td><font face="Tahoma" size="2">The second installation page, allows
for the naming of groups.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">**install_2.php</font></td>
<td><font face="Tahoma" size="2">The third installation page, allows for
the creation of the administrator's account.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">**install_3.php</font></td>
<td><font face="Tahoma" size="2">The fourth installation page,
installation is complete and provide the config.php code.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">../admin</font></td>
<td>&nbsp;</td>
</tr>
<tr>
<td><font face="Tahoma" size="2">adduser.php</font></td>
<td><font face="Tahoma" size="2">This is the server-side page that
handles the addition of a user.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">adminpage.php</font></td>
<td><font face="Tahoma" size="2">This is the Administrator's Control
Panel - very important.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">mod_user.php</font></td>
<td><font face="Tahoma" size="2">This is the server-side page that
handles the user modifications, deletions and banning.</font></td>
</tr>
<tr>
<td><b><font face="Tahoma" size="2">../logs</font></b></td>
<td>&nbsp;</td>
</tr>
<tr>
<td><font face="Tahoma" size="2">index.html</font></td>
<td><font face="Tahoma" size="2">This is a frames page that includes the
next two pages.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">log.php</font></td>
<td><font face="Tahoma" size="2">This is the page that appears on the
right of index.html and contains the login information.</font></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">log.html</font></td>
<td><font face="Tahoma" size="2">This is the page that appeats on the
left of index.html and allows for sorting of the login information and
also contain arin.net whois lookup for IP Addresses.</font></td>
</tr>
</table>
<p><font face="Tahoma" size="2">* - indicates that this page is customizable<br>
** - indicates that this file or folder can be deleted after installation is
complete</font></p>
<p><font face="Tahoma" size="2">How-to restrict access to your pages:<br>
1.&nbsp;&nbsp;&nbsp; All secure pages must be php pages.&nbsp; You can easily
create any page in html and simply save it with a .php extention.<br>
2.&nbsp;&nbsp;&nbsp; This code must be added prior to any code on the page:<br>
<br>
&lt;?php<br>
<br>
//prevents caching<br>
header(&quot;Expires: Sat, 01 Jan 2000 00:00:00 GMT&quot;);<br>
header(&quot;Last-Modified: &quot;.gmdate(&quot;D, d M Y H:i:s&quot;).&quot; GMT&quot;);<br>
header(&quot;Cache-Control: post-check=0, pre-check=0&quot;,false);<br>
session_cache_limiter();<br>
session_start();<br>
<br>
<font color="#0000FF"><b>//this should the the
absolute path to the config.php file <br>
//(ie /home/website/yourdomain/login/config.php <u>or</u> <br>
//the location in relationship to the page being protected - ie ../login/config.php
)<br>
</b></font>require('../config.php');<br>
<font color="#0000FF"><b><br>
//this should the the
absolute path to the functions.php file - see the instrcutions for config.php
above</b></font><br>
require('../functions.php');
<br>
<br>
<b> <font color="#0000FF">//this is
group name or username of the group or person that you wish to allow access to<br>
</font></b>
<font color="#0000FF"><b>// </b>- please be advise that the Administrators
Groups has access to all pages.</font><b><font color="#0000FF"><br>
</font></b>if (allow_access(Administrators) != &quot;yes&quot;)<br>
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000FF" face="Tahoma" size="2"><b><br>
<br>
//this should the the
absolute path to the no_access.html file - see above</b></font><font face="Tahoma" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
include ('no_access.html'); <br>
exit;<br>
}<br>
?&gt;</font></p>
<p><font face="Tahoma" size="2">For a more precise sample of the code you should
use, please <a href="smpl_sec_header.php">Click Here</a>.</font></p>
<p><font face="Tahoma" size="2">That should do it...</font></p>
</body>
</html>

61
install/create_admin.php Normal file
View File

@ -0,0 +1,61 @@
<?
session_start(install);
include ('../config.php');
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Create Your Administrator Accoun</title>
</head>
<body>
<p><b><font face="Tahoma" size="2">Create Your Administrator Account:</font></b></p>
<form method="POST" action="install_3.php">
<table border="1" id="table1">
<tr>
<td><font face="Tahoma" size="2">First Name:</font></td>
<td>
<input type="text" name="first_name" size="20" style="font-family: Tahoma"></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">Last Name:</font></td>
<td>
<input type="text" name="last_name" size="20" style="font-family: Tahoma"></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">Username:</font></td>
<td>
<input type="text" name="user_name" size="20" style="font-family: Tahoma"></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">Password:</font></td>
<td>
<input type="text" name="password" size="20" style="font-family: Tahoma"></td>
</tr>
<tr>
<td><font face="Tahoma" size="2">Redirect To:</font></td>
<td>
<input type="text" name="redirect_to" size="50" value="<?php echo $_SESSION[install_dir]; ?>/admin/adminpage.php" style="font-family: Tahoma"></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<input type="submit" value="Submit" name="B1" style="font-family: Tahoma; font-size: 10pt"></td>
<td>&nbsp;</td>
</tr>
</table>
</form>
</body>
</html>

31
install/header.html Normal file
View File

@ -0,0 +1,31 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Header</title>
</head>
<body leftmargin="0" rightmargin="0" topmargin="0">
<table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0">
<tr>
<td width="383">
<img border="0" src="../images/lr_13_header_01.gif" width="383" height="112"></td>
<td>
<img border="0" src="../images/lr_13_header_02.gif" width="100%" height="112"></td>
<td width="300">
<img border="0" src="../images/lr_13_header_03.gif" width="310" height="112"></td>
</tr>
<tr>
<td width="383">
<img border="0" src="../images/lr_13_header_04.gif" width="383" height="38"></td>
<td>
<img border="0" src="../images/lr_13_header_05.gif" width="100%" height="38"></td>
<td width="300">
<img border="0" src="../images/lr_13_header_06.gif" width="310" height="38"></td>
</tr>
</table>
</body>
</html>

148
install/install.html Normal file
View File

@ -0,0 +1,148 @@
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Login - Redirect Installation</title>
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0">
<tr>
<td width="383">
<img border="0" src="../images/lr_13_header_01.gif" width="383" height="112"></td>
<td>
<img border="0" src="../images/lr_13_header_02.gif" width="100%" height="112"></td>
<td width="300">
<img border="0" src="../images/lr_13_header_03.gif" width="310" height="112"></td>
</tr>
<tr>
<td width="383">
<img border="0" src="../images/lr_13_header_04.gif" width="383" height="38"></td>
<td>
<img border="0" src="../images/lr_13_header_05.gif" width="100%" height="38"></td>
<td width="300">
<img border="0" src="../images/lr_13_header_06.gif" width="310" height="38"></td>
</tr>
</table>
<form method="POST" action="install_1.php">
<table border="0" width="100%" id="table1" cellspacing="10" cellpadding="4">
<tr>
<td valign="top">
<p style="margin-top: 0; margin-bottom: 0"><font size="2">Database Name:<br>
</font><input type="text" name="dbase_name" size="20" style="font-family: Verdana; color: #008080"></p>
<p style="margin-top: 0; margin-bottom: 0"><font size="2">Server:<br>
</font>
<input type="text" name="dbase_server" size="20" style="font-family: Verdana; color: #008080" value="localhost"></p>
<p style="margin-top: 0; margin-bottom: 0"><font size="2">Database Username:<br>
</font><input type="text" name="dbase_username" size="20" style="font-family: Verdana; color: #008080"></p>
<p style="margin-top: 0; margin-bottom: 0"><font size="2">Database Password:<br>
</font><input type="text" name="dbase_password" size="20" style="font-family: Verdana; color: #008080"></p>
<p style="margin-top: 0; margin-bottom: 0"><font size="2">Installation
Directory:<br>
</font><input type="text" name="install_dir" size="50" style="font-family: Verdana; color: #008080" value="http://"></p>
<p style="margin-top: 0; margin-bottom: 0"><font size="2">Administrator's
Email:<br>
</font><input type="text" name="admin_email" size="50" style="font-family: Verdana; color: #008080"><br>
<font size="2">Time Zone:<br>
</font><select size="1" name="time_zone" style="font-family: Verdana; color: #008080">
<option value="-12">-12</option>
<option value="-11">-11</option>
<option value="-10">-10</option>
<option value="-9.5">-9.5</option>
<option value="-9">-9</option>
<option value="-8.5">-8.5</option>
<option value="-8">-8 PST</option>
<option value="-7">-7 MST</option>
<option value="-6">-6 CMT</option>
<option value="-5" selected>-5 EST</option>
<option value="-4">-4 AST</option>
<option value="-3.5">-3.5</option>
<option value="-3">-3 ADT</option>
<option value="-2">-2</option>
<option value="-1">-1</option>
<option value="00">00 GMT</option>
<option value="+1">+1 CET</option>
<option value="+2">+2</option>
<option value="+3">+3</option>
<option value="+3.5">+3.5</option>
<option value="+4">+4</option>
<option value="+4.5">+4.5</option>
<option value="+5">+5</option>
<option value="+5.5">+5.5</option>
<option value="+6">+6</option>
<option value="+6.5">+6.5</option>
<option value="+7">+7</option>
<option value="+8">+8</option>
<option value="+9">+9</option>
<option value="+9.5">+9.5</option>
<option value="+10">+10</option>
<option value="+10.5">+10.5</option>
<option value="+11">+11</option>
<option value="+12">+12</option>
<option value="+13">+13</option>
<option value="+14">+14</option>
</select></p>
</td>
<td valign="top">
<p style="margin-top: 0; margin-bottom: 0"><font size="2">Domain Name:<br>
www.<input type="text" name="dom_name" size="20" style="font-family: Verdana; color: #008080">.
<select size="1" name="tld1" style="font-family: Verdana; color: #008080">
<option value=".com" selected>com</option>
<option value=".net">net</option>
<option value=".org">org</option>
<option value=".us">us</option>
<option value=".biz">biz</option>
<option value=".info">info</option>
<option>other</option>
<option></option>
</select> - if other than that listed:
<input type="text" name="tld2" size="5" style="font-family: Verdana; color: #008080"></font></p>
<p style="margin-top: 0; margin-bottom: 0"><font size="2">Verify New User's
Through Email?<br>
</font><select size="1" name="verify_email" style="font-family: Verdana; color: #008080">
<option value="1" selected>No</option>
<option value="0">Yes</option>
</select></p>
<p style="margin-top: 0; margin-bottom: 0"><font size="2">Default URL:<br>
</font><input type="text" name="default_url" size="50" style="font-family: Verdana; color: #008080" value="http://"></p>
<p style="margin-top: 0; margin-bottom: 0"><font size="2">Minimum Password
Length:<br>
</font><input type="text" name="min_pass_len" size="20" style="font-family: Verdana; color: #008080"></p>
<p style="margin-top: 0; margin-bottom: 0"><font size="2">Maximum Password
Length:<br>
</font><input type="text" name="max_pass_len" size="20" style="font-family: Verdana; color: #008080"></p>
<p style="margin-top: 0; margin-bottom: 0"><font size="2">Log Logins?<br>
</font><select size="1" style="font-family: Verdana; color: #008080" name="log_login">
<option selected value="0">No</option>
<option value="1">Yes</option>
</select></p>
<p style="margin-top: 0; margin-bottom: 0"><font size="2">Number of Groups:<br>
</font><select size="1" style="font-family: Verdana; color: #008080" name="num_groups">
<option value="0" selected>0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select></p></td>
</tr>
<tr>
<td valign="top">
<input type="submit" value="Submit" name="B1"></td>
<td valign="top">
&nbsp;</td>
</tr>
</table>
</form>
<p style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
</body>
</html>

70
install/install_1.php Normal file
View File

@ -0,0 +1,70 @@
<?php
//store variables into a session
session_start(install);
$_SESSION[dbase_name] = $_POST[dbase_name];
$_SESSION[dbase_server] = $_POST[dbase_server];
$_SESSION[dbase_username] = $_POST[dbase_username];
$_SESSION[dbase_password] = $_POST[dbase_password];
$_SESSION[table_name] = "authorize";
$_SESSION[install_dir] = $_POST[install_dir];
$_SESSION[time_zone] = $_POST[time_zone];
$_SESSION[verify_email] = $_POST[verify_email];
$_SESSION[default_url] = $_POST[default_url];
$_SESSION[min_pass_len] = $_POST[min_pass_len];
$_SESSION[max_pass_len] = $_POST[max_pass_len];
$_SESSION[log_login] = $_POST[log_login];
$_SESSION[group_number] = $_POST[num_groups];
$_SESSION[domain] = "."."$_POST[dom_name]"."$_POST[tld1]"."$_POST[tld2]";
$_SESSION[admin_email] = $_POST[admin_email];
if (!$_POST[num_groups])
{
header("Location:install_2.php");
}
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../style.css\">";
include ('header.html');
if (!$_POST[dbase_name] || !$_POST[dbase_server] || !$_POST[dbase_username] || !$_POST[dbase_password] ||
!$_POST[install_dir] || !$_POST[time_zone] ||
!$_POST[default_url] || !$_POST[min_pass_len] || !$_POST[max_pass_len] || !$_POST[dom_name] || !$_POST[admin_email])
{
echo "<p>You must complete all of the fields, please <a href=\"javascript:history.go(-1)\">Go Back </a>and complete all of the fields.</p>";
exit;
}
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link rel="stylesheet" type="text/css" href="../style.css">
<title>Login - Redirect Installation</title>
</head>
<body>
Enter the names of your Groups:<br>
(Do not use Administrators or Users as a Group Name as there are pre-configured groups)<br>
<form method="POST" action="install_2.php">
<?php
$i = 1;
while ($i <= $_SESSION[group_number])
{
echo "<p>Group $i<br><input type=\"text\" name=\"group$i\" size=\"20\"></p>";
$i++;
}
?>
<p><input type="submit" value="Submit" name="B1"></p>
</form>
</body>
</html>

233
install/install_2.php Normal file
View File

@ -0,0 +1,233 @@
<?php
session_start(install);
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../style.css\">";
include ('header.html');
$group_array = array();
$i = 1;
while ($i <= $_SESSION[group_number])
{
$group = "group$i";
array_push($group_array, "$_POST[$group]");
$i++;
}
$i = 1;
//test connection to dbase verifing dbase name, server, username and password
$connection = @mysql_connect($_SESSION[dbase_server], $_SESSION[dbase_username], $_SESSION[dbase_password])
or die(mysql_error());
$db = @mysql_select_db($_SESSION[dbase_name],$connection)
or die(mysql_error());
//create a message to be displayed at the end of the installation
if ($db)
{
echo "Connection to Database $_SESSION[dbase_name] Successful.<br>";
}else{
echo "<p>There was an error connecting to the database.</p>";
echo "<p><a href=\"javascript:history.go(-2)\">Please go back and check your Database information.</a></p>";
exit;
}
//create a table in that dbase
$sql ="
CREATE TABLE IF NOT EXISTS $_SESSION[table_name]
(
firstname VARCHAR(20),
lastname VARCHAR(20),
username VARCHAR(20),
password VARCHAR(50),
group1 VARCHAR(20),
group2 VARCHAR(20),
group3 VARCHAR(20),
pchange VARCHAR(1),
email VARCHAR(100),
redirect VARCHAR(100),
verified VARCHAR(1),
last_login DATE
)";
$result = @mysql_query($sql,$connection)
or die(mysql_error());
if ($result)
{
echo "Table $_SESSION[table_name] has been created.<br>";
}else{
echo "<p>There was an error creating the table.</p>";
echo "<p><a href=\"javascript:history.go(-2)\">Please go back and check your information.</a></p>";
exit;
}
//create a table in that dbase
$sql_log ="
CREATE TABLE IF NOT EXISTS log_login
(
username VARCHAR(20),
date VARCHAR(20),
time VARCHAR(20),
ip_addr VARCHAR(20),
oper_sys VARCHAR(20),
brow VARCHAR(20)
)
";
$result_log = @mysql_query($sql_log,$connection)
or die(mysql_error());
if ($result_log)
{
echo "Table log_login has been created.<br>";
}else{
echo "<p>There was an error creating the table.</p>";
echo "<p><a href=\"javascript:history.go(-2)\">Please go back and check your information.</a></p>";
exit;
}
//create a table in that dbase
$sql_ban ="
CREATE TABLE IF NOT EXISTS banned
(
no_access VARCHAR(30),
type VARCHAR(10)
)
";
$result_ban = @mysql_query($sql_ban,$connection)
or die(mysql_error());
if ($result_ban)
{
echo "Table banned has been created.<br>";
}else{
echo "<p>There was an error creating the table.</p>";
echo "<p><a href=\"javascript:history.go(-2)\">Please go back and check your information.</a></p>";
exit;
}
//create a table in that dbase
$sql_trash ="
CREATE TABLE IF NOT EXISTS trash
(
firstname VARCHAR(20),
lastname VARCHAR(20),
username VARCHAR(20),
password VARCHAR(50),
group1 VARCHAR(20),
group2 VARCHAR(20),
group3 VARCHAR(20),
pchange VARCHAR(1),
email VARCHAR(100),
redirect VARCHAR(100),
verified VARCHAR(1),
last_login DATE,
del_date DATE
)
";
$result_trash = @mysql_query($sql_trash,$connection)
or die(mysql_error());
if ($result_trash)
{
echo "Table trash has been created.<br>";
}else{
echo "<p>There was an error creating the table.</p>";
echo "<p><a href=\"javascript:history.go(-2)\">Please go back and check your information.</a></p>";
exit;
}
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Login - Redirect Installation</title>
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body>
<table border="1" width="100%" id="table1">
<tr>
<td width="100%">
<?php
$_SESSION[config] = "
&lt;?
//set up the names of the database and table
\$db_name =\"$_SESSION[dbase_name]\";
\$table_name =\"$_SESSION[table_name]\";
//connect to the server and select the database
\$server = \"$_SESSION[dbase_server]\";
\$dbusername = \"$_SESSION[dbase_username]\";
\$dbpassword = \"$_SESSION[dbase_password]\";
//domain information
\$domain = \"$_SESSION[domain]\";
//Change to \"0\" to turn off the login log
\$log_login = \"$_SESSION[log_login]\";
//base_dir is the location of the files, ie http://www.yourdomain/login
\$base_dir = \"$_SESSION[install_dir]\";
//length of time the cookie is good for - 7 is the days and 24 is the hours
//if you would like the time to be short, say 1 hour, change to 60*60*1
\$duration = time()+(60*60*24*30);
//the site administrator\'s email address
\$adminemail = \"$_SESSION[admin_email]\";
//sets the time to EST
\$zone=3600*$_SESSION[time_zone];
//do you want the verify the new user through email if the user registers themselves?
//yes = \"0\" : no = \"1\"
\$verify = \"$_SESSION[verify_email]\";
//default redirect, this is the URL that all self-registered users will be redirected to
\$default_url = \"$_SESSION[default_url]\";
//minimum and maximum password lengths
\$min_pass = $_SESSION[min_pass_len];
\$max_pass = $_SESSION[max_pass_len];
\$num_groups = $_SESSION[group_number]+2;
\$group_array = array(";
$i = 0;
while ($i < $_SESSION[group_number])
{
$group = "group$i";
$_SESSION[config] .= "\"$group_array[$i]\", ";
$i++;
}
$_SESSION[config] .= "\"Users\",";
$_SESSION[config] .= "\"Administrators\");
?>";
include ('create_admin.php');
?></tr>
</table>
</body>
</html>

81
install/install_3.php Normal file
View File

@ -0,0 +1,81 @@
<?php
session_start(install);
include ('header.html');
include ('../functions.php');
$admin_username = $_POST[username];
if (!$_POST[first_name] || !$_POST[last_name] || !$_POST[user_name] || !$_POST[password] || !$_POST[redirect_to])
{
echo "<p>You must complete all of the fields, please <a href=\"create_admin.php\">Go Back </a>and complete all of the fields.</p>";
exit;
}
$pass_len = password_check($_SESSION[min_pass_len], $_SESSION[max_pass_len], $_POST[password]);
if ($pass_len == "no")
{
echo "<p>You must use a password between $_SESSION[min_pass_len] and $_SESSION[max_pass_len] characters in length, please <a href=\"create_admin.php\">Go Back </a>and try again.</p>";
exit;
}
//make connection to dbase
$connection = @mysql_connect($_SESSION[dbase_server], $_SESSION[dbase_username], $_SESSION[dbase_password])
or die(mysql_error());
$db = @mysql_select_db($_SESSION[dbase_name],$connection)
or die(mysql_error());
$check_name = "SELECT * FROM $_SESSION[table_name] WHERE username = '$_POST[user_name]'";
$name_result = @mysql_query($check_name,$connection) or die(mysql_error());
//get the number of rows in the result set
$num = mysql_num_rows($name_result);
if ($num != 0)
{
echo "<p>That username already exists. Please <a href=\"create_admin.php\">Go Back </a>and enter a different username.</p>";
exit;
}
$date = last_login();
//enter information into table
$sql = "INSERT INTO $_SESSION[table_name] VALUES
('$_POST[first_name]', '$_POST[last_name]', '$_POST[user_name]',
password('$_POST[password]'), 'Administrators', '', '', '0', '$_SESSION[admin_email]',
'$_POST[redirect_to]', '1', '$date')";
$result = @mysql_query($sql,$connection) or die(mysql_error());
if($result)
{
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Login - Redirect Installation</title>
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<?php
echo "<p>The Administrators Account has been Successfully Created.</p>";
echo "<p>The last step is to create a file named config.php.<br>";
echo "Copy and paste the below into this file and upload to $_SESSION[install_dir].</p>";
echo "<textarea rows=\"47\" name=\"S1\" cols=\"120\" style=\"font-family: Tahoma; font-size: 8pt\">$_SESSION[config]</textarea></p>";
echo "<p>For a sample of the header of each secure page, please <a href=\"../smpl_sec_header.php\">Click Here</a></p>";
echo "<p>Should you have any difficulties, please visit the Help Forum:";
echo "<br><a href=\"http://www.mpdolan.com/bb\">MPDolan.com Help Forum</a></p>";
echo "<p>Please login as with the Adminstrator's Account to complete testing.";
echo "<br><a href =\"$_SESSION[install_dir]/login.html\">Login Now</a></p><br>";
}
?>
</html>

21
install/message.php Normal file
View File

@ -0,0 +1,21 @@
<?
session_start(install);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<p>
<textarea rows="47" name="S1" cols="120" style="font-family: Tahoma; font-size: 8pt">$_SESSION[config]</textarea></p>
</body>
</html>

11
install/sessions.php Normal file
View File

@ -0,0 +1,11 @@
<?
session_start(install);
echo $_SESSION[dbase_name];
echo $_SESSION[dbase_server];
echo $_SESSION[dbase_username];
echo $_SESSION[dbase_password];
echo $_SESSION[table_name];
echo $_SESSION[install_dir];
?>

24
login.html Normal file
View File

@ -0,0 +1,24 @@
<HTML>
<HEAD>
<TITLE>Login</TITLE>
</HEAD>
<BODY>
<H1><font face="Verdana" size="4" color="#2852A8">Login to Secure Area</font></H1>
<FORM METHOD="POST" ACTION="redirect.php">
<P><font face="Verdana" size="2" color="#2852A8"><STRONG>Username:</STRONG><BR>
</font><font color="#2852A8" face="Verdana">
<INPUT TYPE="text" NAME="username" SIZE=25 MAXLENGTH=25></font></p>
<P><font face="Verdana" size="2" color="#2852A8"><STRONG>Password:</STRONG><BR>
</font><font color="#2852A8" face="Verdana">
<INPUT TYPE="password" NAME="password" SIZE=25 MAXLENGTH=25></font></p>
<P><font face="Verdana"><font color="#2852A8">
<input type="checkbox" name="remember" value="Yes"></font><font size="2" color="#2852A8">Remember
me from this computer</font></font></p>
<P><font color="#2852A8">
<INPUT TYPE="submit" NAME="submit" VALUE="Login" style="font-family: Verdana"></font></P>
</FORM>
<p><font color="#2852A8" face="Verdana" size="2"><a href="emailpass.html">
<font color="#2852A8">Click here if would like your username and password to be
e-mailed to the address we have on file.</font></a></font></p>
</BODY>
</HTML>

60
loglogin.php Normal file
View File

@ -0,0 +1,60 @@
<?
session_start();
//include config file
include ('config.php');
//sets date and time variables
$last = gmdate("Y-m-d");
$time = gmdate("H:i", time() + $zone);
$viewer = $HTTP_USER_AGENT;
//checks to see if the browser the user is using is determinable
$browser = "unknown";
if (preg_match("/Netscape/", $viewer))
{
$browser = "Netscape";
}
else if (preg_match("/Opera/", $viewer))
{
$browser = "Opera";
}else if (preg_match("/Firefox/", $viewer))
{
$browser = "FireFox";
}else if (preg_match("/MSIE/", $viewer))
{
$browser = "Internet Explorer";
}
//checks to see if the OS the user is using is determinable
$platform = "unknown";
if (preg_match("/Windows NT/", $viewer))
{
$platform = "Windows";
}
else if (preg_match("/Windows CE/", $viewer))
{
$platform = "Windows PPC";
}
else if (preg_match("/Linux/", $viewer))
{
$platform = "Linux";
}
else if (preg_match("/Mac/", $viewer))
{
$platform = "MAC";
}
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//build and issue the query
$sql ="INSERT INTO log_login VALUES
('$_SESSION[user_name]', '$last', '$time', '$REMOTE_ADDR', '$platform', '$browser')";
$result = @mysql_query($sql,$connection) or die(mysql_error());
?>

13
logout.php Normal file
View File

@ -0,0 +1,13 @@
<?
include ("config.php");
//destroys the session, the variables are not longer set
session_start();
session_destroy();
?>
<html>
<meta http-equiv="refresh" content="0;url=http://www<?php echo $domain; ?>">
</html>

34
logs/index.php Normal file
View File

@ -0,0 +1,34 @@
<?php
session_start();
include("../config.php");
include("../functions.php");
if (allow_access(Administrators) != "yes")
{
header("Location:../login.html");
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Log Viewer</title>
</head>
<frameset cols="170,*">
<frame name="contents" target="main" src="log.html">
<frame name="main" src="log.php">
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>

46
logs/log.html Normal file
View File

@ -0,0 +1,46 @@
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 2</title>
<base target="main">
</head>
<body>
<form method="POST" action="log.php" target="main" name="sort">
<p>
<b><font face="Tahoma" size="2">Ordenar por:</font></b>
<select size="1" id="id1" name="D1" style="font-family: Tahoma; font-size: 8pt">
<option value="username">Usuario</option>
<option value="date">Fecha</option>
<option value="ip_addr">Dirección IP</option>
<option value="oper_sys">Sistema operativo</option>
<option value="brow">Navegador</option>
</select><br>
<input type="submit" name="B1" style="font-family: Tahoma; font-size: 8pt"></p>
</form>
<p><br>
<br>
<br>
<br>
<i><b><font face="Tahoma" size="2">ARIN WhoIs</font></b></i></p>
</p>
<form METHOD="POST" ACTION="http://ws.arin.net/cgi-bin/whois.pl" target="_blank">
<p align="left"><b><font FACE="Tahoma" SIZE="2">Buscar:</font></b> <br>
<input TYPE="text" NAME="queryinput" SIZE="20"><br>
<input TYPE="submit" style="font-family: Tahoma; font-size:8pt">
<br>
</p>
</form>
<p align="left"><br>
<i><b><font face="Tahoma" size="2">
<a target="_top" href="../admin/adminpage.php">Volver a la página de administración</a></font></b></i></p>
</body>
</html>

36
logs/log.php Normal file
View File

@ -0,0 +1,36 @@
<?php
session_start();
include("../config.php");
include("../functions.php");
//make connection to dbase
$connection = @mysql_connect($server, $dbusername, $dbpassword)
or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)
or die(mysql_error());
$sql="SELECT * FROM log_login ORDER BY '$_POST[D1]'";
$result = @mysql_query($sql, $connection) or die(mysql_error());
while ($sql = mysql_fetch_object($result))
{
$user = $sql -> username;
$whend = $sql -> date;
$whent = $sql -> time;
$ip_add = $sql -> ip_addr;
$operat = $sql -> oper_sys;
$browse = $sql -> brow;
echo "<p><font size=\"1\" face=\"Tahoma\"><b>Usuario: </b>$user</font><br>";
echo "<font size=\"1\" face=\"Tahoma\"><b>Fecha: </b>$whend</font><br>";
echo "<font size=\"1\" face=\"Tahoma\"><b>Hora: </b>$whent</font><br>";
echo "<font size=\"1\" face=\"Tahoma\"><b>Dirección IP: </b>$ip_add</font><br>";
echo "<font size=\"1\" face=\"Tahoma\"><b>Sistema operativo: </b>$operat</font><br>";
echo "<font size=\"1\" face=\"Tahoma\"><b>Navegador: </b>$browse</font></p>";
}
?>

29
no_access.html Normal file
View File

@ -0,0 +1,29 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>NO ACCESS ALLOWED</title>
</head>
<body>
<b><font size="6">Access Denied!!!</font></b><p>Please login with proper
credentials:</p>
<FORM METHOD="POST" ACTION="redirect.php">
<P><font face="Verdana" size="2" color="#2852A8"><STRONG>Username:</STRONG><BR>
</font><font color="#2852A8" face="Verdana">
<INPUT TYPE="text" NAME="username" SIZE=25 MAXLENGTH=25></font></p>
<P><font face="Verdana" size="2" color="#2852A8"><STRONG>Password:</STRONG><BR>
</font><font color="#2852A8" face="Verdana">
<INPUT TYPE="password" NAME="password" SIZE=25 MAXLENGTH=25></font></p>
<P><font face="Verdana"><font color="#2852A8">
<input type="checkbox" name="remember" value="Yes"></font><font size="2" color="#2852A8">Remember
me from this computer</font></font></p>
<P><font color="#2852A8">
<INPUT TYPE="submit" NAME="submit" VALUE="Login" style="font-family: Verdana"></font></P>
</FORM>
<p>&nbsp;</p>
</body>
</html>

15
not_activated.html Normal file
View File

@ -0,0 +1,15 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Account Not Activated</title>
</head>
<body>
<p>Your account must be activated before you can log in, please visit the
activation page that was included in the email we sent you.</p>
</body>
</html>

36
pass_change.html Normal file
View File

@ -0,0 +1,36 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Password Change</title>
<script Language="JavaScript">
<!--
function Form1_Validator(theForm)
{
if (theForm.p_word.value != theForm.password2.value)
{
alert("The two passwords are not the same.");
theForm.password2.focus();
return (false);
}
}
//--></script>
</head>
<body>
<form method="POST" action="pass_change.php" onsubmit="return Form1_Validator(this)" language="JavaScript" name="Form1">
<p><b><font face="Tahoma">Password Change </font></b></p>
<p><font face="Tahoma"><font size="2">New Password:<br>
</font><input type="password" name="p_word" size="20"><font size="2"><br>
Confirm Password:<br>
</font><input type="password" name="password2" size="20"></font></p>
<p><font face="Tahoma"><input type="submit" value="Submit" name="B1"></font></p>
</form>
&nbsp;</body>
</html>

80
pass_change.php Normal file
View File

@ -0,0 +1,80 @@
<?php
//prevents caching
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
session_start();
//include config and functions files
include ('config.php');
include ('functions.php');
//if user tries to access this page without logging in, this will send the user back to login.html
if (!$_SESSION[user_name])
{
header('Location:login.html');
exit;
}
//checks password length
if (password_check($min_pass, $max_pass, $_POST[p_word]) == "no")
{
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="refresh" content="0; url=pass_change.html">
<title>Password Change</title>
<script language="JavaScript">
<!--
function FP_popUpMsg(msg) {//v1.0
alert(msg);
}
// -->
</script>
</head>
<body onload="FP_popUpMsg('Your password must be between <? echo $min_pass; ?> & <? echo $max_pass; ?> characters.')">
</body>
</html>
<?
exit;
}
//make connection to dbase
$connection = @mysql_connect($server, $dbusername, $dbpassword)
or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)
or die(mysql_error());
//updates the table with the new password
$sql = "UPDATE $table_name SET
password = password('$_POST[p_word]')
WHERE username = '$_SESSION[user_name]'";
$result = @mysql_query($sql, $connection) or die(mysql_error());
$_SESSION[password] = $_POST[p_word];
//resets the password change required to no
$set_chng = "UPDATE $table_name SET
pchange = '0' WHERE username = '$_SESSION[user_name]'";
$result1 = @mysql_query($set_chng, $connection) or die(mysql_error());
//gets that users redirect to
$get_redir = "SELECT * FROM $table_name WHERE username = '$_SESSION[user_name]'";
$result2 = @mysql_query($get_redir, $connection) or die(mysql_error());
while ($get_redir = mysql_fetch_object($result2))
{
$_SESSION[redirect] = $get_redir -> redirect;
}
//sends the user to their redirect to
header("Location:$_SESSION[redirect]");
exit;
?>

108
redirect.php Normal file
View File

@ -0,0 +1,108 @@
<?
//prevents caching
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
session_start();
//clear session variables
session_unset();
//require the functions file
require ("config.php");
require ("functions.php");
//check to see if cookies are already set, remember me
if ((!$lr_user) || (!$lr_pass))
{
$username = $_POST[username];
$password = $_POST[password];
}else{
$username = $lr_user;
$password = $lr_pass;
}
//if username or password is blank, send to errorlogin.html
if ((!$username) || (!$password))
{
header("Location:$base_dir/errorlogin.html");
exit;
}
//sets cookies to remember this computer if the user asks to
if ($_POST[remember] == "Yes")
{
setcookie("lr_user", $username, $duration, "/", $domain);
setcookie("lr_pass", $password, $duration, "/", $domain);
}
if ($_POST[activate] == "Yes")
{
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//build and issue the query
$sql ="UPDATE $table_name SET verified = '1' WHERE username = '$_POST[username]'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
}
//sets session variables
sess_vars($base_dir, $server, $dbusername, $dbpassword, $db_name, $table_name, $username, $password);
//check to see if the user has to change their password
if ($_SESSION[pchange] == "1")
{
$_SESSION[redirect] = "$base_dir/pass_change.html";
}
//check to see if the user has activated the account
if ($_SESSION[verified] == "0")
{
$_SESSION[redirect] = "$base_dir/not_activated.html";
}
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//build and issue the query
$sql ="SELECT * FROM banned";
$result = @mysql_query($sql,$connection) or die(mysql_error());
while ($sql = mysql_fetch_object($result))
{
$banned = $sql -> no_access;
if ($username == $banned || $REMOTE_ADDR == $banned)
{
include ('banned.html');
exit;
}
}
$last_log = last_login();
//updates table with last log as now
$sql = "UPDATE $table_name SET last_login = '$last_log' WHERE username = '$_SESSION[user_name]'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
if (($_SESSION[redirect] != "$base_dir/errorlogin.html") && ($log_login == "1"))
{
include('loglogin.php');
}
//redirects the user
header("Location:$_SESSION[redirect]");
?>
<head><title>Redirect</title></head>

79
register.html Normal file
View File

@ -0,0 +1,79 @@
<HTML>
<HEAD>
<TITLE>Registration</TITLE>
<script Language="JavaScript">
<!--
function Form1_Validator(theForm)
{
if (theForm.firstname.value == "")
{
alert("Please enter a value for the \"firstname\" field.");
theForm.firstname.focus();
return (false);
}
if (theForm.lastname.value == "")
{
alert("Please enter a value for the \"lastname\" field.");
theForm.firstname.focus();
return (false);
}
if (theForm.username.value == "")
{
alert("Please enter a value for the \"username\" field.");
theForm.firstname.focus();
return (false);
}
if (theForm.email.value == "")
{
alert("Please enter a value for the \"email\" field.");
theForm.email.focus();
return (false);
}
if (theForm.password.value == "")
{
alert("Please enter a value for the \"password\" field.");
theForm.email.focus();
return (false);
}
if (theForm.password.value != theForm.confirm.value)
{
alert("The two passwords are not the same.");
theForm.confirm.focus();
return (false);
}
}
//--></script>
</head>
<BODY>
<H1 style="margin-top: 0; margin-bottom: 0"><font face="Tahoma" size="4">
Register</font></H1>
<FORM METHOD="POST" ACTION="register.php" onsubmit="return Form1_Validator(this)" language="JavaScript" name="Form1">
<P style="margin-top: 0; margin-bottom: 0"><font face="Tahoma">
<strong style="font-weight: 400"><font size="2">First Name:</font></strong><font size="2"><BR>
</font><font face="Tahoma" size="1">
<INPUT NAME="firstname" SIZE=25 MAXLENGTH=50></font></font></p>
<P style="margin-top: 0; margin-bottom: 0"><font face="Tahoma">
<strong style="font-weight: 400"><font size="2">Last Name:</font></strong><font size="2"><BR>
</font><font face="Tahoma" size="1">
<INPUT NAME="lastname" SIZE=25 MAXLENGTH=50><br>
</font><font face="Tahoma" size="2">
Username:</font><font face="Tahoma" size="1"><br>
<INPUT NAME="username" SIZE=25 MAXLENGTH=50></font></font></p>
<P style="margin-top: 0; margin-bottom: 0"><font face="Tahoma">
<strong style="font-weight: 400"><font size="2">Password:</font></strong><font size="2"><BR>
</font><font face="Tahoma" size="1">
<INPUT TYPE="password" NAME="password" SIZE=25 MAXLENGTH=25><br>
</font><font size="2"><strong style="font-weight: 400">Confirm Password:</strong></font><font face="Tahoma" size="1"><br>
<INPUT TYPE="password" NAME="confirm" SIZE=25 MAXLENGTH=25></font></font></p>
<P style="margin-top: 0; margin-bottom: 0"><strong style="font-weight: 400">
<font face="Tahoma" size="2">E-Mail Address</font></strong><font face="Tahoma"><strong style="font-weight: 400"><font size="2">:</font></strong><font size="2"><BR>
</font><font face="Tahoma" size="1">
<INPUT TYPE="text" NAME="email" SIZE=25 MAXLENGTH=100></font></font></p>
<P style="margin-top: 0; margin-bottom: 0">
<INPUT TYPE="submit" NAME="submit" VALUE="Submit" style="font-family: Tahoma"></p>
</FORM>
</BODY>
</HTML>

98
register.php Normal file
View File

@ -0,0 +1,98 @@
<?
//prevents caching
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
session_start();
//require the config file
require ("config.php");
require ("functions.php");
//checks password length
if (password_check($min_pass, $max_pass, $_POST[password]) == "no")
{
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="refresh" content="0; url=javascript:history.go(-1)">
<title>Registration</title>
<script language="JavaScript">
<!--
function FP_popUpMsg(msg) {//v1.0
alert(msg);
}
// -->
</script>
</head>
<body onload="FP_popUpMsg('Your password must be between <? echo $min_pass; ?> & <? echo $max_pass; ?> characters.')">
</body>
</html>
<?
exit;
}
//make the connection to the database
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
//make query to database
$sql ="SELECT * FROM $table_name WHERE username= '$_POST[username]'";
$result = @mysql_query($sql,$connection) or die(mysql_error());
//get the number of rows in the result set
$num = mysql_num_rows($result);
//checks it see if that username already exists
if ($num != 0){
echo "<P>Sorry, that username already exists.</P>";
echo "<P><a href=\"#\" onClick=\"history.go(-1)\">Try Another Username.</a></p>";
exit;
}else{
$sql = "INSERT INTO $table_name VALUES
('$_POST[firstname]', '$_POST[lastname]', '$_POST[username]', password('$_POST[password]'), 'Users', '', '', '$pchange',
'$_POST[email]', '$default_url', '$verify', '')";
$result = @mysql_query($sql,$connection) or die(mysql_error());
}
//checks to see if the user needs to verify their email address before accessing the site
if ($verify == "0")
{
$mailheaders = "From: www$domain\n";
$mailheaders .= "Your account has been created.\n";
$mailheaders .= "Please activate your account now by visiting this page:\n";
$mailheaders .= "$base_dir/activate.html\n";
$to = "$_POST[email]";
$subject = "Please activate your account";
mail($to, $subject, $mailheaders, "From: No Reply <$adminemail>\n");
}else{
header('Location:login.html');
}
?>
<HTML>
<HEAD>
<TITLE>Add a User</TITLE>
</HEAD>
<BODY>
<H1>Please check your email to activate your account.</H1>
</BODY>
</HTML>

51
smpl_sec_header.php Normal file
View File

@ -0,0 +1,51 @@
<?php
$abs = getcwd();
$viewer = $HTTP_USER_AGENT;
echo "&lt;?php<br><br>
//prevents caching<br>
header(\"Expires: Sat, 01 Jan 2000 00:00:00 GMT\");<br>
header(\"Last-Modified: \".gmdate(\"D, d M Y H:i:s\").\" GMT\");<br>
header(\"Cache-Control: post-check=0, pre-check=0\",false);<br>
session_cache_limiter();<br>
session_start();<br>
<br>";
if (preg_match("/Windows NT/", $viewer))
{
echo "require('$abs\config.php');<br>
<br>
require('$abs\functions.php'); <br>
<br>";
}
else
{
echo "require('$abs/config.php');<br>
<br>
require('$abs/functions.php'); <br>
<br>";
}
echo "
//this is group name or username of the group or person that you wish to allow access to<br>
// - please be advise that the Administrators Groups has access to all pages.<br>
if (allow_access(Administrators) != \"yes\")<br>
{ <br>
";
if (preg_match("/Windows NT/", $viewer))
{
echo "
include ('$abs\\no_access.html'); <br>
";
}
else
{
echo "include ('$abs/no_access.html'); <br>";
}
echo "
exit;<br>
}<br>
?>";
?>

72
style.css Normal file
View File

@ -0,0 +1,72 @@
body {
font-family: Verdana;
font-size: 11px;
}
a:hover {
color: #0000ff;
font-family: Tahoma;
text-decoration: underline overline;
}
a:visited, a:active {
color: #0000ff;
font-family: Tahoma;
text-decoration: none;
}
a:link {
color: #0000ff;
font-family: Tahoma;
text-decoration: overline underline;
}
td {
font-family: Verdana;
font-size: 8pt;
}
a {
font-family: Tahoma;
}
h1 {
font-family: Tahoma;
}
h2 {
font-family: Tahoma;
}
h3 {
font-family: Tahoma;
}
h4 {
font-family: Tahoma;
}
h5 {
font-family: Tahoma;
}
h6 {
font-family: Tahoma;
}
p {
font-family: Tahoma;
}
tr {
font-family: Tahoma;
}
<form> {
font-family: Verdana;
}
<input> {
color: #0080ff;
font-family: Verdana;
}