Muchos cambios
git-svn-id: https://192.168.0.254/svn/Proyectos.LaFactoriaVerde_Web/trunk@2 017afc1c-778d-45dc-8efe-cc7a6876851a
@ -1,19 +1,33 @@
|
|||||||
<HTML>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
<HEAD>
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<TITLE>Activar cuenta</TITLE>
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
</HEAD>
|
<head>
|
||||||
<BODY>
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
<H1><font face="Verdana" size="4" color="#2852A8">Activar tu cuenta</font></H1>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<FORM METHOD="POST" ACTION="redirect.php">
|
<title>Activar cuenta</title>
|
||||||
<P><font face="Verdana" size="2" color="#2852A8"><STRONG>Usuario:</STRONG><BR>
|
<style type="text/css">
|
||||||
</font><font color="#2852A8" face="Verdana">
|
/*<![CDATA[*/
|
||||||
<INPUT TYPE="text" NAME="username" SIZE=25 MAXLENGTH=25></font></p>
|
p.c5 {color: #2852A8}
|
||||||
<P><font face="Verdana" size="2" color="#2852A8"><STRONG>Contraseña:</STRONG><BR>
|
input.c4 {font-family: Verdana}
|
||||||
</font><font color="#2852A8" face="Verdana">
|
span.c3 {color: #2852A8; font-family: Verdana}
|
||||||
<INPUT TYPE="password" NAME="password" SIZE=25 MAXLENGTH=25></font></p>
|
span.c2 {color: #2852A8; font-family: Verdana; font-size: 80%}
|
||||||
<input type="hidden" name="activate" value="Yes"></p>
|
h1.c1 {color: #2852A8; font-family: Verdana; font-size: 120%}
|
||||||
<P><font color="#2852A8">
|
/*]]>*/
|
||||||
<INPUT TYPE="submit" NAME="submit" VALUE="Activar" style="font-family: Verdana"></font></P>
|
</style>
|
||||||
</FORM>
|
</head>
|
||||||
</BODY>
|
|
||||||
</HTML>
|
<body>
|
||||||
|
<h1 class="c1">Activar tu cuenta</h1>
|
||||||
|
|
||||||
|
<form method="post" action="redirect.php">
|
||||||
|
<p><span class="c2"><strong>Usuario:</strong><br /></span> <span class=
|
||||||
|
"c3"><input type="text" name="username" size="25" maxlength="25" /></span></p>
|
||||||
|
|
||||||
|
<p><span class="c2"><strong>Contraseña:</strong><br /></span> <span class=
|
||||||
|
"c3"><input type="password" name="password" size="25" maxlength=
|
||||||
|
"25" /></span></p><input type="hidden" name="activate" value="Yes" />
|
||||||
|
|
||||||
|
<p class="c5"><input type="submit" name="submit" value="Activar" class="c4" /></p>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
9
admin/_menu.php
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
<ul class="menu orange" style="clear: both;">
|
||||||
|
<li <?php if (($menu_activo == "inicio") || ($menu_activo == "")) { echo "class='current'"; }?> ><a href="adminpage.php" target="_self">Inicio</a></li>
|
||||||
|
<li <?php if ($menu_activo == "nuevo_usuario") { echo "class='current'"; }?>><a href="newuser.php" target="_self">Añadir usuario</a></li>
|
||||||
|
<!--<li <?php if ($menu_activo == "modificar_usuario") { echo "class='current'"; }?>><a href="adminpage.php" target="_self">Modificar usuario</a></li>-->
|
||||||
|
<li <?php if ($menu_activo == "log") { echo "class='current'"; }?>><a href="../logs/index.php" target="_self">Registro de accesos</a></li>
|
||||||
|
<li <?php if ($menu_activo == "mail_masivo") { echo "class='current'"; }?>><a href="mail_all.php" target="_self">E-mail masivo</a></li>
|
||||||
|
<li><a href="../logout.php" target="_self">Salir</a></li>
|
||||||
|
</ul>
|
||||||
@ -1,46 +1,69 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
//prevents caching
|
//prevents caching
|
||||||
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
|
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
|
||||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
header("Cache-Control: post-check=0, pre-check=0",false);
|
header("Cache-Control: post-check=0, pre-check=0",false);
|
||||||
session_cache_limiter();
|
session_cache_limiter();
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
//require the config file
|
require('../config.php');
|
||||||
require ("../config.php");
|
require('../functions.php');
|
||||||
require ("../functions.php");
|
|
||||||
|
|
||||||
if ($page == ""){$page = 1;}
|
//check for administrative rights
|
||||||
if ($max_results == ""){$max_results = 5;}
|
if (allow_access(Administrators) != "yes")
|
||||||
|
{
|
||||||
|
include ('../check_login.php');
|
||||||
|
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());
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Añadir nuevo usuario - La Factoría Verde</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="estilos.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="layout">
|
||||||
|
<div id="header"> <img src="../img/lafactoriaverde.gif" alt="La Factoría Verde" />
|
||||||
|
<div style="float: right;">Sesión iciada como <?php echo $_SESSION[user_name]; ?></div>
|
||||||
|
<?php include('_menu.php'); ?>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
|
<?php
|
||||||
|
//check for authority to view this page
|
||||||
|
if (allow_access(Administrators) != "yes")
|
||||||
|
{
|
||||||
|
echo "<br/><br/><br/><center><p class='error'>No tienes autorización para esta función.</p></center>";
|
||||||
|
}
|
||||||
|
|
||||||
//check required fields
|
//check required fields
|
||||||
if (($_POST[username] == ""))
|
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";
|
echo "<br/><br/><br/><center><p class='error'>El campo 'Usuario' no puede estar en blanco. <a href=\"#\" onClick=\"history.go(-1)\">Vuelve atrás</a> y cámbialo.</p></center>";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//check the password length
|
//check the password length
|
||||||
$pass_len = password_check($min_pass, $max_pass, $_POST[password]);
|
$pass_len = password_check($min_pass, $max_pass, $_POST[password]);
|
||||||
if ($pass_len == "no")
|
if ($pass_len == "no")
|
||||||
{
|
{
|
||||||
|
echo "<br/><br/><br/><center><p class='error'>La contraseña debe tener una longitud entre $min_pass y $max_pass caracteres. <a href=\"#\" onClick=\"history.go(-1)\">Vuelve atrás</a> y cámbiala.</p></center>";
|
||||||
|
|
||||||
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;
|
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
|
//make the connection to the database
|
||||||
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
|
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
|
||||||
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
|
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
|
||||||
@ -53,26 +76,24 @@ $result = @mysql_query($sql,$connection) or die(mysql_error());
|
|||||||
$num = mysql_num_rows($result);
|
$num = mysql_num_rows($result);
|
||||||
|
|
||||||
//check if that username already exists
|
//check if that username already exists
|
||||||
if ($num != 0){
|
if ($num != 0) {
|
||||||
|
echo "<p>El usuario '".$_POST[username]."'ya existe.</p>";
|
||||||
|
echo "<p><a href=\"#\" onClick=\"history.go(-1)\">Prueba con otro nombre de usuario.</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()')";
|
||||||
|
|
||||||
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{
|
$result = @mysql_query($sql_add,$connection) or die(mysql_error());
|
||||||
|
|
||||||
//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")
|
/*if ($_POST[email_user] == "Yes")
|
||||||
{
|
{
|
||||||
$mailheaders = "From: $domain\n";
|
$mailheaders = "From: $domain\n";
|
||||||
$mailheaders .= "Dear $_POST[firstname] $_POST[lastname],\n";
|
$mailheaders .= "Dear $_POST[firstname] $_POST[lastname],\n";
|
||||||
@ -91,70 +112,64 @@ if ($_POST[email_user] == "Yes")
|
|||||||
$subject = "Your account has been created !!";
|
$subject = "Your account has been created !!";
|
||||||
|
|
||||||
mail($to, $subject, $mailheaders, "From: No Reply <$adminemail>\n");
|
mail($to, $subject, $mailheaders, "From: No Reply <$adminemail>\n");
|
||||||
|
}*/
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<html>
|
<h2>Usuario añadido correctamente</h2>
|
||||||
|
<br/>
|
||||||
<head>
|
<table id="table1" width="100%" >
|
||||||
<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>
|
<tr>
|
||||||
<td width="154"><font face="Tahoma" size="2">First Name:</td>
|
<td width="177">Nombre:</td>
|
||||||
<td><?php echo $_POST[firstname]; ?></font></td>
|
<td><?php echo $_POST[firstname]; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="154"><font face="Tahoma" size="2">Last Name:</td>
|
<td width="177">Apellidos:</td>
|
||||||
<td><?php echo $_POST[lastname]; ?></font></td>
|
<td><?php echo $_POST[lastname]; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="154"><font face="Tahoma" size="2">Username:</td>
|
<td width="177">Usuario:</td>
|
||||||
<td><?php echo $_POST[username]; ?></font></td>
|
<td><?php echo $_POST[username]; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="154"><font face="Tahoma" size="2">Password:</td>
|
<td width="177">Contraseña:</td>
|
||||||
<td><?php echo $_POST[password]; ?></font></td>
|
<td><?php echo $_POST[password]; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="154"><font face="Tahoma" size="2">E-Mail:</td>
|
<td width="177">E-Mail:</td>
|
||||||
<td><?php echo $_POST[email]; ?></font></td>
|
<td><?php echo $_POST[email]; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<td width="154"><font face="Tahoma" size="2">Group Memberships:</td>
|
<td width="177">Grupo:</td>
|
||||||
<td><?php echo $_POST[group1]; ?> </td>
|
<td><?php echo $_POST[group1]; ?> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="154"> </td>
|
<td width="177"> </td>
|
||||||
<td><?php echo $_POST[group2]; ?> </td>
|
<td><?php echo $_POST[group2]; ?> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="154"> </td>
|
<td width="177"> </td>
|
||||||
<td><?php echo $_POST[group3]; ?> </font></td>
|
<td><?php echo $_POST[group3]; ?> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="154"><font face="Tahoma" size="2">Redirect to:</font></td>
|
<td width="177">Redirigir a:</td>
|
||||||
<td><?php echo $_POST[redirect]; ?></font></td>
|
<td><?php echo $_POST[redirect]; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="154"><font face="Tahoma" size="2">Password Change Req'd:</td>
|
<td width="177">Cambio de contraseña:</td>
|
||||||
<td><?php if($_POST[pchange] == "1"){$ans1="Yes";}else{$ans1="No";} echo $ans1; ?></td>
|
<td><?php if($_POST[pchange] == "1"){ $ans1="Si"; } else { $ans1="No"; } echo $ans1; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="154"><font face="Tahoma" size="2">User E-Mailed:</td>
|
<td width="177">Enviar e-mail al usuario:</td>
|
||||||
<td><?php echo $_POST[email_user]; ?></font></td>
|
<td><?php echo $_POST[email_user]; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
<br/>
|
||||||
|
<center>
|
||||||
|
<a href="<?php echo "adminpage.php"; ?>">Volver a la lista</a>
|
||||||
|
</center>
|
||||||
|
</div>
|
||||||
|
<div id="footer"> </div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
1117
admin/adminpage.php
993
admin/adminpage2.php
Normal 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 ('../check_login.php');
|
||||||
|
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"> </td>
|
||||||
|
<td> </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"> </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"> </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"> </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> </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">
|
||||||
|
</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">
|
||||||
|
</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> </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> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="38%">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="38%">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="38%">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="38%">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="38%">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="38%">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="38%">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="38%">
|
||||||
|
</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\"> </td>";
|
||||||
|
echo "<td width=\"100\">Name:</td>";
|
||||||
|
echo "<td>$fname $lname</td>";
|
||||||
|
echo "</tr>";
|
||||||
|
|
||||||
|
echo "<tr>";
|
||||||
|
echo "<td width=\"100\"> </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\"><< </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\"> >></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"> </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 "; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="177">Last Login:</td>
|
||||||
|
<td><? echo $last; ?> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="177">Password Change Required:</td>
|
||||||
|
<td><? echo $p_change; ?> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="177">Verified Through E-Mail:</td>
|
||||||
|
<td><? echo $verif_d; ?> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="177">Group Memberships:</td>
|
||||||
|
<td><? echo $groupA; ?> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="177"> </td>
|
||||||
|
<td><? echo $groupB; ?> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="177"> </td>
|
||||||
|
<td><? echo $groupC; ?> </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>
|
||||||
146
admin/changeuser.php
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
<?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 ('../check_login.php');
|
||||||
|
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());
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Modificar usuario - La Factoría Verde</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="estilos.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="layout">
|
||||||
|
<div id="header"> <img src="../img/lafactoriaverde.gif" alt="La Factoría Verde" />
|
||||||
|
<div style="float: right;">Sesión iniciada como <?php echo $_SESSION[user_name]; ?></div>
|
||||||
|
<?php
|
||||||
|
$menu_activo='nuevo_usuario';
|
||||||
|
include('_menu.php');
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
|
<h2>Dar de alta un nuevo usuario</h2>
|
||||||
|
<br/>
|
||||||
|
<form method="POST" action="<?php echo "adduser.php";?>">
|
||||||
|
<table width="100%" id="table44">
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Nombre:</td>
|
||||||
|
<td><input type="text" name="firstname" size="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Apellidos:</td>
|
||||||
|
<td><input type="text" name="lastname" size="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Usuario:</td>
|
||||||
|
<td><input type="text" name="username" size="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Contraseña:</td>
|
||||||
|
<td><input type="text" name="password" size="20" maxlength="667"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">E-Mail:</td>
|
||||||
|
<td><input type="text" name="email" size="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Grupo:</td>
|
||||||
|
<td><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></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px"> </td>
|
||||||
|
<td><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></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px"> </td>
|
||||||
|
<td><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></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Redirigir a:</td>
|
||||||
|
<td><input type="text" name="redirect" size="50" value="http://"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Obligar a cambiar la contraseña en el siguiente inicio de sesión:</td>
|
||||||
|
<td><select size="1" name="pchange">
|
||||||
|
<option value="0" selected>No</option>
|
||||||
|
<option value="1">Si</option>
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Enviar un e-mail al usuario con su nueva cuenta:</td>
|
||||||
|
<td><select size="1" name="email_user">
|
||||||
|
<option value="No" selected>No</option>
|
||||||
|
<option value="Yes">Si</option>
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px"><input type="submit" value="Guardar" name="B4"></td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div id="footer"> </div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
107
admin/deleteuser.php
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<?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());
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Eliminar usuario - La Factoría Verde</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="estilos.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="layout">
|
||||||
|
<div id="header"> <img src="../img/lafactoriaverde.gif" alt="La Factoría Verde" />
|
||||||
|
<div style="float: right;">Sesión iniciada como <?php echo $_SESSION[user_name]; ?></div>
|
||||||
|
<?php
|
||||||
|
$menu_activo='nuevo_usuario';
|
||||||
|
include('_menu.php');
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
|
<?php
|
||||||
|
//check for authority to view this page
|
||||||
|
if (allow_access(Administrators) != "yes")
|
||||||
|
{
|
||||||
|
echo "<br/><br/><br/><center><p class='error'>No tienes autorización para esta función.</p></center>";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_GET['del_user'])) {
|
||||||
|
$s_string = $_GET['del_user'];
|
||||||
|
$explodeit = explode(" ", "$s_string");
|
||||||
|
$c = count($explodeit);
|
||||||
|
if ($c > 1) {
|
||||||
|
for ($i = 0; $i < $c; $i++) {
|
||||||
|
$del_user = $explodeit[$i] . "+";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$del_user = $s_string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($del_user != $_SESSION[user_name]) && ($del_user != ""))
|
||||||
|
{
|
||||||
|
$sql = "SELECT * FROM $table_name WHERE username = '$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 = '$del_user'";
|
||||||
|
$result = @mysql_query($del,$connection) or die(mysql_error());
|
||||||
|
$result1 = @mysql_query($trash_user,$connection) or die(mysql_error());
|
||||||
|
$msg .= "El usuario '$del_user' ha sido eliminado.<br/>";
|
||||||
|
} else {
|
||||||
|
$msg .= "No se encuentra el usuario '$del_user'.<br/>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$del_banned = "DELETE FROM banned WHERE no_access = '$del_user'";
|
||||||
|
$result = @mysql_query($del_banned,$connection) or die(mysql_error());
|
||||||
|
|
||||||
|
echo $msg;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<br/>
|
||||||
|
<center>
|
||||||
|
<a href="<?php echo "adminpage.php"; ?>">Volver a la lista</a>
|
||||||
|
</center>
|
||||||
|
</div>
|
||||||
|
<div id="footer"> </div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
56
admin/estilos.css
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
/* CSS Document */
|
||||||
|
|
||||||
|
@import url("../reset.css");
|
||||||
|
@import url("menu_style.css");
|
||||||
|
@import url("table_style.css");
|
||||||
|
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
height: 100%;
|
||||||
|
font-family: Verdana, Geneva, sans-serif;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:link {
|
||||||
|
color: #718ABE;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:visited {
|
||||||
|
color: #718ABE;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #718ABE;
|
||||||
|
text-decoration: underline !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
input {
|
||||||
|
font-family: Verdana, Geneva, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layout {
|
||||||
|
margin: 10px auto;
|
||||||
|
width: 800px;
|
||||||
|
text-align: left;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: #F00;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
BIN
admin/images/bg.png
Normal file
|
After Width: | Height: | Size: 229 B |
@ -1,24 +0,0 @@
|
|||||||
<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>
|
|
||||||
@ -1,40 +1,40 @@
|
|||||||
<?
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Enviar e-mail masivo a todos los cliente - La Factoría Verde</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="adminpage.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="estilos.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
//prevents caching
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
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
|
<body>
|
||||||
require('../config.php');
|
<div id="layout">
|
||||||
require('../functions.php');
|
<div id="header">
|
||||||
|
<img src="../img/lafactoriaverde.gif" alt="La Factoría Verde" />
|
||||||
//check for administrative rights
|
<?php
|
||||||
if (allow_access(Administrators) != "yes")
|
$menu_activo='mail_masivo';
|
||||||
{
|
include('_menu.php');
|
||||||
include ('../no_access.html');
|
?>
|
||||||
exit;
|
</div>
|
||||||
}
|
<div id="content">
|
||||||
|
<form method="post" action="mail_all_process.php">
|
||||||
//make the connection to the database
|
<p>Asunto:<br />
|
||||||
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
|
<input type="text" name="e_subject" size="20" /><br />
|
||||||
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
|
Remitente:<br />
|
||||||
|
<input type="text" name="e_from" size="20" /><br />
|
||||||
//make the dbase query selecting only email address
|
Mensaje:<br />
|
||||||
$sql ="SELECT * FROM $table_name";
|
<textarea rows="15" name="e_message" cols="76">
|
||||||
$result = @mysql_query($sql,$connection) or die(mysql_error());
|
</textarea><br />
|
||||||
|
<input type="submit" value="Enviar" name="B1" /><input type="reset" value="Borrar"
|
||||||
echo "Your Message Has Been Sent to the Following Users:<br><br>";
|
name="B2" /></p>
|
||||||
while ($sql = mysql_fetch_object($result))
|
</form>
|
||||||
{
|
</div>
|
||||||
$e_addr = $sql -> email;
|
<div id="footer">
|
||||||
$e_user = $sql -> username;
|
</div>
|
||||||
$subject = $_POST[e_subject];
|
</div>
|
||||||
$mailheaders = $_POST[e_message];
|
</body>
|
||||||
mail($e_addr, $subject, $mailheaders, "From: No Reply <$adminemail>\n");
|
</html>
|
||||||
echo "$e_user<br>";
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
38
admin/mail_all_process.php
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<?
|
||||||
|
//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 ('../check_login.php');
|
||||||
|
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 "Tu mensaje ha sido enviado a los siguientes usuarios:<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>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
48
admin/menu_style.css
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
ul.menu {
|
||||||
|
list-style-type:none;
|
||||||
|
width:auto;
|
||||||
|
position:relative;
|
||||||
|
display:block;
|
||||||
|
height:33px;
|
||||||
|
background:url(images/bg.png) repeat-x top left;
|
||||||
|
font-family:Verdana,Helvetica,Arial,sans-serif;
|
||||||
|
border:1px solid #000;
|
||||||
|
margin:0 0 10px 0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.menu li {
|
||||||
|
display:block;
|
||||||
|
float:left;
|
||||||
|
margin:0;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.menu li a {
|
||||||
|
float:left;
|
||||||
|
color:#d0b9a2;
|
||||||
|
text-decoration:none;
|
||||||
|
height:24px;
|
||||||
|
padding:9px 15px 0;
|
||||||
|
font-weight:normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.menu li a:hover,.current {
|
||||||
|
color:#fff;
|
||||||
|
background:url(images/bg.png) repeat-x top left;
|
||||||
|
text-decoration:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.menu .current a {
|
||||||
|
color:#fff;
|
||||||
|
font-weight:700;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*ORANGE*/
|
||||||
|
ul.menu.orange{
|
||||||
|
background-color:#DC4900;
|
||||||
|
}
|
||||||
|
ul.menu.orange li a:hover, .menu.orange li.current {
|
||||||
|
background-color:#F46D00;
|
||||||
|
}
|
||||||
@ -1,86 +1,73 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
//prevents caching
|
//prevents caching
|
||||||
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
|
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
|
||||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
header("Cache-Control: post-check=0, pre-check=0",false);
|
header("Cache-Control: post-check=0, pre-check=0",false);
|
||||||
session_cache_limiter();
|
session_cache_limiter();
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
include ('../config.php');
|
include ('../config.php');
|
||||||
include ('../functions.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());
|
|
||||||
|
|
||||||
|
//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] != "")
|
if ($_POST[del_user] != "")
|
||||||
{
|
{
|
||||||
|
|
||||||
$sql = "SELECT * FROM $table_name WHERE username = '$_POST[del_user]'";
|
$sql = "SELECT * FROM $table_name WHERE username = '$_POST[del_user]'";
|
||||||
|
|
||||||
$result = @mysql_query($sql, $connection) or die(mysql_error());
|
$result = @mysql_query($sql, $connection) or die(mysql_error());
|
||||||
|
|
||||||
//get the number of rows in the result set
|
//get the number of rows in the result set
|
||||||
$num = mysql_num_rows($result);
|
$num = mysql_num_rows($result);
|
||||||
|
|
||||||
//set session variables if there is a match
|
//set session variables if there is a match
|
||||||
if ($num != 0)
|
if ($num != 0)
|
||||||
{
|
{
|
||||||
while ($sql = mysql_fetch_object($result))
|
while ($sql = mysql_fetch_object($result))
|
||||||
{
|
{
|
||||||
$first = $sql -> firstname;
|
$first = $sql -> firstname;
|
||||||
$last = $sql -> lastname;
|
$last = $sql -> lastname;
|
||||||
$uname = $sql -> username;
|
$uname = $sql -> username;
|
||||||
$pass = $sql -> password;
|
$pass = $sql -> password;
|
||||||
$gr1 = $sql -> group1;
|
$gr1 = $sql -> group1;
|
||||||
$gr2 = $sql -> group2;
|
$gr2 = $sql -> group2;
|
||||||
$gr3 = $sql -> group3;
|
$gr3 = $sql -> group3;
|
||||||
$change = $sql -> pchange;
|
$change = $sql -> pchange;
|
||||||
$e_mail = $sql -> email;
|
$e_mail = $sql -> email;
|
||||||
$re_direct = $sql -> redirect;
|
$re_direct = $sql -> redirect;
|
||||||
$ver_d = $sql -> verified;
|
$ver_d = $sql -> verified;
|
||||||
$last_log = $sql -> last_login;
|
$last_log = $sql -> last_login;
|
||||||
$del_dat = 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
|
$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')";
|
||||||
('$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]'";
|
$del = "DELETE FROM $table_name WHERE username = '$_POST[del_user]'";
|
||||||
|
|
||||||
$result = @mysql_query($del,$connection) or die(mysql_error());
|
$result = @mysql_query($del,$connection) or die(mysql_error());
|
||||||
$result1 = @mysql_query($trash_user,$connection) or die(mysql_error());
|
$result1 = @mysql_query($trash_user,$connection) or die(mysql_error());
|
||||||
|
$msg .= "El usuario '$_POST[del_user]' ha sido eliminado.<br/>";
|
||||||
$msg .= "User $_POST[del_user] has been trashed from the database.<br>";
|
} else {
|
||||||
}else{
|
$msg .= "No se encuentra el usuario '$_POST[del_user]'.<br/>";
|
||||||
$msg .= "User $_POST[del_user] could not be located in the database.<br>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$del_banned = "DELETE FROM banned WHERE no_access = '$_POST[del_user]'";
|
$del_banned = "DELETE FROM banned WHERE no_access = '$_POST[del_user]'";
|
||||||
$result = @mysql_query($del_banned,$connection) or die(mysql_error());
|
$result = @mysql_query($del_banned,$connection) or die(mysql_error());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($_POST[username] != "") && ($_POST[mod_pass] == "Same as Old"))
|
if (($_POST[username] != "") && ($_POST[mod_pass] == "Same as Old"))
|
||||||
{
|
{
|
||||||
$sql = "SELECT * FROM $table_name WHERE username = '$_POST[username]'";
|
$sql = "SELECT * FROM $table_name WHERE username = '$_POST[username]'";
|
||||||
$result = @mysql_query($sql,$connection) or die(mysql_error());
|
$result = @mysql_query($sql,$connection) or die(mysql_error());
|
||||||
while ($sql = mysql_fetch_object($result))
|
|
||||||
|
while ($sql = mysql_fetch_object($result))
|
||||||
{
|
{
|
||||||
$pass = $sql -> password;
|
$pass = $sql -> password;
|
||||||
$last = $sql -> last_login;
|
$last = $sql -> last_login;
|
||||||
}
|
}
|
||||||
$sql = "DELETE FROM $table_name WHERE username = '$_POST[username]'";
|
$sql = "DELETE FROM $table_name WHERE username = '$_POST[username]'";
|
||||||
$result = @mysql_query($sql,$connection) or die(mysql_error());
|
$result = @mysql_query($sql,$connection) or die(mysql_error());
|
||||||
$sql = "INSERT INTO $table_name (firstname, lastname, username, password, group1, group2, group3,
|
|
||||||
|
$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]',
|
pchange, email, redirect, verified, last_login) VALUES ('$_POST[mod_first]', '$_POST[mod_last]',
|
||||||
'$_POST[username]', '$pass', '$_POST[mod_group1]', '$_POST[mod_group2]',
|
'$_POST[username]', '$pass', '$_POST[mod_group1]', '$_POST[mod_group2]',
|
||||||
'$_POST[mod_group3]', '$_POST[mod_chng]', '$_POST[mod_email]', '$_POST[mod_redirect]',
|
'$_POST[mod_group3]', '$_POST[mod_chng]', '$_POST[mod_email]', '$_POST[mod_redirect]',
|
||||||
@ -91,64 +78,58 @@ while ($sql = mysql_fetch_object($result))
|
|||||||
|
|
||||||
if (($_POST[username] != "") && ($_POST[mod_pass] != "Same as Old"))
|
if (($_POST[username] != "") && ($_POST[mod_pass] != "Same as Old"))
|
||||||
{
|
{
|
||||||
$sql = "SELECT * FROM $table_name WHERE username = '$_POST[username]'";
|
$sql = "SELECT * FROM $table_name WHERE username = '$_POST[username]'";
|
||||||
$result = @mysql_query($sql,$connection) or die(mysql_error());
|
$result = @mysql_query($sql,$connection) or die(mysql_error());
|
||||||
while ($sql = mysql_fetch_object($result))
|
while ($sql = mysql_fetch_object($result))
|
||||||
{
|
{
|
||||||
$pass = $sql -> password;
|
$pass = $sql -> password;
|
||||||
$last = $sql -> last_login;
|
$last = $sql -> last_login;
|
||||||
}
|
}
|
||||||
$sql = "DELETE FROM $table_name WHERE username = '$_POST[username]'";
|
|
||||||
$result = @mysql_query($sql,$connection) or die(mysql_error());
|
$sql = "DELETE FROM $table_name WHERE username = '$_POST[username]'";
|
||||||
$sql = "INSERT INTO $table_name (firstname, lastname, username, password, group1, group2, group3,
|
$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]',
|
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[username]', password('$_POST[mod_pass]'), '$_POST[mod_group1]', '$_POST[mod_group2]',
|
||||||
'$_POST[mod_group3]', '$_POST[mod_chng]', '$_POST[mod_email]', '$_POST[mod_redirect]',
|
'$_POST[mod_group3]', '$_POST[mod_chng]', '$_POST[mod_email]', '$_POST[mod_redirect]',
|
||||||
'1', '$last')";
|
'1', '$last')";
|
||||||
$result = @mysql_query($sql,$connection) or die(mysql_error());
|
|
||||||
$msg .= "The information for $_POST[username] has been changed updated.<br>";
|
$result = @mysql_query($sql,$connection) or die(mysql_error());
|
||||||
|
$msg .= "The information for $_POST[username] has been changed updated.<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST[ban_user] != "")
|
if ($_POST[ban_user] != "")
|
||||||
{
|
{
|
||||||
|
$ban = "INSERT INTO banned (no_access, type) VALUES ('$_POST[ban_user]', 'user')";
|
||||||
$ban = "INSERT INTO banned (no_access, type) VALUES ('$_POST[ban_user]', 'user')";
|
$result = @mysql_query($ban,$connection) or die(mysql_error());
|
||||||
$result = @mysql_query($ban,$connection) or die(mysql_error());
|
$msg .= "User $_POST[ban_user] has been banned.<br>";
|
||||||
$msg .= "User $_POST[ban_user] has been banned.<br>";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$ip_addr = "$_POST[oct1].$_POST[oct2].$_POST[oct3].$_POST[oct4]";
|
$ip_addr = "$_POST[oct1].$_POST[oct2].$_POST[oct3].$_POST[oct4]";
|
||||||
|
|
||||||
if ($ip_addr != "...")
|
if ($ip_addr != "...")
|
||||||
{
|
{
|
||||||
$ban_ip = "INSERT INTO banned (no_access, type) VALUES ('$ip_addr', 'ip')";
|
$ban_ip = "INSERT INTO banned (no_access, type) VALUES ('$ip_addr', 'ip')";
|
||||||
$result = @mysql_query($ban_ip,$connection) or die(mysql_error());
|
$result = @mysql_query($ban_ip,$connection) or die(mysql_error());
|
||||||
$msg .= "IP Address $ip_addr has been banned.<br>";
|
$msg .= "IP Address $ip_addr has been banned.<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST[lift_user_ban] != "")
|
if ($_POST[lift_user_ban] != "")
|
||||||
{
|
{
|
||||||
|
$lift_user = "DELETE FROM banned (no_access, type) WHERE no_access = '$_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());
|
||||||
$result = @mysql_query($lift_user,$connection) or die(mysql_error());
|
$msg .= "The Ban for user $_POST[lift_user_ban] has been lifted.<br>";
|
||||||
$msg .= "The Ban for user $_POST[lift_user_ban] has been lifted.<br>";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST[lift_ip_ban] != "")
|
if ($_POST[lift_ip_ban] != "")
|
||||||
{
|
{
|
||||||
|
$lift_ip = "DELETE FROM banned (no_access, type) WHERE no_access = '$_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());
|
||||||
$result = @mysql_query($lift_ip,$connection) or die(mysql_error());
|
$msg .= "The Ban for IP Address $_POST[lift_ip_ban] has been lifted.<br>";
|
||||||
$msg .= "The Ban for IP Address $_POST[lift_ip_ban] has been lifted.<br>";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST[restore] != "")
|
if ($_POST[restore] != "")
|
||||||
{
|
{
|
||||||
$ruser = "SELECT * FROM trash WHERE username = '$_POST[restore]'";
|
$ruser = "SELECT * FROM trash WHERE username = '$_POST[restore]'";
|
||||||
|
|
||||||
$result0 = @mysql_query($ruser, $connection) or die(mysql_error());
|
$result0 = @mysql_query($ruser, $connection) or die(mysql_error());
|
||||||
|
|
||||||
//get the number of rows in the result set
|
//get the number of rows in the result set
|
||||||
@ -159,18 +140,18 @@ if ($_POST[restore] != "")
|
|||||||
{
|
{
|
||||||
while ($ruser = mysql_fetch_object($result0))
|
while ($ruser = mysql_fetch_object($result0))
|
||||||
{
|
{
|
||||||
$rfirst = $ruser -> firstname;
|
$rfirst = $ruser -> firstname;
|
||||||
$rlast = $ruser -> lastname;
|
$rlast = $ruser -> lastname;
|
||||||
$runame = $ruser -> username;
|
$runame = $ruser -> username;
|
||||||
$rpass = $ruser -> password;
|
$rpass = $ruser -> password;
|
||||||
$rgr1 = $ruser -> group1;
|
$rgr1 = $ruser -> group1;
|
||||||
$rgr2 = $ruser -> group2;
|
$rgr2 = $ruser -> group2;
|
||||||
$rgr3 = $ruser -> group3;
|
$rgr3 = $ruser -> group3;
|
||||||
$rchange = $ruser -> pchange;
|
$rchange = $ruser -> pchange;
|
||||||
$re_mail = $ruser -> email;
|
$re_mail = $ruser -> email;
|
||||||
$rre_direct = $ruser -> redirect;
|
$rre_direct = $ruser -> redirect;
|
||||||
$rver_d = $ruser -> verified;
|
$rver_d = $ruser -> verified;
|
||||||
$rlast_log = $ruser -> last_login;
|
$rlast_log = $ruser -> last_login;
|
||||||
}
|
}
|
||||||
|
|
||||||
$r_user = "INSERT INTO $table_name (firstname, lastname, username, password, group1, group2, group3,
|
$r_user = "INSERT INTO $table_name (firstname, lastname, username, password, group1, group2, group3,
|
||||||
@ -184,14 +165,13 @@ if ($_POST[restore] != "")
|
|||||||
$result1 = @mysql_query($r_user,$connection) or die(mysql_error());
|
$result1 = @mysql_query($r_user,$connection) or die(mysql_error());
|
||||||
|
|
||||||
$msg .= "User $_POST[restore] has been restored.<br>";
|
$msg .= "User $_POST[restore] has been restored.<br>";
|
||||||
}else{
|
} else {
|
||||||
$msg .= "User $_POST[restore] could not be located in the database.<br>";
|
$msg .= "User $_POST[restore] could not be located in the database.<br>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST[empt_trash] == "yes")
|
if ($_POST[empt_trash] == "yes")
|
||||||
{
|
{
|
||||||
|
|
||||||
$empty = "DELETE FROM trash";
|
$empty = "DELETE FROM trash";
|
||||||
$gone = @mysql_query($empty, $connection) or die(mysql_error());
|
$gone = @mysql_query($empty, $connection) or die(mysql_error());
|
||||||
|
|
||||||
@ -226,9 +206,9 @@ if ($_POST[amt_time] != "" && $_POST[incr_time] != "")
|
|||||||
'$ppass', '$pgr1', '$pgr2', '$pgr3', '$ppchange', '$pe_mail', '$pre_direct', '$pver_d', '$plast_log', '$pdel_date')";
|
'$ppass', '$pgr1', '$pgr2', '$pgr3', '$ppchange', '$pe_mail', '$pre_direct', '$pver_d', '$plast_log', '$pdel_date')";
|
||||||
$resultp2 = @mysql_query($xfer2, $connection) or die(mysql_error());
|
$resultp2 = @mysql_query($xfer2, $connection) or die(mysql_error());
|
||||||
}
|
}
|
||||||
|
|
||||||
$purge = "DELETE FROM $table_name WHERE last_login < $killtime";
|
$purge = "DELETE FROM $table_name WHERE last_login < $killtime";
|
||||||
$resultp3 = @mysql_query($purge, $connection) or die(mysql_error());
|
$resultp3 = @mysql_query($purge, $connection) or die(mysql_error());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -238,27 +218,39 @@ echo $msg;
|
|||||||
|
|
||||||
if ($_POST[username] == $_SESSION[user_name])
|
if ($_POST[username] == $_SESSION[user_name])
|
||||||
{
|
{
|
||||||
session_destroy();
|
session_destroy();
|
||||||
echo "<html>";
|
echo "<html>";
|
||||||
echo "<head>";
|
echo "<head>";
|
||||||
echo "<meta http-equiv=\"refresh\" content=\"3; url=../login.html\">";
|
echo "<meta http-equiv=\"refresh\" content=\"3; url=../login.html\">";
|
||||||
echo "<title>New Page 2</title>";
|
echo "<title>New Page 2</title>";
|
||||||
echo "</head>";
|
echo "</head>";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<meta http-equiv="refresh" content="3; url=adminpage.php">
|
<meta http-equiv="refresh" content="3; url=adminpage.php">
|
||||||
|
|
||||||
<title>Modify User</title>
|
<title>Modify User</title>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
147
admin/newuser.php
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
<?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 ('../check_login.php');
|
||||||
|
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());
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Añadir nuevo usuario - La Factoría Verde</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="estilos.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="layout">
|
||||||
|
<div id="header"> <img src="../img/lafactoriaverde.gif" alt="La Factoría Verde" />
|
||||||
|
<div style="float: right;">Sesión iniciada como <?php echo $_SESSION[user_name]; ?></div>
|
||||||
|
<?php
|
||||||
|
$menu_activo='nuevo_usuario';
|
||||||
|
include('_menu.php');
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
|
<h2>Dar de alta un nuevo usuario</h2>
|
||||||
|
<br/>
|
||||||
|
<form method="POST" action="<?php echo "adduser.php";?>">
|
||||||
|
<table width="100%" id="table44">
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Nombre:</td>
|
||||||
|
<td><input type="text" name="firstname" size="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Apellidos:</td>
|
||||||
|
<td><input type="text" name="lastname" size="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Usuario:</td>
|
||||||
|
<td><input type="text" name="username" size="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Contraseña:</td>
|
||||||
|
<td><input type="text" name="password" size="20" maxlength="667"><br/><?php echo "La contraseña debe tener una longitud entre $min_pass y $max_pass caracteres."; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">E-Mail:</td>
|
||||||
|
<td><input type="text" name="email" size="50"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Grupo:</td>
|
||||||
|
<td><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></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px"> </td>
|
||||||
|
<td><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></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px"> </td>
|
||||||
|
<td><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></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Redirigir a:</td>
|
||||||
|
<td><input type="text" name="redirect" size="50" value="/jardines/"><br/>
|
||||||
|
Por ejemplo: /jardines/casonadesuesa</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Obligar a cambiar la contraseña en el siguiente inicio de sesión:</td>
|
||||||
|
<td><select size="1" name="pchange">
|
||||||
|
<option value="0" selected>No</option>
|
||||||
|
<option value="1">Si</option>
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px">Enviar un e-mail al usuario con su nueva cuenta:</td>
|
||||||
|
<td><select size="1" name="email_user">
|
||||||
|
<option value="No" selected>No</option>
|
||||||
|
<option value="Yes">Si</option>
|
||||||
|
</select></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="200px"><input type="submit" value="Guardar" name="B4"></td>
|
||||||
|
<td> </td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div id="footer"> </div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
41
admin/table_style.css
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
Cusco Sky table styles
|
||||||
|
written by Braulio Soncco http://www.buayacorp.com
|
||||||
|
*/
|
||||||
|
|
||||||
|
table, th, td {
|
||||||
|
border: 1px solid #D4E0EE;
|
||||||
|
border-collapse: collapse;
|
||||||
|
font-family: "Trebuchet MS", Arial, sans-serif;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
caption {
|
||||||
|
font-size: 150%;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td, th {
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead th {
|
||||||
|
text-align: center;
|
||||||
|
background: #E6EDF5;
|
||||||
|
color: #4F76A3;
|
||||||
|
font-size: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody th {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody tr { background: #FCFDFE; }
|
||||||
|
|
||||||
|
tbody tr.odd { background: #F7F9FC; }
|
||||||
|
|
||||||
|
|
||||||
|
tfoot th, tfoot td {
|
||||||
|
font-size: 85%;
|
||||||
|
}
|
||||||
149
admin/userinfo.php
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
<?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 ('../check_login.php');
|
||||||
|
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());
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Información de usuario - La Factoría Verde</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="estilos.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="layout">
|
||||||
|
<div id="header"> <img src="../img/lafactoriaverde.gif" alt="La Factoría Verde" />
|
||||||
|
<div style="float: right;">Sesión iniciada como <?php echo $_SESSION[user_name]; ?></div>
|
||||||
|
<?php include('_menu.php'); ?>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (isset($_GET['user_det'])) {
|
||||||
|
$s_string = $_GET['user_det'];
|
||||||
|
$explodeit = explode(" ", "$s_string");
|
||||||
|
$c = count($explodeit);
|
||||||
|
if ($c > 1) {
|
||||||
|
for ($i = 0; $i < $c; $i++) {
|
||||||
|
$user_det = $explodeit[$i] . "+";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$user_det = $s_string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($user_det != "") {
|
||||||
|
echo "<h2>Detalles del usuario '".$user_det."'</h2>";
|
||||||
|
$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";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<table width="100%" id="table1">
|
||||||
|
<tr>
|
||||||
|
<td width="100" rowspan="10" valign="top"><?php echo $uname; ?></td>
|
||||||
|
<td colspan="2"> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="177">E-Mail:</td>
|
||||||
|
<td><a href="<?php echo $e_mail; ?>"><?php echo $e_mail; ?></a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="177">Nombre completo:</td>
|
||||||
|
<td><?php echo "$fname $lname "; ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="177">Última sesión:</td>
|
||||||
|
<td><?php echo $last; ?> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="177">Solicitud de cambio de contraseña:</td>
|
||||||
|
<td><?php echo $p_change; ?> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="177">Verificar e-mail:</td>
|
||||||
|
<td><?php echo $verif_d; ?> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="177">Miembro del grupo:</td>
|
||||||
|
<td><?php echo $groupA; ?> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="177"> </td>
|
||||||
|
<td><?php echo $groupB; ?> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="177"> </td>
|
||||||
|
<td><?php echo $groupC; ?> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="177">Redirigir a:</td>
|
||||||
|
<td><?php echo $re_direct; ?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br/>
|
||||||
|
<center>
|
||||||
|
<a href="<?php echo "adminpage.php"; ?>">Volver a la lista</a>
|
||||||
|
</center>
|
||||||
|
<?php }
|
||||||
|
}?>
|
||||||
|
</div>
|
||||||
|
<div id="footer"> </div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
16
banned.html
@ -1,15 +1,15 @@
|
|||||||
<html>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Language" content="en-us">
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<title>Unauthorized</title>
|
|
||||||
|
<title>No autorizado</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<p><b><font size="7">TU CUENTA ESTÁ BANEADA</font></b></p>
|
||||||
<p><b><font size="7">YOU'VE BEEN BANNED</font></b></p>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
//check to see if the user already has an open session
|
//check to see if the user already has an open session
|
||||||
if (($_SESSION[user_name] != "") && ($_SESSION[password] != ""))
|
if (($_SESSION[user_name] != "") && ($_SESSION[password] != ""))
|
||||||
{
|
{
|
||||||
@ -17,7 +15,6 @@ if(($lr_user != "") && ($lr_pass != ""))
|
|||||||
}
|
}
|
||||||
|
|
||||||
//if neither is true, redirect to login
|
//if neither is true, redirect to login
|
||||||
header("Location:login.html");
|
header("Location:login.php");
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
14
config.php
@ -1,22 +1,22 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
//set up the names of the database and table
|
//set up the names of the database and table
|
||||||
$db_name ="dqxjaadh_factoriaverde";
|
$db_name ="factoria";
|
||||||
$table_name ="authorize";
|
$table_name ="authorize";
|
||||||
|
|
||||||
//connect to the server and select the database
|
//connect to the server and select the database
|
||||||
$server = "localhost";
|
$server = "localhost";
|
||||||
$dbusername = "dqxjaadh_factori";
|
$dbusername = "factoria";
|
||||||
$dbpassword = "q3gm78v69f";
|
$dbpassword = "123";
|
||||||
|
|
||||||
//domain information
|
//domain information
|
||||||
$domain = ".lafactoriaverde.es";
|
$domain = "localhost";
|
||||||
|
|
||||||
//Change to "0" to turn off the login log
|
//Change to "0" to turn off the login log
|
||||||
$log_login = "1";
|
$log_login = "1";
|
||||||
|
|
||||||
//base_dir is the location of the files, ie http://www.yourdomain/login
|
//base_dir is the location of the files, ie http://www.yourdomain/login
|
||||||
$base_dir = "http://www.rodax-software.net/lafactoriaverde.es/";
|
$base_dir = "http://localhost";
|
||||||
|
|
||||||
//length of time the cookie is good for - 7 is the days and 24 is the hours
|
//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
|
//if you would like the time to be short, say 1 hour, change to 60*60*1
|
||||||
@ -33,7 +33,7 @@ $zone=3600*+1;
|
|||||||
$verify = "0";
|
$verify = "0";
|
||||||
|
|
||||||
//default redirect, this is the URL that all self-registered users will be redirected to
|
//default redirect, this is the URL that all self-registered users will be redirected to
|
||||||
$default_url = "http://www.rodax-software.net/lafactoriaverde.es/";
|
$default_url = "http://localhost/";
|
||||||
|
|
||||||
//minimum and maximum password lengths
|
//minimum and maximum password lengths
|
||||||
$min_pass = 4;
|
$min_pass = 4;
|
||||||
|
|||||||
@ -1,34 +1,33 @@
|
|||||||
<html>
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
<title>Chane E-Mail Address</title>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<script Language="JavaScript">
|
<title>Cambiar dirección de e-mail</title>
|
||||||
<!--
|
<script language="JavaScript" type="text/javascript">
|
||||||
function Form1_Validator(theForm)
|
//<![CDATA[
|
||||||
{
|
<!--
|
||||||
|
function Form1_Validator(theForm)
|
||||||
if (theForm.email.value == "")
|
{
|
||||||
{
|
if (theForm.email.value == "")
|
||||||
alert("The \"E-Mail Address\" field cannot be left blank.");
|
{
|
||||||
theForm.email.focus();
|
alert("Debe indicar una nueva dirección de e-mail.");
|
||||||
return (false);
|
theForm.email.focus();
|
||||||
}
|
return (false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//--></script>
|
//-->
|
||||||
|
//]]>
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<form method="post" action="email_change.php" onsubmit="return Form1_Validator(this)"
|
||||||
|
language="JavaScript" name="Form1">
|
||||||
|
<p><b><font face="Tahoma">Cambio de dirección de e-mail</font></b></p>
|
||||||
|
|
||||||
|
<p><font face="Tahoma"><font size="2">Nuevo e-mail:<br /></font> <input name=
|
||||||
<form method="POST" action="email_change.php" onsubmit="return Form1_Validator(this)" language="JavaScript" name="Form1">
|
"email" size="20" /><font size="2"><br />
|
||||||
<p><b><font face="Tahoma">E-Mail Address Change</font></b></p>
|
<br /></font> <input type="submit" value="Cambiar" name="B1" /></font></p>
|
||||||
<p><font face="Tahoma"><font size="2">New E-Mail Address:<br>
|
</form>
|
||||||
</font><input name="email" size="20"><font size="2"><br>
|
</body>
|
||||||
<br>
|
|
||||||
</font><input type="submit" value="Submit" name="B1"></font></p>
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -1,17 +1,36 @@
|
|||||||
<HTML>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
<HEAD>
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<TITLE>Username and Password Request</TITLE>
|
|
||||||
</HEAD>
|
|
||||||
<BODY>
|
|
||||||
<H1><font face="Verdana" size="4" color="#0080C0">Request Your Username & 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>
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<font color="#0080C0">
|
<head>
|
||||||
<INPUT TYPE="submit" NAME="submit" VALUE="Submit" style="font-family: Verdana"></font></P>
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
</FORM>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
</BODY>
|
|
||||||
</HTML>
|
<title>Recuperación de usuario y contraseña</title>
|
||||||
|
<style type="text/css">
|
||||||
|
/*<![CDATA[*/
|
||||||
|
p.c8 {color: #0080C0}
|
||||||
|
input.c7 {font-family: Verdana}
|
||||||
|
span.c6 {color: #0080C0; font-family: Verdana}
|
||||||
|
span.c5 {color: #0080C0}
|
||||||
|
span.c4 {font-family: Verdana}
|
||||||
|
span.c3 {font-size: 80%}
|
||||||
|
span.c2 {font-family: Verdana; font-size: 80%}
|
||||||
|
h1.c1 {color: #0080C0; font-family: Verdana; font-size: 120%}
|
||||||
|
/*]]>*/
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1 class="c1">Recuperar usuario y contraseña</h1>
|
||||||
|
|
||||||
|
<form method="post" action="emailpass.php">
|
||||||
|
<p><span class="c5"><strong><span class="c2">Dirección de
|
||||||
|
e-mail</span></strong><span class="c4"><strong><span class=
|
||||||
|
"c3">:</span></strong><br /></span></span> <span class="c6"><input type="text" name=
|
||||||
|
"email" size="25" maxlength="50" /></span></p>
|
||||||
|
|
||||||
|
<p class="c8"><input type="submit" name="submit" value="Enviar" class="c7" /></p>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@ -1,25 +0,0 @@
|
|||||||
<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>
|
|
||||||
196
estilos.css
Normal file
@ -0,0 +1,196 @@
|
|||||||
|
/* CSS Document */
|
||||||
|
@import url("reset.css");
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
height: 100%;
|
||||||
|
font-family: Verdana, Geneva, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
font-family: Verdana, Geneva, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
#layout {
|
||||||
|
width: 1024px;
|
||||||
|
height: 550px;
|
||||||
|
text-align: left;
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
margin-left: -512px;
|
||||||
|
margin-top: -275px;
|
||||||
|
background: #fff url("img/inicio-factoria.gif") no-repeat;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header {
|
||||||
|
width: 100%;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header h2 {
|
||||||
|
margin-top: 6px;
|
||||||
|
margin-left: 18px;
|
||||||
|
background: url("img/texto-mantenimiento.gif") no-repeat;
|
||||||
|
width: 640px;
|
||||||
|
height: 0;
|
||||||
|
padding: 22px 0 0 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#header h3 {
|
||||||
|
position: absolute;
|
||||||
|
right: 74px;
|
||||||
|
top: 7px;
|
||||||
|
background: url("img/texto-telefono.gif") no-repeat;
|
||||||
|
width: 125px;
|
||||||
|
height: 0;
|
||||||
|
padding: 17px 0 0 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#footer {
|
||||||
|
width: 260px;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
text-align: center;
|
||||||
|
padding: 0 0 6px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#aside {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 31px;
|
||||||
|
height: 485px;
|
||||||
|
width: 260px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#content {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 32px;
|
||||||
|
width: 762px;
|
||||||
|
height: 518px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu {
|
||||||
|
margin-top: 100px;
|
||||||
|
margin-left: 30px;
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
#menu ul {
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu li {
|
||||||
|
margin: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu span {
|
||||||
|
visibility: hidden;
|
||||||
|
padding: 0 20px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu a {
|
||||||
|
text-decoration: none;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu a.presentacion {
|
||||||
|
background: url('img/menu-presentacion.gif') 0 0 no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu a.presentacion:hover {
|
||||||
|
background: url('img/menu-presentacion-hot.gif') 0 0 no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu a.servicios {
|
||||||
|
background: url('img/menu-servicios.gif') 0 0 no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu a.servicios:hover {
|
||||||
|
background: url('img/menu-servicios-hot.gif') 0 0 no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu a.galeria {
|
||||||
|
background: url('img/menu-galeria.gif') 0 0 no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu a.galeria:hover {
|
||||||
|
background: url('img/menu-galeria-hot.gif') 0 0 no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu a.blog {
|
||||||
|
background: url('img/menu-blog-consultas.gif') 0 0 no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu a.blog:hover {
|
||||||
|
background: url('img/menu-blog-consultas-hot.gif') 0 0 no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#modulos {
|
||||||
|
margin-top: 8px;
|
||||||
|
margin-left: 30px;
|
||||||
|
width: 200px;
|
||||||
|
width: 200px;
|
||||||
|
font-size: 11px;
|
||||||
|
font-variant:small-caps;
|
||||||
|
line-height: 140%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#login {
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-left: 30px;
|
||||||
|
width: 200px;
|
||||||
|
background: url('img/texto-login.gif') 0 0 no-repeat;
|
||||||
|
height: 165px;
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
#login h2 {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#login p.texto-pass {
|
||||||
|
height: 20px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
background: url('img/texto-olvidaste-pass.gif') 0 0 no-repeat;
|
||||||
|
text-indent: -1000em;
|
||||||
|
}
|
||||||
|
|
||||||
|
form.login-inicio label {
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
form.login-inicio .campo {
|
||||||
|
background-color: #c1bfbf;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
form.login-inicio .entrar {
|
||||||
|
background: none;
|
||||||
|
display:block;
|
||||||
|
width: 80px;
|
||||||
|
height: 20px;
|
||||||
|
margin: 5px 0 0 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
cursor: hand;
|
||||||
|
}
|
||||||
|
|
||||||
|
form.login-inicio span {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#content.inicio {
|
||||||
|
background: #fff url('img/fondo-inicio.jpg') no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: #F00;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
@ -1,29 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
//function to get the date
|
//function to get the date
|
||||||
function last_login()
|
function last_login()
|
||||||
{
|
{
|
||||||
$date = gmdate("Y-m-d");
|
$date = gmdate("Y-m-d");
|
||||||
return $date;
|
return $date;
|
||||||
}
|
}
|
||||||
|
|
||||||
//function that sets the session variable
|
//function that sets the session variable
|
||||||
function sess_vars($base_dir, $server, $dbusername, $dbpassword, $db_name, $table_name, $user, $pass)
|
function sess_vars($base_dir, $server, $dbusername, $dbpassword, $db_name, $table_name, $user, $pass)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//make connection to dbase
|
//make connection to dbase
|
||||||
$connection = @mysql_connect($server, $dbusername, $dbpassword)
|
$connection = @mysql_connect($server, $dbusername, $dbpassword)
|
||||||
or die(mysql_error());
|
or die(mysql_error());
|
||||||
|
|
||||||
$db = @mysql_select_db($db_name,$connection)
|
$db = @mysql_select_db($db_name,$connection)
|
||||||
or die(mysql_error());
|
or die(mysql_error());
|
||||||
|
|
||||||
$sql = "SELECT * FROM $table_name WHERE username = '$user' and password = password('$pass')";
|
$sql = "SELECT * FROM $table_name WHERE username = '$user' and password = password('$pass')";
|
||||||
|
|
||||||
$result = @mysql_query($sql, $connection) or die(mysql_error());
|
$result = @mysql_query($sql, $connection) or die(mysql_error());
|
||||||
|
|
||||||
|
|
||||||
//get the number of rows in the result set
|
//get the number of rows in the result set
|
||||||
$num = mysql_num_rows($result);
|
$num = mysql_num_rows($result);
|
||||||
|
|
||||||
@ -46,7 +38,7 @@ function sess_vars($base_dir, $server, $dbusername, $dbpassword, $db_name, $tabl
|
|||||||
$_SESSION[last_login] = $sql -> last_login;
|
$_SESSION[last_login] = $sql -> last_login;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$_SESSION[redirect] = "$base_dir/errorlogin.html";
|
$_SESSION[redirect] = "$base_dir/login.php?errorlogin=1";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,6 +46,7 @@ function sess_vars($base_dir, $server, $dbusername, $dbpassword, $db_name, $tabl
|
|||||||
function allow_access($group)
|
function allow_access($group)
|
||||||
{
|
{
|
||||||
if ($_SESSION[group1] == "$group" || $_SESSION[group2] == "$group" || $_SESSION[group3] == "$group" ||
|
if ($_SESSION[group1] == "$group" || $_SESSION[group2] == "$group" || $_SESSION[group3] == "$group" ||
|
||||||
|
$_SESSION[group1] == "Administradores" || $_SESSION[group2] == "Administradores" || $_SESSION[group3] == "Administradores" ||
|
||||||
$_SESSION[group1] == "Administrators" || $_SESSION[group2] == "Administrators" || $_SESSION[group3] == "Administrators" ||
|
$_SESSION[group1] == "Administrators" || $_SESSION[group2] == "Administrators" || $_SESSION[group3] == "Administrators" ||
|
||||||
$_SESSION[user_name] == "$group")
|
$_SESSION[user_name] == "$group")
|
||||||
{
|
{
|
||||||
@ -67,13 +60,11 @@ function allow_access($group)
|
|||||||
//function to check the length of the requested password
|
//function to check the length of the requested password
|
||||||
function password_check($min_pass, $max_pass, $pass)
|
function password_check($min_pass, $max_pass, $pass)
|
||||||
{
|
{
|
||||||
|
|
||||||
$valid = "yes";
|
$valid = "yes";
|
||||||
if ($min_pass > strlen($pass) || $max_pass < strlen($pass))
|
if ($min_pass > strlen($pass) || $max_pass < strlen($pass))
|
||||||
{
|
{
|
||||||
$valid = "no";
|
$valid = "no";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $valid;
|
return $valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
img/fondo-inicio.jpg
Normal file
|
After Width: | Height: | Size: 84 KiB |
BIN
img/inicio-factoria.gif
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
img/lafactoriaverde.gif
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
img/menu-blog-consultas-hot.gif
Normal file
|
After Width: | Height: | Size: 691 B |
BIN
img/menu-blog-consultas.gif
Normal file
|
After Width: | Height: | Size: 691 B |
BIN
img/menu-galeria-hot.gif
Normal file
|
After Width: | Height: | Size: 414 B |
BIN
img/menu-galeria.gif
Normal file
|
After Width: | Height: | Size: 414 B |
BIN
img/menu-presentacion-hot.gif
Normal file
|
After Width: | Height: | Size: 587 B |
BIN
img/menu-presentacion.gif
Normal file
|
After Width: | Height: | Size: 591 B |
BIN
img/menu-servicios-hot.gif
Normal file
|
After Width: | Height: | Size: 508 B |
BIN
img/menu-servicios.gif
Normal file
|
After Width: | Height: | Size: 508 B |
BIN
img/texto-email.gif
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
img/texto-entrar-hot.gif
Normal file
|
After Width: | Height: | Size: 430 B |
BIN
img/texto-entrar.gif
Normal file
|
After Width: | Height: | Size: 430 B |
BIN
img/texto-login.gif
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
img/texto-mantenimiento.gif
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
img/texto-olvidaste-pass.gif
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
img/texto-pincha-aqui.gif
Normal file
|
After Width: | Height: | Size: 442 B |
BIN
img/texto-telefono.gif
Normal file
|
After Width: | Height: | Size: 738 B |
24
login.html
@ -1,24 +0,0 @@
|
|||||||
<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
login.php
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>La Factoría Verde</title>
|
||||||
|
<link rel="stylesheet" href="estilos.css" type="text/css" media="all" />
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="layout">
|
||||||
|
<div id="header">
|
||||||
|
<h2>Mantenimiento de jardines, podas, diseño y riego en Cantabria</h2>
|
||||||
|
<h3>Teléfono: 678 71 72 85</h3>
|
||||||
|
</div>
|
||||||
|
<div id="aside">
|
||||||
|
<div id="menu">
|
||||||
|
<ul>
|
||||||
|
<li><a class="presentacion" href="presentacion.html"><span>Presentación</span></a></li>
|
||||||
|
<li><a class="servicios" href="servicios.html"><span>Servicios</span></a></li>
|
||||||
|
<li><a class="galeria" href="galeria.html"><span>Galería</span></a></li>
|
||||||
|
<li><a class="blog" href="blog"><span>Blog, consultas</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="login">
|
||||||
|
<h2>Acceso de clientes</h2>
|
||||||
|
<form class="login-inicio" method="post" action="redirect.php">
|
||||||
|
<fieldset>
|
||||||
|
<label for="username"><span>Usuario:</span></label>
|
||||||
|
<input class="campo" type="text" name="username" size="25" maxlength="25" />
|
||||||
|
<label for="password"><span>Contraseña:</span></label>
|
||||||
|
<input class="campo" type="password" name="password" size="25" maxlength="25" />
|
||||||
|
|
||||||
|
<!--<input type="checkbox" name="remember" value="Yes" />-->
|
||||||
|
<button type="submit" class="entrar">
|
||||||
|
<img src="img/texto-entrar.gif" alt="Entrar" />
|
||||||
|
</button>
|
||||||
|
<!--<input class="entrar" type="submit" name="submit" value="Entrar" src="img/texto-entrar.gif"/>-->
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
<br/>
|
||||||
|
<p class="texto-pass">¿Olvidaste tu contraseña?</p>
|
||||||
|
<a href="emailpass.html"><img src="img/texto-pincha-aqui.gif" alt="Pincha aqui" /></a>
|
||||||
|
</div>
|
||||||
|
<div id="modulos">
|
||||||
|
<?php
|
||||||
|
if (($_GET["errorlogin"] != "")) {
|
||||||
|
?>
|
||||||
|
<p class="error">Por favor, vuelve a introducir tus datos de acceso otra vez...</p>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="content" class="inicio"></div>
|
||||||
|
<div id="footer">
|
||||||
|
<a href="mailto:agapanto@lafactoriaverde.es"><img src="img/texto-email.gif" alt="agapanto@lafactoriaverde.es"/></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -1,13 +1,14 @@
|
|||||||
<?
|
<?
|
||||||
include ("config.php");
|
include ("config.php");
|
||||||
|
|
||||||
//destroys the session, the variables are not longer set
|
//destroys the session, the variables are not longer set
|
||||||
session_start();
|
session_start();
|
||||||
session_destroy();
|
session_destroy();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<html>
|
<html>
|
||||||
<meta http-equiv="refresh" content="0;url=http://www<?php echo $domain; ?>">
|
<meta http-equiv="refresh" content="0;url=http://www<?php echo $domain; ?>">
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Language" content="en-us">
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<title>New Page 2</title>
|
<title>Registro de accesos</title>
|
||||||
<base target="main">
|
<base target="main">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<select size="1" id="id1" name="D1" style="font-family: Tahoma; font-size: 8pt">
|
<select size="1" id="id1" name="D1" style="font-family: Tahoma; font-size: 8pt">
|
||||||
<option value="username">Usuario</option>
|
<option value="username">Usuario</option>
|
||||||
<option value="date">Fecha</option>
|
<option value="date">Fecha</option>
|
||||||
<option value="ip_addr">Dirección IP</option>
|
<option value="ip_addr">Dirección IP</option>
|
||||||
<option value="oper_sys">Sistema operativo</option>
|
<option value="oper_sys">Sistema operativo</option>
|
||||||
<option value="brow">Navegador</option>
|
<option value="brow">Navegador</option>
|
||||||
</select><br>
|
</select><br>
|
||||||
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<p align="left"><br>
|
<p align="left"><br>
|
||||||
<i><b><font face="Tahoma" size="2">
|
<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>
|
<a target="_top" href="../admin/adminpage.php">Volver a la página de administración</a></font></b></i></p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
@ -1,29 +1,43 @@
|
|||||||
<html>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
<title>NO ACCESS ALLOWED</title>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Acceso no permitido</title>
|
||||||
|
<style type="text/css">
|
||||||
|
/*<![CDATA[*/
|
||||||
|
p.c8 {color: #2852A8}
|
||||||
|
input.c7 {font-family: Verdana}
|
||||||
|
p.c6 {font-family: Verdana}
|
||||||
|
span.c5 {color: #2852A8; font-size: 80%}
|
||||||
|
span.c4 {color: #2852A8}
|
||||||
|
span.c3 {color: #2852A8; font-family: Verdana}
|
||||||
|
span.c2 {color: #2852A8; font-family: Verdana; font-size: 80%}
|
||||||
|
span.c1 {font-size: 200%}
|
||||||
|
/*]]>*/
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<b><span class="c1">Acceso no permitido</span></b>
|
||||||
|
|
||||||
<b><font size="6">Access Denied!!!</font></b><p>Please login with proper
|
<p>Por favor, introduce tus datos de acceso correctos:</p>
|
||||||
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> </p>
|
|
||||||
|
|
||||||
|
<form method="post" action="redirect.php">
|
||||||
|
<p><span class="c2"><strong>Usuario:</strong><br /></span> <span class=
|
||||||
|
"c3"><input type="text" name="username" size="25" maxlength="25" /></span></p>
|
||||||
|
|
||||||
|
<p><span class="c2"><strong>Contraseña:</strong><br /></span> <span class=
|
||||||
|
"c3"><input type="password" name="password" size="25" maxlength="25" /></span></p>
|
||||||
|
|
||||||
|
<p class="c6"><span class="c4"><input type="checkbox" name="remember" value=
|
||||||
|
"Yes" /></span><span class="c5">No cerrar sesión</span></p>
|
||||||
|
|
||||||
|
<p class="c8"><input type="submit" name="submit" value="Entrar" class="c7" /></p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<p> </p>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -1,15 +1,14 @@
|
|||||||
<html>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
<title>Account Not Activated</title>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Cuenta sin activar</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<p>Tu cuenta debe ser activada antes de que puedas entrar. Por favor, visita la página de activación que se indica en el e-mail que has recibido.</p>
|
||||||
<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>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -1,36 +1,44 @@
|
|||||||
<html>
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
<title>Password Change</title>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<script Language="JavaScript">
|
<title>Cambiar la contraseña</title>
|
||||||
<!--
|
<script language="JavaScript" type="text/javascript">
|
||||||
function Form1_Validator(theForm)
|
//<![CDATA[
|
||||||
{
|
<!--
|
||||||
|
function Form1_Validator(theForm)
|
||||||
if (theForm.p_word.value != theForm.password2.value)
|
{
|
||||||
{
|
if (theForm.p_word.value != theForm.password2.value)
|
||||||
alert("The two passwords are not the same.");
|
{
|
||||||
theForm.password2.focus();
|
alert("The two passwords are not the same.");
|
||||||
return (false);
|
theForm.password2.focus();
|
||||||
}
|
return (false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//--></script>
|
//-->
|
||||||
|
//]]>
|
||||||
|
</script>
|
||||||
|
<style type="text/css">
|
||||||
|
/*<![CDATA[*/
|
||||||
|
p.c4 {font-family: Tahoma}
|
||||||
|
span.c3 {font-size: 80%}
|
||||||
|
p.c2 {font-weight: bold}
|
||||||
|
span.c1 {font-family: Tahoma}
|
||||||
|
/*]]>*/
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<form method="post" action="pass_change.php" onsubmit="return Form1_Validator(this)"
|
||||||
|
language="JavaScript" name="Form1">
|
||||||
|
<p class="c2"><span class="c1">Cambio de contraseña</span></p>
|
||||||
|
|
||||||
|
<p class="c4"><span class="c3">Nueva contraseña:<br /></span> <input type="password"
|
||||||
|
name="p_word" size="20" /><span class="c3"><br />
|
||||||
|
Confirmar contraseña:<br /></span> <input type="password" name="password2" size=
|
||||||
|
"20" /></p>
|
||||||
|
|
||||||
<form method="POST" action="pass_change.php" onsubmit="return Form1_Validator(this)" language="JavaScript" name="Form1">
|
<p class="c4"><input type="submit" value="Enviar" name="B1" /></p>
|
||||||
<p><b><font face="Tahoma">Password Change </font></b></p>
|
</form>
|
||||||
<p><font face="Tahoma"><font size="2">New Password:<br>
|
</body>
|
||||||
</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>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
48
redirect.php
@ -1,5 +1,4 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
//prevents caching
|
//prevents caching
|
||||||
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
|
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
|
||||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||||
@ -7,11 +6,9 @@ header("Cache-Control: post-check=0, pre-check=0",false);
|
|||||||
session_cache_limiter();
|
session_cache_limiter();
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
//clear session variables
|
//clear session variables
|
||||||
session_unset();
|
session_unset();
|
||||||
|
|
||||||
|
|
||||||
//require the functions file
|
//require the functions file
|
||||||
require ("config.php");
|
require ("config.php");
|
||||||
require ("functions.php");
|
require ("functions.php");
|
||||||
@ -19,34 +16,30 @@ require ("functions.php");
|
|||||||
//check to see if cookies are already set, remember me
|
//check to see if cookies are already set, remember me
|
||||||
if ((!$lr_user) || (!$lr_pass))
|
if ((!$lr_user) || (!$lr_pass))
|
||||||
{
|
{
|
||||||
|
$username = $_POST[username];
|
||||||
$username = $_POST[username];
|
$password = $_POST[password];
|
||||||
$password = $_POST[password];
|
} else {
|
||||||
|
$username = $lr_user;
|
||||||
}else{
|
$password = $lr_pass;
|
||||||
|
|
||||||
$username = $lr_user;
|
|
||||||
$password = $lr_pass;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//if username or password is blank, send to errorlogin.html
|
//if username or password is blank, send to login again
|
||||||
if ((!$username) || (!$password))
|
if ((strlen($username) == 0) || (strlen($password) == 0))
|
||||||
{
|
{
|
||||||
|
header("Location:$base_dir/login.php?errorlogin=1");
|
||||||
header("Location:$base_dir/errorlogin.html");
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//sets cookies to remember this computer if the user asks to
|
//sets cookies to remember this computer if the user asks to
|
||||||
if ($_POST[remember] == "Yes")
|
if ($_POST[remember] == "Yes")
|
||||||
{
|
{
|
||||||
setcookie("lr_user", $username, $duration, "/", $domain);
|
setcookie("lr_user", $username, $duration, "/", $domain);
|
||||||
setcookie("lr_pass", $password, $duration, "/", $domain);
|
setcookie("lr_pass", $password, $duration, "/", $domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST[activate] == "Yes")
|
if ($_POST[activate] == "Yes")
|
||||||
{
|
{
|
||||||
|
echo $server.' '.$dbusername.' '.$dbpassword;
|
||||||
//make the connection to the database
|
//make the connection to the database
|
||||||
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
|
$connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error());
|
||||||
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
|
$db = @mysql_select_db($db_name,$connection)or die(mysql_error());
|
||||||
@ -56,6 +49,7 @@ if ($_POST[activate] == "Yes")
|
|||||||
$result = @mysql_query($sql,$connection) or die(mysql_error());
|
$result = @mysql_query($sql,$connection) or die(mysql_error());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//sets session variables
|
//sets session variables
|
||||||
sess_vars($base_dir, $server, $dbusername, $dbpassword, $db_name, $table_name, $username, $password);
|
sess_vars($base_dir, $server, $dbusername, $dbpassword, $db_name, $table_name, $username, $password);
|
||||||
|
|
||||||
@ -80,22 +74,20 @@ $sql ="SELECT * FROM banned";
|
|||||||
$result = @mysql_query($sql,$connection) or die(mysql_error());
|
$result = @mysql_query($sql,$connection) or die(mysql_error());
|
||||||
|
|
||||||
while ($sql = mysql_fetch_object($result))
|
while ($sql = mysql_fetch_object($result))
|
||||||
{
|
{
|
||||||
$banned = $sql -> no_access;
|
$banned = $sql -> no_access;
|
||||||
if ($username == $banned || $REMOTE_ADDR == $banned)
|
if ($username == $banned || $REMOTE_ADDR == $banned)
|
||||||
{
|
{
|
||||||
include ('banned.html');
|
include ('banned.html');
|
||||||
exit;
|
exit;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$last_log = last_login();
|
$last_log = last_login();
|
||||||
|
|
||||||
//updates table with last log as now
|
//updates table with last log as now
|
||||||
$sql = "UPDATE $table_name SET last_login = '$last_log' WHERE username = '$_SESSION[user_name]'";
|
$sql = "UPDATE $table_name SET last_login = '$last_log' WHERE username = '$_SESSION[user_name]'";
|
||||||
$result = @mysql_query($sql,$connection) or die(mysql_error());
|
$result = @mysql_query($sql, $connection) or die(mysql_error());
|
||||||
|
if (($_SESSION[redirect] != "$base_dir/login.php") && ($log_login == "1"))
|
||||||
if (($_SESSION[redirect] != "$base_dir/errorlogin.html") && ($log_login == "1"))
|
|
||||||
{
|
{
|
||||||
include('loglogin.php');
|
include('loglogin.php');
|
||||||
}
|
}
|
||||||
@ -104,5 +96,7 @@ if (($_SESSION[redirect] != "$base_dir/errorlogin.html") && ($log_login == "1"))
|
|||||||
header("Location:$_SESSION[redirect]");
|
header("Location:$_SESSION[redirect]");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
<html>
|
||||||
<head><title>Redirect</title></head>
|
<head><title>Redirect</title></head>
|
||||||
|
<body></body>
|
||||||
|
</html>
|
||||||
180
register.html
@ -1,79 +1,133 @@
|
|||||||
<HTML>
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<HEAD>
|
<head>
|
||||||
<TITLE>Registration</TITLE>
|
<meta http-equiv="Content-Language" content="es-ES" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<title>Página de registro</title>
|
||||||
|
<script language="JavaScript" type="text/javascript">
|
||||||
|
//<![CDATA[
|
||||||
|
<!--
|
||||||
|
function Form1_Validator(theForm)
|
||||||
|
{
|
||||||
|
if (theForm.firstname.value == "")
|
||||||
|
{
|
||||||
|
alert("Por favor, indica tu nombre.");
|
||||||
|
theForm.firstname.focus();
|
||||||
|
return (false);
|
||||||
|
}
|
||||||
|
|
||||||
<script Language="JavaScript">
|
if (theForm.lastname.value == "")
|
||||||
<!--
|
|
||||||
function Form1_Validator(theForm)
|
|
||||||
{
|
|
||||||
if (theForm.firstname.value == "")
|
|
||||||
{
|
{
|
||||||
alert("Please enter a value for the \"firstname\" field.");
|
alert("Por favor, indica tus apellidos.");
|
||||||
theForm.firstname.focus();
|
theForm.lastname.focus();
|
||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
if (theForm.lastname.value == "")
|
|
||||||
|
if (theForm.username.value == "")
|
||||||
{
|
{
|
||||||
alert("Please enter a value for the \"lastname\" field.");
|
alert("Por favor, indica un nombre de usuario.");
|
||||||
theForm.firstname.focus();
|
theForm.username.focus();
|
||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
if (theForm.username.value == "")
|
if (theForm.email.value == "")
|
||||||
{
|
{
|
||||||
alert("Please enter a value for the \"username\" field.");
|
alert("Por favor, indica una dirección de correo electrónico correcta.");
|
||||||
theForm.firstname.focus();
|
|
||||||
return (false);
|
|
||||||
}
|
|
||||||
if (theForm.email.value == "")
|
|
||||||
{
|
|
||||||
alert("Please enter a value for the \"email\" field.");
|
|
||||||
theForm.email.focus();
|
theForm.email.focus();
|
||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
if (theForm.password.value == "")
|
|
||||||
|
if (theForm.password.value == "")
|
||||||
{
|
{
|
||||||
alert("Please enter a value for the \"password\" field.");
|
alert("Por favor, indica una contraseña.");
|
||||||
theForm.email.focus();
|
theForm.password.focus();
|
||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
if (theForm.password.value != theForm.confirm.value)
|
if (theForm.password.value != theForm.confirm.value)
|
||||||
{
|
{
|
||||||
alert("The two passwords are not the same.");
|
alert("Las contraseñas no coinciden. Asegúrate que introduces dos veces la misma contraseña correctamente.");
|
||||||
theForm.confirm.focus();
|
theForm.confirm.focus();
|
||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
//-->
|
||||||
|
//]]>
|
||||||
|
</script>
|
||||||
|
<style type="text/css">
|
||||||
|
/*<![CDATA[*/
|
||||||
|
input.c9 {
|
||||||
|
font-family: Tahoma
|
||||||
}
|
}
|
||||||
|
p.c8 {
|
||||||
//--></script>
|
margin-top: 0;
|
||||||
|
margin-bottom: 0
|
||||||
|
}
|
||||||
|
span.c7 {
|
||||||
|
font-family: Tahoma
|
||||||
|
}
|
||||||
|
span.c6 {
|
||||||
|
font-family: Tahoma;
|
||||||
|
font-size: 80%
|
||||||
|
}
|
||||||
|
p.c5 {
|
||||||
|
font-family: Tahoma;
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-top: 0
|
||||||
|
}
|
||||||
|
span.c4 {
|
||||||
|
font-family: Tahoma;
|
||||||
|
font-size: 70%
|
||||||
|
}
|
||||||
|
strong.c3 {
|
||||||
|
font-weight: 400
|
||||||
|
}
|
||||||
|
span.c2 {
|
||||||
|
font-size: 80%
|
||||||
|
}
|
||||||
|
h1.c1 {
|
||||||
|
font-family: Tahoma;
|
||||||
|
font-size: 120%;
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-top: 0
|
||||||
|
}
|
||||||
|
/*]]>*/
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
<body>
|
||||||
<BODY>
|
<h1 class="c1">Registro</h1>
|
||||||
<H1 style="margin-top: 0; margin-bottom: 0"><font face="Tahoma" size="4">
|
<form method="post" action="register.php" onsubmit="return Form1_Validator(this)"
|
||||||
Register</font></H1>
|
language="JavaScript" name="Form1">
|
||||||
<FORM METHOD="POST" ACTION="register.php" onsubmit="return Form1_Validator(this)" language="JavaScript" name="Form1">
|
<p class="c5"><strong class="c3"><span class="c2">Nombre:</span></strong><span class="c2"><br />
|
||||||
<P style="margin-top: 0; margin-bottom: 0"><font face="Tahoma">
|
</span> <span class="c4">
|
||||||
<strong style="font-weight: 400"><font size="2">First Name:</font></strong><font size="2"><BR>
|
<input name=
|
||||||
</font><font face="Tahoma" size="1">
|
"firstname" size="25" maxlength="50" />
|
||||||
<INPUT NAME="firstname" SIZE=25 MAXLENGTH=50></font></font></p>
|
</span></p>
|
||||||
<P style="margin-top: 0; margin-bottom: 0"><font face="Tahoma">
|
<p class="c5"><strong class="c3"><span class="c2">Apellidos:</span></strong><span class="c2"><br />
|
||||||
<strong style="font-weight: 400"><font size="2">Last Name:</font></strong><font size="2"><BR>
|
</span> <span class="c4">
|
||||||
</font><font face="Tahoma" size="1">
|
<input name=
|
||||||
<INPUT NAME="lastname" SIZE=25 MAXLENGTH=50><br>
|
"lastname" size="25" maxlength="50" />
|
||||||
</font><font face="Tahoma" size="2">
|
<br />
|
||||||
Username:</font><font face="Tahoma" size="1"><br>
|
</span> <span class=
|
||||||
<INPUT NAME="username" SIZE=25 MAXLENGTH=50></font></font></p>
|
"c6">Usuario:</span><span class="c4"><br />
|
||||||
<P style="margin-top: 0; margin-bottom: 0"><font face="Tahoma">
|
<input name="username" size="25" maxlength="50" />
|
||||||
<strong style="font-weight: 400"><font size="2">Password:</font></strong><font size="2"><BR>
|
</span></p>
|
||||||
</font><font face="Tahoma" size="1">
|
<p class="c5"><strong class="c3"><span class=
|
||||||
<INPUT TYPE="password" NAME="password" SIZE=25 MAXLENGTH=25><br>
|
"c2">Contraseña:</span></strong><span class="c2"><br />
|
||||||
</font><font size="2"><strong style="font-weight: 400">Confirm Password:</strong></font><font face="Tahoma" size="1"><br>
|
</span> <span class=
|
||||||
<INPUT TYPE="password" NAME="confirm" SIZE=25 MAXLENGTH=25></font></font></p>
|
"c4">
|
||||||
<P style="margin-top: 0; margin-bottom: 0"><strong style="font-weight: 400">
|
<input type="password" name="password" size="25" maxlength="25" />
|
||||||
<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>
|
<br />
|
||||||
</font><font face="Tahoma" size="1">
|
</span> <span class="c2"><strong class="c3">Confirmar la contraseña:</strong></span><span class=
|
||||||
<INPUT TYPE="text" NAME="email" SIZE=25 MAXLENGTH=100></font></font></p>
|
"c4"><br />
|
||||||
<P style="margin-top: 0; margin-bottom: 0">
|
<input type="password" name="confirm" size="25" maxlength="25" />
|
||||||
<INPUT TYPE="submit" NAME="submit" VALUE="Submit" style="font-family: Tahoma"></p>
|
</span></p>
|
||||||
</FORM>
|
<p class="c8"><strong class="c3"><span class="c6">Dirección de e-mail</span></strong><span class="c7"><strong class="c3"><span class=
|
||||||
</BODY>
|
"c2">:</span></strong><span class="c2"><br />
|
||||||
</HTML>
|
</span> <span class="c4">
|
||||||
|
<input type=
|
||||||
|
"text" name="email" size="25" maxlength="100" />
|
||||||
|
</span></span></p>
|
||||||
|
<p class="c8">
|
||||||
|
<input type="submit" name="submit" value="Enviar" class="c9" />
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
53
reset.css
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
/* http://meyerweb.com/eric/tools/css/reset/ */
|
||||||
|
/* v1.0 | 20080212 */
|
||||||
|
|
||||||
|
html, body, div, span, applet, object, iframe,
|
||||||
|
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||||
|
a, abbr, acronym, address, big, cite, code,
|
||||||
|
del, dfn, em, font, img, ins, kbd, q, s, samp,
|
||||||
|
small, strike, strong, sub, sup, tt, var,
|
||||||
|
b, u, i, center,
|
||||||
|
dl, dt, dd, ol, ul, li,
|
||||||
|
fieldset, form, label, legend,
|
||||||
|
table, caption, tbody, tfoot, thead, tr, th, td {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
outline: 0;
|
||||||
|
font-size: 100%;
|
||||||
|
vertical-align: baseline;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
ol, ul {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
blockquote, q {
|
||||||
|
quotes: none;
|
||||||
|
}
|
||||||
|
blockquote:before, blockquote:after,
|
||||||
|
q:before, q:after {
|
||||||
|
content: '';
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* remember to define focus styles! */
|
||||||
|
:focus {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* remember to highlight inserts somehow! */
|
||||||
|
ins {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
del {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* tables still need 'cellspacing="0"' in the markup */
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
@ -1,8 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$abs = getcwd();
|
$abs = getcwd();
|
||||||
$viewer = $HTTP_USER_AGENT;
|
$viewer = $HTTP_USER_AGENT;
|
||||||
|
|
||||||
echo "<?php<br><br>
|
echo "<?php<br><br>
|
||||||
//prevents caching<br>
|
//prevents caching<br>
|
||||||
header(\"Expires: Sat, 01 Jan 2000 00:00:00 GMT\");<br>
|
header(\"Expires: Sat, 01 Jan 2000 00:00:00 GMT\");<br>
|
||||||
@ -36,16 +34,16 @@ if (allow_access(Administrators) != \"yes\")<br>
|
|||||||
if (preg_match("/Windows NT/", $viewer))
|
if (preg_match("/Windows NT/", $viewer))
|
||||||
{
|
{
|
||||||
echo "
|
echo "
|
||||||
include ('$abs\\no_access.html'); <br>
|
include ('$abs\\check_login.php'); <br>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo "include ('$abs/no_access.html'); <br>";
|
echo "include ('$abs/check_login.php'); <br>";
|
||||||
}
|
}
|
||||||
echo "
|
echo "
|
||||||
exit;<br>
|
exit;<br>
|
||||||
}<br>
|
}<br>
|
||||||
?>";
|
?>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
25
style.css
@ -2,71 +2,56 @@ body {
|
|||||||
font-family: Verdana;
|
font-family: Verdana;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
color: #0000ff;
|
color: #0000ff;
|
||||||
font-family: Tahoma;
|
font-family: Tahoma;
|
||||||
text-decoration: underline overline;
|
text-decoration: underline overline;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:visited, a:active {
|
a:visited, a:active {
|
||||||
color: #0000ff;
|
color: #0000ff;
|
||||||
font-family: Tahoma;
|
font-family: Tahoma;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:link {
|
a:link {
|
||||||
color: #0000ff;
|
color: #0000ff;
|
||||||
font-family: Tahoma;
|
font-family: Tahoma;
|
||||||
text-decoration: overline underline;
|
text-decoration: overline underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
font-family: Verdana;
|
font-family: Verdana;
|
||||||
font-size: 8pt;
|
font-size: 8pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
font-family: Tahoma;
|
font-family: Tahoma;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-family: Tahoma;
|
font-family: Tahoma;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-family: Tahoma;
|
font-family: Tahoma;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
font-family: Tahoma;
|
font-family: Tahoma;
|
||||||
}
|
}
|
||||||
|
|
||||||
h4 {
|
h4 {
|
||||||
font-family: Tahoma;
|
font-family: Tahoma;
|
||||||
}
|
}
|
||||||
|
|
||||||
h5 {
|
h5 {
|
||||||
font-family: Tahoma;
|
font-family: Tahoma;
|
||||||
}
|
}
|
||||||
|
|
||||||
h6 {
|
h6 {
|
||||||
font-family: Tahoma;
|
font-family: Tahoma;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
font-family: Tahoma;
|
font-family: Tahoma;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr {
|
tr {
|
||||||
font-family: Tahoma;
|
font-family: Tahoma;
|
||||||
}
|
}
|
||||||
|
<form> {
|
||||||
<form> {
|
font-family: Verdana;
|
||||||
font-family: Verdana;
|
|
||||||
}
|
}
|
||||||
|
<input> {
|
||||||
<input> {
|
color: #0080ff;
|
||||||
color: #0080ff;
|
font-family: Verdana;
|
||||||
font-family: Verdana;
|
|
||||||
}
|
}
|
||||||