|
Directory : /home/zjabogados/public_html/reportes/ |
<?php
session_start();
$motorBD = $_SESSION['motorBD'];
$idusuario = $_SESSION['idusuario'];
require_once("../../../Connections/$motorBD.php");
require_once("../Libs/functionsextra.php");
$sql = "SELECT p.`id_permiso`
FROM tb_permiso p
INNER JOIN tb_rel_grupo_rol rgr ON rgr.tb_rol = p.tb_rol
INNER JOIN tb_rel_usuario_grupo rug ON rug.tb_grupo = rgr.tb_grupo
WHERE rug.tb_usuario = $idusuario and p.id_permiso = 90";
$rs_permiso = mysqli_query($zyz, $sql) or die(mysqli_error());
$row_rs_permiso = mysqli_fetch_assoc($rs_permiso);
$totalRows_rs_permiso = mysqli_num_rows($rs_permiso);
mysqli_free_result($rs_permiso);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/Contenido.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Documento sin título</title>
<!-- InstanceEndEditable --><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<link href="../css/contenido.css" rel="stylesheet" type="text/css">
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table border="0" align="center" cellpadding="0" cellspacing="10">
<tr>
<td><!-- InstanceBeginEditable name="Contenido" -->
<?php if ($totalRows_rs_permiso >= 1) { ?>
<?php
$sql = "SELECT * FROM vw_casos_segun_estado WHERE fecha_de_cancelacion IS NULL AND fecha_de_borrado IS NULL AND fecha_de_rechazo_de_caso IS NULL AND fecha_de_cierre is null";
$rs_casos = mysqli_query($zyz, $sql) or die(mysqli_error());
$totalRows_rs_casos = mysqli_num_rows($rs_casos);
if ($totalRows_rs_casos >= 1) {
$orden = $row_rs_alarmas['orden'];
$flag_orden = 0;
?>
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<td> </td>
<td>Fecha Registración</td>
<td>Expediente</td>
<td>Fecha de </td>
<td>Registrador</td>
<td>Negociador</td>
<td>Médico</td>
<td>Sucursal</td>
</tr>
<?php
do {
if ($orden <> $row_rs_casos['orden'] or $flag_orden == 0) {
$id_modulo_de_alarma = $row_rs_casos['orden'];
$flag_orden = 1;
?>
<tr>
<td colspan="8">ESTADO: <?php echo $row_rs_casos['estado_de_caso'] ?> </td>
</tr>
<?php } ?>
<tr>
<td><?php echo $row_rs_casos['id_caso'] ?></td>
<td><?php echo $row_rs_casos['fecha_now'] ?></td>
<td><?php echo $row_rs_casos['denominacion_del_expediente'] ?> contra <?php echo $row_rs_casos['contra'] ?></td>
<td><?php echo $row_rs_casos['fecha_de_inicio'] ?></td>
<td><?php echo $row_rs_casos['registrador'] ?></td>
<td><?php echo $row_rs_casos['negociador'] ?></td>
<td><?php echo $row_rs_casos['medico'] ?></td>
<td><?php echo $row_rs_casos['sucursal'] ?></td>
</tr>
<?php } while ($row_rs_casos = mysqli_fetch_assoc($rs_casos)); ?>
</table>
<?php
}
else {
?>
SIN REGISTROS DE CASOS QUE MOSTRAR
<?php
}
mysqli_free_result($rs_casos);
?>
<?php }
else { ?>
ERROR!! NO TIENE PERMISOS PARA VER ESTA PAGIINA!!
<?php } ?>
<!-- InstanceEndEditable --></td>
</tr>
</table></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>