MOON
Server: Apache
System: Linux kvm.asjudinet.com 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 08:09:09 EST 2025 x86_64
User: asjudine (1001)
PHP: 8.0.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/asjudine/www/iuris/pages/call_center/php/TBL_TICKETS_CEDULA.php
<?php
    
    include("conexion_inter.php");
    $HOY = date("Y-m-d");
         
    $control_tickets = mysql_query("SELECT cedula, ticket, nombre, contrato, estado, fecha_ejecucion FROM tickets WHERE cedula = '".$_POST['cedula']."' ORDER BY id ASC ");
    if (!$control_tickets) {
        die('Invalid query ticket: ' . mysql_error());
    }

    if ((mysql_num_rows($control_tickets)!=0)) 
    {
?>
        <div class="col-12" style="padding-top: 20px">
            <div class="row">
                <div class="col-sm table-responsive">
                    <table class="table table-sm table-hover table-striped table-bordered caption-top bg-primary">
                        <caption>Tickets Creados</caption>
                        <tr style="text-align: center" class="text-white">
                            <th>#</th>
                            <th>TICKET</th>
                            <th>CEDULA</th>
                            <th>NOMBRE</th>
                            <th>CONTRATO</th>
                            <th>ESTADO</th>
                        </tr>
<?php
        while(list($cedula, $ticket, $nombre, $contrato, $estado, $fecha_ejecucion) = mysql_fetch_row($control_tickets))
        {
            $NUM++;
            if($estado == '3')
            {
                $estado = 'EN CIERRE';
                $COLOR_TD = "#F1C47F";
            }
            else if($estado == '6')
            {
                $estado = 'CERRADO';
                $COLOR_TD = "#FE6D61";
            }
            else if($estado == '1')
            {
                if($fecha_ejecucion != '0000-00-00')
                {
                    if($fecha_ejecucion > $HOY || $fecha_ejecucion == $HOY)
                    {
                        $estado = 'ABIERTO PENDIENTE';
                        $COLOR_TD = "#66A4FF";
                    }
                    else if($fecha_ejecucion < $HOY )
                    {
                        $estado = 'HISTOSER';
                        $COLOR_TD = "#D29CBC";
                    }
                }
                else if($fecha_ejecucion == '0000-00-00'){
                    $estado = "ABIERTO";
                    $COLOR_TD = "green";
                }
            }
?>
                        <tr style="text-align: center;background-color: <?php echo $COLOR_TD;?>">
                            <td><?php echo $NUM;?></td>
                            <td><button class="BOTON" style="border-radius: 50px" onclick="window.open('php/consultar_ticket.php?ticket=<?php echo $ticket;?>','','top=30,left=50,toolbar=yes,scrollbars=yes,width=1100,height=620,status=yes')" ><b><?php echo $ticket;?></b></button></td>
                            <td><?php echo $cedula;?></td>
                            <td><?php echo $nombre;?></td>
                            <td><?php echo $contrato;?></td>           
                            <td><b><?php echo $estado;?></b></td>
                        </tr>
<?php
        }
?>
                    </table>
                </div>
            </div>
        </div>
        <hr style="height: 3px;border: solid 3px #000000">
        <style>
            .BOTON
            {
                background-color: burlywood; 
            }
        </style>
<?php
    }
?>