84 lines
2.7 KiB
PHP
84 lines
2.7 KiB
PHP
|
|
<div class="encabezado">LISTA DE ÚLTIMOS CAMBIOS DE CANDIDATOS</div>
|
||
|
|
<br/>
|
||
|
|
|
||
|
|
<table cellpadding="0" cellspacing="1" width="600" class="agenda">
|
||
|
|
<tr class="encabezado">
|
||
|
|
<th width="120">Fecha cambio</th>
|
||
|
|
<th>Candidato</th>
|
||
|
|
<th>Acciones</th>
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<?php
|
||
|
|
$resultado_usuarios;
|
||
|
|
//Se sacaran los usuarios que han sido modificados o añadidos en los últimos 30 días
|
||
|
|
$sql_usuarios = 'SELECT DISTINCT h.oid_h, h_max.fecha_h_max, usuarios.tipo, usuarios.nombre, usuarios.apellidos
|
||
|
|
FROM historial_usuario as h
|
||
|
|
left join (
|
||
|
|
select h1.oid_h, max(h1.fecha_h) as fecha_h_max
|
||
|
|
from historial_usuario as h1
|
||
|
|
group by 1
|
||
|
|
) as h_max on (h_max.oid_h = h.oid_h)
|
||
|
|
left join usuarios on (usuarios.oid = h.oid_h)
|
||
|
|
where h.fecha_h between date_sub(now(),interval 30 day) and now()';
|
||
|
|
|
||
|
|
$bd=new BD();
|
||
|
|
$resultado_usuarios = $bd->execQuery($sql_usuarios);
|
||
|
|
while($row = mysql_fetch_array($resultado_usuarios)) {
|
||
|
|
?>
|
||
|
|
<tr>
|
||
|
|
<td class="agendaTitDia"> <?php echo $row["fecha_h_max"] ?> </td>
|
||
|
|
<td class="agendaTitDia"> <?php echo $row["nombre"] . ' ' . $row["apellidos"]?> </td>
|
||
|
|
<td class="agendaTitDia"> <a href="detalle_candidato.php?oid=<?php echo $row["oid_h"]; ?>#historial"><img src="css/brick_go.png" title="Ver cambios"/></a>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
<?php
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
|
||
|
|
</table>
|
||
|
|
<br/><br/>
|
||
|
|
<div class="encabezado">LISTA DE ÚLTIMOS CAMBIOS DE SOLICITUDES DE OFERTA</div>
|
||
|
|
<br/>
|
||
|
|
<table cellpadding="0" cellspacing="1" width="600" class="agenda">
|
||
|
|
<tr class="encabezado">
|
||
|
|
<th width="120">Fecha cambio</th>
|
||
|
|
<th>Solicitud de oferta</th>
|
||
|
|
<th>Acciones</th>
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<?php
|
||
|
|
$resultado_ofertas;
|
||
|
|
//Se sacaran los usuarios que han sido modificados o añadidos en los últimos 30 días
|
||
|
|
$sql_ofertas = 'SELECT DISTINCT h.oid_h, h_max.fecha_h_max, clientes.id, pedidos.nombre, pedidos.empleados, pedidos.duracion
|
||
|
|
FROM historial_pedido as h
|
||
|
|
left join (
|
||
|
|
select h1.oid_h, max(h1.fecha_h) as fecha_h_max
|
||
|
|
from historial_pedido as h1
|
||
|
|
group by 1
|
||
|
|
) as h_max on (h_max.oid_h = h.oid_h)
|
||
|
|
left join pedidos on (pedidos.oid = h.oid_h)
|
||
|
|
left join clientes on (clientes.oid = pedidos.cliente)
|
||
|
|
where h.fecha_h between date_sub(now(),interval 30 day) and now()';
|
||
|
|
|
||
|
|
$bd=new BD();
|
||
|
|
$resultado_ofertas = $bd->execQuery($sql_ofertas);
|
||
|
|
while($row = mysql_fetch_array($resultado_ofertas)) {
|
||
|
|
?>
|
||
|
|
<tr>
|
||
|
|
<td class="agendaTitDia"> <?php echo $row["fecha_h_max"] ?> </td>
|
||
|
|
<td class="agendaTitDia"> <?php echo $row["id"] . ' ' . $row["nombre"] . ' - número de empleados: ' . $row["empleados"]?> </td>
|
||
|
|
<td class="agendaTitDia"> <a href="pedido.php?idPedido=<?php echo $row["oid_h"]; ?>#historial"><img src="css/brick_go.png" title="Ver cambios"/></a>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
|
||
|
|
<?php
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
|
||
|
|
</table>
|