Viewing file: index.php (17.98 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
* index.php
*
* This is an example of the main page of a website. Here
* users will be able to login. However, like on most sites
* the login form doesn't just have to be on the main page,
* but re-appear on subsequent pages, depending on whether
* the user has logged in or not.
*
* Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC)
* Last Updated: August 26, 2004
*/
include("usuarios/include/session.php");
?>
<!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 runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="index_files/style.css" rel="stylesheet" type="text/css">
<title>Login</title>
<style type="text/css">
body {
background-color:#FCFAE6;
font-size:120%;
}
div.wrap {
height:100%
width:100%
}
h3 {
color:#ff00c0; font-size:22px;
}
.textbox_outer {
padding-top: 43px; padding-left:150px;
}
.box_wrapper {
background-image:url(images/bg.png); background-position:center; background-repeat:no-repeat;
width:600px; height:360px; margin:auto; margin-top: 70px;
}
input {
font-family: "Lucida Grande",Verdana,sans-serif;
font-size:18px;
border: 1px solid #999999;
}
input.textboxes {
width:270px;
background-color:#7CC61A;
}
input.btn {
color:#7CC61A;
border: 1px solid #999999;
}
div.labels {
width:100px;
color:#ff00c0;
}
.Estilo1 {color: #7CC61A}
.Estilo3 {color: #7CC61A; font-weight: bold; }
</style>
</head><body class="twoColFixRtHdr">
<?php
/**
* User has already logged in, so display relavent links, including
* a link to the admin center if the user is an administrator.
*/
if($session->logged_in){
?>
<div id="container">
<div id="header"> <img src="index_files/header.png" width="780" height="228" border="0" usemap="#Map">
<map name="Map"><area shape="poly" coords="678,165" href="#"><area shape="poly" coords="429,87" href="#"></map></div>
<div id="sidebar1">
<table width="250" border="0" cellpadding="0" cellspacing="0">
<tbody><tr class="dblue">
<th colspan="2">» Información Usuario</th>
</tr>
<tr class="one">
<td class="feature1">Dominio</td>
<td class="feature2"><a href="http://www.ambientebogota.gov.co/" class="mydomain" target="_blank">ambientebogota.gov.co</a></td>
</tr>
<tr class="two">
<td class="feature1">Usuario</td>
<td class="feature2"><?php echo "<b>$session->username<b>" ?></td>
</tr>
<tr class="one">
<td class="feature1">Password</td>
<td class="feature2"><font face="Courier New">******</font></td>
</tr>
<tr class="two">
<td class="feature1">Dependencia</td>
<td class="feature2"><a href="#" class="mydomain">Dirección Legal Ambiental </a></td>
</tr>
<tr class="one">
<td class="feature1">S. Operativo </td>
<td class="feature2"><b> <script language="JavaScript">
document.writeln(getOpSys());
</script>
</b></td>
</tr>
<tr class="two">
<td class="feature1">Dirección IP </td>
<td class="feature2"><?php echo "$REMOTE_ADDR"; ?></td>
</tr>
<tr class="one">
<td class="feature1">Navegador</td>
<td class="feature2"><b> <?php
function FUNC_brouserUsr(){ //echo FUNC_brouserUsr();
if((ereg("Nav", $_SERVER["HTTP_USER_AGENT"])) || (ereg("Gold",
$_SERVER["HTTP_USER_AGENT"])) || (ereg("X11",
$_SERVER["HTTP_USER_AGENT"])) || (ereg("Mozilla",
$_SERVER["HTTP_USER_AGENT"])) || (ereg("Netscape",
$_SERVER["HTTP_USER_AGENT"])) AND (!ereg("MSIE",
$_SERVER["HTTP_USER_AGENT"]) AND (!ereg("Konqueror",
$_SERVER["HTTP_USER_AGENT"])))) $browser = "Mozilla Firerox";
elseif(ereg("MSIE", $_SERVER["HTTP_USER_AGENT"])) $browser = "Internet Explorer";
elseif(ereg("Lynx", $_SERVER["HTTP_USER_AGENT"])) $browser = "Lynx";
elseif(ereg("Opera", $_SERVER["HTTP_USER_AGENT"])) $browser = "Opera";
elseif(ereg("Netscape", $_SERVER["HTTP_USER_AGENT"])) $browser = "Netscape";
elseif(ereg("Konqueror", $_SERVER["HTTP_USER_AGENT"])) $browser = "Konqueror";
elseif((eregi("bot", $_SERVER["HTTP_USER_AGENT"])) ||
(ereg("Google", $_SERVER["HTTP_USER_AGENT"])) || (ereg("Slurp",
$_SERVER["HTTP_USER_AGENT"])) || (ereg("Scooter",
$_SERVER["HTTP_USER_AGENT"])) || (eregi("Spider",
$_SERVER["HTTP_USER_AGENT"])) || (eregi("Infoseek",
$_SERVER["HTTP_USER_AGENT"]))) $browser = "Bot";
else $browser = "Other";
return $browser;
}
echo FUNC_brouserUsr();
?></b></td>
</tr>
<tr class="two">
<td class="feature1">Permisos</td>
<td class="feature2">Todos</td>
</tr>
<tr class="one">
<td class="feature1">Creado</td>
<td class="feature2">2010-03-27 14:25</td>
</tr>
<tr class="two">
<td class="feature1">Estado</td>
<td class="feature2">
Activo </td>
</tr>
</tbody></table>
<p></p>
<p align="center"> <img src="../images/can.png" width="100" height="100" border="0" usemap="#Map2">
<map name="Map2"><area shape="circle" coords="49,50,49" href="usuarios/process.php">
</map> </p>
<p align="center"><?php echo "</td></tr><tr><td align=\"left\"><br>";
echo "<b>Usuarios Registrados:</b> ".$database->getNumMembers()."<br>";
echo "<h6>Hay $database->num_active_users administrador(es) y";
echo " $database->num_active_guests usuario(s) conectados.<h6><br>";
include("usuarios/include/view_active.php"); ?></p>
</div>
<div id="mainContent">
<table id="sharedtable" cellpadding="0" cellspacing="0">
<tbody><tr class="dblue">
<th colspan="5"><strong>» Normativa</strong></th>
</tr>
<tr class="one">
<td class="left"><a href="normativa/ingresar.php" class="mydomain"><img src="index_files/1_1.gif" width="32" border="0" height="32"><br>
[Ingresar Datos] </a></td>
<td class="center"><a href="normativa/modificar.php" class="mydomain"><img src="index_files/7_1.gif" width="32" border="0" height="32"><br>
[Modificar Datos] </a></td>
<td class="center"><a href="normativa/eliminar.php" class="mydomain"><img src="index_files/7_5.gif" width="32" border="0" height="32"><br>
[Eliminar Datos] </a></td>
<td class="center"><a href="normativa/mostrar.php" class="mydomain"><img src="index_files/2_2.gif" width="32" border="0" height="32"><br>
[Mostrar Datos] </a></td>
<td class="right"><a href="normativa/exportar.php" class="mydomain" target="_blank"><img src="index_files/2_4.gif" width="32" border="0" height="32"><br>
[Exportar Datos]
</a></td>
</tr>
</tbody></table>
<br>
<table id="sharedtable" cellpadding="0" cellspacing="0">
<tbody><tr class="dblue">
<th colspan="5"><strong>» Actos administrativos</strong></th>
</tr>
<tr class="one">
<td class="left"><a href="actos/ingresar.php" class="mydomain"><img src="index_files/3_5.gif" width="32" border="0" height="32"><br>
</a><a href="actos/ingresar.php" class="mydomain">[Ingresar Datos]</a></td>
<td class="center"><a href="#" class="mydomain"><img src="index_files/7_1.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Modificar Datos]</a></td>
<td class="center"><a href="#" class="mydomain"><img src="index_files/7_5.gif" alt="" width="32" height="32" border="0"><br>
</a><a href="#" class="mydomain">[Eliminar Datos]</a></td>
<td class="center"><a href="#" class="mydomain"><img src="index_files/2_2.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Mostrar Datos]</a></td>
<td class="right"><a href="#" class="mydomain"><img src="index_files/2_4.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain" target="_blank">[Exportar Datos]</a></td>
</tr>
</tbody></table>
<br>
<table id="sharedtable" cellpadding="0" cellspacing="0">
<tbody><tr class="dblue">
<th colspan="5"><strong>» Usuarios Registrados Boletín </strong></th>
</tr>
<tr class="one">
<td class="left"><a href="#" class="mydomain"><img src="index_files/2_3.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Ingresar Datos]</a></td>
<td class="center"><a href="#" class="mydomain"><img src="index_files/7_1.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Modificar Datos]</a></td>
<td class="center"><a href="#" class="mydomain"><img src="index_files/7_5.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Eliminar Datos]</a></td>
<td class="center"><a href="#" class="mydomain"><img src="index_files/2_2.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Mostrar Datos]</a></td>
<td class="right"><a href="#" class="mydomain"><img src="index_files/2_4.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain" target="_blank">[Exportar Datos]</a></td>
</tr>
</tbody></table>
<br>
<table id="sharedtable" cellpadding="0" cellspacing="0">
<tbody><tr class="dblue">
<th colspan="5"><strong>» Conceptos Jurídicos</strong></th>
</tr>
<tr class="one">
<td class="left"><a href="conceptos/ingresar.php" class="mydomain"><img src="index_files/8_1.gif" width="32" border="0" height="32"><br>
</a><a href="conceptos/ingresar.php" class="mydomain">[Ingresar Datos]</a></td>
<td class="center"><a href="conceptos/modificar.php" class="mydomain"><img src="index_files/7_1.gif" width="32" border="0" height="32"><br>
</a><a href="conceptos/modificar.php" class="mydomain">[Modificar Datos]</a></td>
<td class="center"><a href="#" class="mydomain"><img src="index_files/7_5.gif" alt="Cerrar" width="32" height="32" border="0"><br>
</a><a href="#" class="mydomain">[Eliminar Datos]</a></td>
<td class="center"><a href="conceptos/mostrar.php" class="mydomain"><img src="index_files/2_2.gif" width="32" border="0" height="32"><br>
</a><a href="conceptos/mostrar.php" class="mydomain">[Mostrar Datos]</a></td>
<td class="right"><a href="conceptos/exportar.php" class="mydomain"><img src="index_files/2_4.gif" width="32" border="0" height="32"><br>
</a><a href="conceptos/exportar.php" class="mydomain" target="_blank">[Exportar Datos]</a></td>
</tr>
</tbody></table>
<br>
<table id="sharedtable" cellpadding="0" cellspacing="0">
<tbody><tr class="dblue">
<th colspan="5"><strong>» Boletín</strong></th>
</tr>
<tr class="one">
<td class="left"><a href="#" class="mydomain"><img src="index_files/7_3.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Ingresar Datos]</a></td>
<td class="center"><a href="#" target="_blank" class="mydomain"><img src="index_files/7_1.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Modificar Datos]</a></td>
<td class="center"><a href="#" target="_blank" class="mydomain"><img src="index_files/7_5.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Eliminar Datos]</a></td>
<td class="center"><a href="#" class="mydomain"><img src="index_files/2_2.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Mostrar Datos]</a></td>
<td class="right"><a href="#" class="mydomain"><img src="index_files/2_4.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain" target="_blank">[Exportar Datos]</a></td>
</tr>
</tbody></table>
<br>
<table id="sharedtable" cellpadding="0" cellspacing="0">
<tbody><tr class="dblue">
<th colspan="5"><strong>» Usuarios administradores Boletín</strong></th>
</tr>
<tr class="one">
<td class="left"><a href="<?php echo "usuarios/userinfo.php?user=$session->username" ?>" class="mydomain"><img src="index_files/5_1.gif" width="32" border="0" height="32"><br>
</a><a href="<?php echo "usuarios/userinfo.php?user=$session->username" ?>" class="mydomain">[Mi cuenta]</a><a href="http://members.000webhost.com/panel/website_builder.php?accountID=455690&login_hash=5HkWYozMxOAFxwBL&nopoint=" class="mydomain"></a></td>
<td class="center"><a href="usuarios/useredit.php" class="mydomain"><img src="index_files/7_1.gif" width="32" border="0" height="32"><br>
</a><a href="usuarios/useredit.php" class="mydomain">[Modificar Cuenta]</a></td>
<td class="center"><a href="usuarios/admin/admin.php" class="mydomain"><img src="index_files/5_1.gif" width="32" height="32" border="0"><br>
</a><a href="" class="mydomain"><?php
if($session->isAdmin()){
echo "[<a href=\"admin/admin.php\">Administración</a>]";}
else
echo "[Administración]";
?>
</a></td>
<td class="center"><a href="#" class="mydomain"><img src="index_files/2_2.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Mostrar Datos]</a></td>
<td class="right"><a href="#" target="_blank" class="mydomain"><img src="index_files/2_4.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain" target="_blank">[Exportar Datos]</a></td>
</tr>
</tbody></table>
<br>
<table id="sharedtable" cellpadding="0" cellspacing="0">
<tbody><tr class="dblue">
<th colspan="5"><strong>» Jurisprudencia</strong></th>
</tr>
<tr class="one">
<td class="left"><a href="#" class="mydomain"><img src="index_files/3_3.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Ingresar Datos]</a></td>
<td class="center"><a href="#" class="mydomain"><img src="index_files/7_1.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Modificar Datos]</a></td>
<td class="center"><a href="#" class="mydomain"><img src="index_files/7_5.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Eliminar Datos]</a></td>
<td class="center"><a href="#" class="mydomain"><img src="index_files/2_2.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Mostrar Datos]</a></td>
<td class="right"><a href="#" class="mydomain"><img src="index_files/2_4.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain" target="_blank">[Exportar Datos]</a></td>
</tr>
</tbody></table>
<br>
<table id="sharedtable" cellpadding="0" cellspacing="0">
<tbody><tr class="dblue">
<th colspan="5"><strong>» Doctrina</strong></th>
</tr>
<tr class="one">
<td class="left"><a href="#" class="mydomain"><img src="index_files/3_2.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Ingresar Datos]</a></td>
<td class="center"><a href="#" class="mydomain"><img src="index_files/7_1.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Modificar Datos]</a></td>
<td class="center"><a href="#" class="mydomain"><img src="index_files/7_5.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Eliminar Datos]</a></td>
<td class="center"><a href="#" class="mydomain"><img src="index_files/2_2.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain">[Mostrar Datos]</a></td>
<td class="right"><a href="#" class="mydomain"><img src="index_files/2_4.gif" width="32" border="0" height="32"><br>
</a><a href="#" class="mydomain" target="_blank">[Exportar Datos]</a></td>
</tr>
</tbody></table>
<p></p>
<div id="header2"></div>
<div id="footer"></div>
</div>
</div>
<?php
if($session->isAdmin()){
echo "[<a href=\"admin/admin.php\">Centro de Administración</a>] ";
}
echo "[<a href=\"usuarios/process.php\">Salir</a>]";
}
else{
?>
<?php
/**
* User not logged in, display the login form.
* If user has already tried to login, but errors were
* found, display the total number of errors.
* If errors occurred, they will be displayed.
*/
if($form->num_errors > 0){
echo "<font size=\"2\" color=\"#ff0000\">".$form->num_errors." errore(s) encontrados</font>";
}
?>
<div class="wrap">
<div class="box_wrapper">
<div class="textbox_outer">
<h3 align="left" class="Estilo1">Ingreso</h3>
<div class="labels" align="left">
<span class="Estilo3" >Usuario:</span>
</div>
<form action="usuarios/process.php" method="POST">
<table>
<tr><td>
<input name="user" type="text" class="textboxes" id="name" value="<?php echo $form->value("user"); ?>" />
</td>
</tr></table>
<?php echo $form->error("user"); ?>
<div class="labels">
<label for="e-mail"><span class="Estilo3">Password:</span></label>
</div>
<table>
<tr><td>
<div align="center">
<input name="pass" type="password" class="textboxes" id="e-mail" value="<?php echo $form->value("pass"); ?>" />
<?php echo $form->error("pass"); ?><br />
</div></td></tr></table>
<table>
<tr><td align="left">
<input type="checkbox" name="remember" <?php if($form->value("remember") != ""){ echo "checked"; } ?>>
<font style="font-family:Geneva, Arial, Helvetica, sans-serif" size="2">Recordarme la proxima vez </font></td></tr></table>
<input type="hidden" name="sublogin" value="1">
<table>
<tr><td align="left">
<p class="submit"><input class="btn" type="submit" name="submit" value="Login" />
</td></tr></table>
</form>
<?php
}
?>
</p>
</div>
</div>
</div>
</body>
</html>
|