Ver Mensaje Individual
  #3 (permalink)  
Antiguo 14/12/2004, 16:00
juanqyf
 
Fecha de Ingreso: diciembre-2004
Mensajes: 8
Antigüedad: 19 años, 4 meses
Puntos: 0
Les muestro el codigo de la pagina

<?php
//Connection statement
require_once('Connections/dsnPostgres.php');

// begin Recordset
$query_rsResponsable = "SELECT empleados.nombre FROM empleados";
$rsResponsable = $dsnPostgres->SelectLimit($query_rsResponsable) or die($dsnPostgres->ErrorMsg());
$totalRows_rsResponsable = $rsResponsable->RecordCount();
// end Recordset

// begin Recordset
$maxRows_rsServicios = 10;
$pageNum_rsServicios = 0;
if (isset($HTTP_GET_VARS['pageNum_rsServicios'])) {
$pageNum_rsServicios = $HTTP_GET_VARS['pageNum_rsServicios'];
}
$startRow_rsServicios = $pageNum_rsServicios * $maxRows_rsServicios;
$vrEmpleado__rsServicios = "'BULLA BALLESTEROS WILSON ADOLFO'";
if (isset($HTTP_POST_VARS['ltResponsable'])) {
$vrEmpleado__rsServicios ="'". $HTTP_POST_VARS['ltResponsable'] ."'";
}
$query_rsServicios = sprintf("select servicios.idseguimiento, servicios.nocaso, servicios.contacto, clientes.nombrecompania, servicios.direccion, empleados.nombre, servicios.fechaasignacion, servicios.horainicio,servicios.horafin, servicios.descripcion, servicios.ejecutado, servicios.fechaejecucion, servicios.resultado, servicios.observaciones, servicios.cargorecibio, servicios.recibio from servicios left outer join clientes on (servicios.empresa = clientes.nombrecompania)left outer join empleados on (servicios.asignadoa = empleados.idempleado) WHERE servicios.ejecutado<>0 AND empleados.nombre=%s", $vrEmpleado__rsServicios);
$rsServicios = $dsnPostgres->SelectLimit($query_rsServicios, $maxRows_rsServicios, $startRow_rsServicios) or die($dsnPostgres->ErrorMsg());
if (isset($HTTP_GET_VARS['totalRows_rsServicios'])) {
$totalRows_rsServicios = $HTTP_GET_VARS['totalRows_rsServicios'];
} else {
$all_rsServicios = $dsnPostgres->SelectLimit($query_rsServicios) or die($dsnPostgres->ErrorMsg());
$totalRows_rsServicios = $all_rsServicios->RecordCount();
}
$totalPages_rsServicios = (int)(($totalRows_rsServicios-1)/$maxRows_rsServicios);
// end Recordset

//PHP ADODB document - made with PHAkt 2.8.2

// begin Recordset
$maxRows_rsservicios = 10;
$pageNum_rsservicios = 0;
if (isset($HTTP_GET_VARS['pageNum_rsservicios'])) {
$pageNum_rsservicios = $HTTP_GET_VARS['pageNum_rsservicios'];
}
$startRow_rsservicios = $pageNum_rsservicios * $maxRows_rsservicios;
$query_rsservicios = "SELECT servicios.idseguimiento, servicios.nocaso, clientes.nombrecompania, servicios.fechaasignacion, servicios.descripcion, empleados.nombre FROM servicios, clientes, empleados WHERE empleados.nombre Like 'p*'" ;
$rsservicios = $dsnPostgres->SelectLimit($query_rsservicios, $maxRows_rsservicios, $startRow_rsservicios) or die($dsnPostgres->ErrorMsg());
if (isset($HTTP_GET_VARS['totalRows_rsservicios'])) {
$totalRows_rsservicios = $HTTP_GET_VARS['totalRows_rsservicios'];
} else {
$all_rsservicios = $dsnPostgres->SelectLimit($query_rsservicios) or die($dsnPostgres->ErrorMsg());
$totalRows_rsservicios = $all_rsservicios->RecordCount();
}
$totalPages_rsservicios = (int)(($totalRows_rsservicios-1)/$maxRows_rsservicios);
// end Recordset
//prueba

function filtro()
{$HTTP_SESSION_VARS['stResponsable']=ltResponsable;
echo $HTTP_SESSION_VARS['stResponsable'];
}

//PHP ADODB document - made with PHAkt 2.8.2
//PHP ADODB document - made with PHAkt 2.8.2?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #FFFFFF;
}
.style3 {
color: #FFFFFF;
font-weight: bold;
}
.style14 {color: #FFFFFF; font-weight: bold; font-size: 24px; }
.style15 {font-size: xx-small}
.style16 {color: #FFFFFF; font-weight: bold; font-size: xx-small; }
-->
</style></head>

<body>
<table width="100%" border="0">
<tr>
<td width="285"><img src="binnACLE03.jpg" width="285" height="85"></td>
<td width="302">&nbsp;</td>
<td width="152"><img src="sweb.jpg" width="169" height="83"></td>
</tr>
</table>
<hr>
<table width="100%" border="0">
<tr bgcolor="#A3B2CC">
<td height="26" colspan="3"><div align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="797" height="26">
<param name="movie" value="menu.swf">
<param name="quality" value="high">
<embed src="menu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="797" height="26"></embed>
</object>
</div></td>
</tr>
</table>
<hr>
<form name="form1" method="post" action="<?php echo $HTTP_SERVER_VARS['PHP_SELF']; ?>">
<p> Seleccione responsable de servicio..
<select name="ltResponsable" id="ltResponsable" onChange="filtro()">
<?php

while(!$rsResponsable->EOF){
?>
<option value="<?php echo $rsResponsable->Fields('nombre')?>"><?php echo $rsResponsable->Fields('nombre')?></option>
<?php
$rsResponsable->MoveNext();
}
$rsResponsable->MoveFirst();
?>
</select>
<input type="submit" name="Submit" value="Filtrar">
</p>
</form>
<form name="form2" method="post" action="">
<table align = "center" width="100%" border="1" cellpadding="0" cellspacing="0">
<tr bgcolor="#7189B0">
<td> </td>
<td colspan="5"><div align="center"><span class="style14">Listado de servicios disponibles </span></div></td>
</tr>
<tr bgcolor="#A3B2CC">
<td height="28" bgcolor="#7189B0"></td>
<td ><div align="center" class="style3 style15">ID de Seguimiento</div></td>
<td nowrap><div align="center" class="style16"># de Caso</div></td>
<td><div align="center" class="style16">Razon Social </div></td>
<td><div align="center" class="style16">Fecha de Asignacion</div></td>
<td><div align="center" class="style16">Descripcion</div></td>
</tr>
<?php
while (!$rsServicios->EOF) {
?>
<tr>
<td bgcolor="#7189B0"></td>
<td><div align="center" class="style15"><a href="ActualizarCliente.php"><?php echo $rsServicios->Fields('idseguimiento'); ?></a></div></td>
<td nowrap><div align="center" class="style15"><?php echo $rsServicios->Fields('nocaso'); ?></div></td>
<td align="center" valign="middle"><ul class="style15">
<li><?php echo $rsServicios->Fields('nombrecompania'); ?></li>
</ul></td>
<td><div align="center" class="style15"><?php echo $rsServicios->Fields('fechaasignacion'); ?></div></td>
<td><div align="justify" class="style15"><?php echo $rsServicios->Fields('descripcion'); ?></div></td>
</tr>
<?php
$rsServicios->MoveNext();
}
?>
</table>
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
<?php
$rsResponsable->Close();

$rsServicios->Close();

$rsservicios->Close();
?>