Viewing file: indicadores.php (9.13 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
$sed = isset($user);
if ($sed == false) {
exit;
}else{
require('conexion2.php');
$stmt = Ociparse($c1, " SELECT EU_USERNAME FROM envista.env_users where EU_USERNAME='$user'");
$result = OCIExecute($stmt);
if ($result == false) {
exit;
}else{
$cont = 0;
while (OCIFetchInto($stmt, $value1)) {
foreach ($value1 as $val1)
{
$cont++;
}}
if ($cont == 1) {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Editor de Indicadores</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
link {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #D2F0FF;
}
a {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
color: #3399CC;
}
input {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #666666;
background-color: #F2FBFF;
}
-->
</style>
</head>
<?php
$des = isset($acc);
if ($des == true) {
if ($acc == 3) {
require('conexion3.php');
$query ="INSERT INTO indi VALUES('','$name','$tema','$valor','$unidad','$fuente','$fecha','$link')";
$result = mysql_query($query,$db);
}}
$des = isset($acc);
if ($des == true) {
if ($acc == 1) {
require('conexion3.php');
$query ="UPDATE indi SET inname='$inname',intema='$intema',invalor='$invalor',inunidad='$inunidad',infuente='$infuente',infecha='$infecha',inlink='$inlink' WHERE inid='$inid'";
$result = mysql_query($query,$db);
}}
if ($des == true) {
if ($acc == 2) {
require('conexion3.php');
$query ="DELETE FROM indi WHERE inid='$inid'";
$result = mysql_query($query,$db);
}}
?>
<BODY bgcolor="#B9E6FD" text="#000000" link="#0000FF" vlink="#990000" topmargin="0">
<table width="100%" border="0" cellpadding="8">
<tr>
<td bgcolor="#FFFFFF"><p><font size="4" face="Verdana, Arial, Helvetica, sans-serif">Editor
Principal de Indicadores Ambientales DAMA.</font></p>
</td>
</tr>
</table>
<p><font color="#0091D7" size="4" face="Verdana, Arial, Helvetica, sans-serif">1-Listado
General de Indicadores</font></p>
<table width="100%" border="1" cellpadding="2" cellspacing="0" bordercolor="#6CCFFF">
<tr bgcolor="#0091D7">
<td width="10%"><div align="center"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Tema</font></strong></font></div></td>
<td width="30%"><div align="center"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Nombre</font></strong></font></div></td>
<td width="10%"><div align="center"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Valor</font></strong></font></div></td>
<td width="10%"><div align="center"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Unidad</font></strong></font></div></td>
<td width="10%"><div align="center"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Fuente</font></strong></font></div></td>
<td width="10%"><div align="center"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Fecha</font></strong></font></div></td>
<td width="10%"><div align="center"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Link</font></strong></font></div></td>
<td width="10%"><div align="center"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Acción</font></strong></font></div></td>
</tr>
</table>
<?php
require('conexion3.php');
$consul = "SELECT *
FROM indi"
. " order by intema";
$result = mysql_query($consul,$db);
$num_filas = mysql_num_rows($result);
$say = 1;
while ($myrow = mysql_fetch_array($result))
{
$inid = $myrow["inid"];
$inname = $myrow["inname"];
$intema = $myrow["intema"];
$invalor = $myrow["invalor"];
$inunidad = $myrow["inunidad"];
$infuente = $myrow["infuente"];
$infecha = $myrow["infecha"];
$inlink = $myrow["inlink"];
?>
<form name="form<?php echo $say; ?>" method="post" action="requireindi.php">
<table width="100%" border="1" cellpadding="2" cellspacing="0" bordercolor="#6CCFFF">
<tr>
<td width="10%"><div align="center">
<input name="intema" type="text" id="intema" size="10" value="<?php echo $intema; ?>">
</div></td>
<td><div align="center">
<input name="inname" type="text" id="inname" size="30" value="<?php echo $inname ?>">
</div></td>
<td width="10%"><div align="center">
<input name="invalor" type="text" id="invalor" size="10" value="<?php echo $invalor; ?>">
</div></td>
<td width="10%"><div align="center">
<input name="inunidad" type="text" id="inunidad" size="10" value="<?php echo $inunidad; ?>">
</div></td>
<td width="10%"><div align="center">
<input name="infuente" type="text" id="infuente" size="10" value="<?php echo $infuente; ?>">
</div></td>
<td width="10%"><div align="center">
<input name="infecha" type="text" id="infecha" size="10" value="<?php echo $infecha; ?>">
</div></td>
<td width="10%"><div align="center">
<input name="inlink" type="text" id="inlink" size="10" value="<?php echo $inlink; ?>">
</div></td>
<td width="10%"><div align="center">
<input type="submit" name="Submit" value="Act..">
<input name="inid" type="hidden" id="inid" value="<?php echo $inid; ?>">
<input name="acc" type="hidden" id="acc" value="1">
<strong>
<input name="user" type="hidden" id="user" value="EMAIL">
</strong> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="requireindi.php?inid=<?php echo $inid; ?>&acc=2&user=EMAIL">Borrar
</a></font></div></td>
</tr>
</table>
</form>
<?php
$say++;
}
?>
<p><font color="#0091D7" size="4" face="Verdana, Arial, Helvetica, sans-serif">2-Agregar
Indicadores</font></p>
<form action="requireindi.php" method="post" name="formadd" id="formadd">
<table width="400" border="1" cellpadding="2" cellspacing="0" bordercolor="#66CCFF">
<tr>
<td width="50%" bgcolor="#0099CC"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Tema:</font></strong></font></td>
<td width="50%"><div align="center">
<input name="tema" type="text" id="tema">
</div></td>
</tr>
<tr>
<td width="50%" bgcolor="#0099CC"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Nombre:</font></strong></font></td>
<td width="50%"><div align="center">
<input name="name" type="text" id="name">
</div></td>
</tr>
<tr>
<td width="50%" bgcolor="#0099CC"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Valor:</font></strong></font></td>
<td width="50%"><div align="center">
<input name="valor" type="text" id="valor">
</div></td>
</tr>
<tr>
<td width="50%" bgcolor="#0099CC"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Unidad:</font></strong></font></td>
<td width="50%"><div align="center">
<input name="unidad" type="text" id="unidad">
</div></td>
</tr>
<tr>
<td width="50%" bgcolor="#0099CC"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Fuente:</font></strong></font></td>
<td width="50%"><div align="center">
<input name="fuente" type="text" id="fuente">
</div></td>
</tr>
<tr>
<td width="50%" bgcolor="#0099CC"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Fecha:</font></strong></font></td>
<td width="50%"><div align="center">
<input name="fecha" type="text" id="fecha" value="DD/MM/AAAA">
</div></td>
</tr>
<tr>
<td bgcolor="#0099CC"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Link:</font></strong></font></td>
<td><div align="center">
<input name="link" type="text" id="link">
</div></td>
</tr>
<tr>
<td colspan="2" bgcolor="#0099CC"><div align="center"><font color="#FFFFFF"><strong>
<input type="submit" name="Submit2" value="Agregar este indicador....">
<input name="acc" type="hidden" id="acc" value="3">
<input name="user" type="hidden" id="user" value="EMAIL">
</strong></font></div></td>
</tr>
</table>
</form>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">------------------------------------------------------------------------------------------------------<br>
Todos los derechos reservados para el DAMA, Departamento Técnico Administrativo
del Medio Ambiente<br>
Bogotá, D.C.<br>
Sistema de Información Ambiental</font></p>
</body>
</html>
<?php
}}
$c2 = OciLogoff($c1);
}
?>
|