<?php
/*----------------------------------------------------------------------*
* Se agrega este código para evitar que almacene en cache la página *
* y de esta forma obligar a que refresque la pantalla. *
*----------------------------------------------------------------------*/
//--> No usar cache (requirido para Opera)
$GLOBALS['now'] = gmdate('D, d M Y H:i:s') . ' GMT'; header('Expires: ' . $GLOBALS['now']); // rfc2616 - Section 14.21 header('Last-Modified: ' . $GLOBALS['now']); header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0'); // HTTP/1.1 header('Pragma: no-cache'); // HTTP/1.0 // No usar cache fin
$requiredUserLevel = array(1); if(empty($DOCUMENT_ROOT)) $DOCUMENT_ROOT=$HTTP_SERVER_VARS['DOCUMENT_ROOT'];
$cfgProgdir = $DOCUMENT_ROOT. '/phpSecurePages/';
include($cfgProgdir. "secure.php");
if(empty($DOCUMENT_ROOT)) $DOCUMENT_ROOT=$HTTP_SERVER_VARS['DOCUMENT_ROOT'];
include_once($DOCUMENT_ROOT."/adodb/adodb.inc.php");
include_once($DOCUMENT_ROOT."/adodb/adodb-ABC.inc.php");
include_once($DOCUMENT_ROOT."/adodb/adodb-pager.inc.php");
$ID_PERSONA = $HTTP_POST_VARS['id'];
$FECHAINI = $HTTP_POST_VARS['añoini'].'-'.$HTTP_POST_VARS['mesini'].'-'.$HTTP_POST_VARS['diaini'];
$FECHAFIN = $HTTP_POST_VARS['añofin'].'-'.$HTTP_POST_VARS['mesfin'].'-'.$HTTP_POST_VARS['diafin'];
if ($FECHAINI > $FECHAFIN) {
$res = NCok;
header("Location: ./SICONACT.php?reg=$res");
}
?>
<html>
<head>
<title>Resultado Consulta (usuarios)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="mm_travel2.css" type="text/css" />
<script language="JavaScript" type="text/javascript">
//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
var monthname=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
//--------------- END LOCALIZEABLE ---------------
</script>
</head>
<body bgcolor="#C0DFFD">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#3366CC">
<td colspan="2" rowspan="2"><img src="img/sip.jpg" alt="Header image" width="165" height="127" border="0" /></td>
<td height="63" colspan="3" id="logo" valign="bottom" align="center" nowrap="nowrap">
<DIV ALIGN="CENTER" STYLE="margin-top:2px; margin-left:2px; color:black;
font-size:23px; font-family:Verdana;font-weight:bold; ">SISTEMA INTEGRAL DE PROYECTOS</DIV>
<DIV ALIGN="CENTER" STYLE="margin-top:-26px; color:#CCFF99; font-size:23px;
font-family:Verdana; font-weight:bold; ">SISTEMA INTEGRAL DE PROYECTOS</DIV></td>
<td width="60"> </td>
</tr>
<tr bgcolor="#3366CC">
<td height="64" colspan="3" id="tagline" valign="top" align="center"> <p> </p>
<p><DIV ALIGN="CENTER" STYLE="margin-top:2px; margin-left:2px; color:black;
font-size:20px; font-family:Verdana;">Actividades del <? echo $FECHAINI;?> al <? echo $FECHAFIN;?></DIV>
<DIV ALIGN="CENTER" STYLE="margin-top:-24px; color:white; font-size:20px;
font-family:Verdana;">Actividades del <? echo $FECHAINI;?> al <? echo $FECHAFIN;?></DIV></p></td>
<td width="60"> </td>
</tr>
<tr>
<td colspan="7" bgcolor="#003366"><img src="mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
</tr>
<tr bgcolor="#CCFF99">
<td colspan="7" id="dateformat" height="25"> <script language="JavaScript" type="text/javascript">
document.write(TODAY); </script> </td>
</tr>
<tr>
<td colspan="7" bgcolor="#003366"><img src="mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
</tr>
<tr>
<td width="165" valign="top" bgcolor="#E6F3FF">
<table border="0" cellspacing="0" cellpadding="0" width="165" id="navigation">
<tr>
<td width="165"> <br />
<br /></td>
</tr>
<tr>
<td width="165"><a href="SICONACT.php" class="navText">Atras</a></td>
</tr>
<tr>
<td width="165"><a href="cerrar.php" type="submit" onClick="return confirmar()">Cerrar sesión </a></td>
<script type="text/javascript">
function confirmar(){
return confirm('¿Estas seguro de cerrar la sesion?');
}
</script>
</tr>
</table>
*<br />
<br />
<br />
<br /> </td>
<td width="50"><img src="mm_spacer.gif" alt="" width="50" height="1" border="0" /></td>
<td colspan="2" valign="top"><img src="mm_spacer.gif" alt="" width="305" height="1" border="0" /><br />
<br />
<br />
<table border="0" cellspacing="2" cellpadding="3" width="300">
<tr>
<?php
$db = NewADOConnection('mysql');
//conexión a la base de datos (servidor, usuario, password, base)
$db->PConnect('localhost','','','SIP');
$sql = " Select b.nombre, fechareg, secuencia, horas, reqinc, actividad, status";
$sql.= " from actividades a, empleados b, estadoact where a.id_persona = b.id";
$sql.= " and a.id_persona = '$ID_PERSONA' and fechareg >= '$FECHAINI' and fechareg <= '$FECHAFIN' and estado <> 'B'";
$sql.= " and a.estado = id_estado ";
$sql.= " order by 1,2,3";
$pager = new ADODB_Pager($db,$sql);
$pager->Render();
$db->Close(); ?>
</tr>
</table>
<td width="116"> </td>
</tr>
<tr>
<td width="165"> </td>
<td width="50"> </td>
<td width="4"> </td>
<td width="386"> </td>
<td width="116"> </td>
<td width="190"> </td>
<td width="51"> </td>
</tr>
</table>
</body>
</html>