<div id="historial" class="modal fade" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">Historial del equipo </h4>
            </div>
            <div class="modal-body">
            <?php
                $sql8=mysqli_query($con,"SELECT * FROM orden_servicios where empresa='$empresa' and ord_num_serie='$ord_num_serie' and ord_id<>'$ord_id' order by ord_id desc ");
            ?>
                <table class="table table-bordered table-hover table-striped">
                    <thead>
                        <tr>
                            <th width="1%">N°</th>
                            <th width="11%">FECHA</th>
                            <th>EQUIPO</th>
                            <th>MARCA</th>
                            <th>FALLA</th>
                            <th width="5%">ESTADO</th>
                        </tr>
                    </thead>
                    <?php while ($reg=mysqli_fetch_array($sql8))
                        {
                            $id=$reg['ord_id'];
                            $ord_id1=$reg['ord_id'];
                            $ord_numero=$reg['ord_numero'];
                    ?>
                        <tr>
                            <td><?php echo $reg['ord_numero'];?></td>
                            <td><?php echo $reg['ord_fecha_recibo'];?></td>
                            <td><?php echo $reg['ord_tipo_equipo'];?></td>
                            <td><?php echo $reg['ord_marca'];?></td>
                            <td><?php echo $reg['ord_falla'];?></td>
                            <td>
                                <?php
                                if($reg['ord_estado']=='EN TALLER')
                                {
                                  echo' <div  class="btn-group pull-right"><span class="badgenaranja" >EN TALLER</span></div>';
                                }
                                else if ($reg['ord_estado']=='TERMINADA')
                                {
                                   echo' <div class="btn-group pull-right"><span class="badgeazul"> TERMINADA</span></div>';
                                }
                                 else if ($reg['ord_estado']=='ENTREGADA')
                                {
                                   echo' <div class="btn-group pull-right"><span class="badgeverde"> ENTREGADA</span></div>';
                                }
                                else if ($reg['ord_estado']=='NO REPARADO')
                                { 
                                   echo' <div class="btn-group pull-right"><span class="badgegris"> NO REPARADO</span></div>';
                                }
                                else 
                                { 
                                   echo' <div class="btn-group pull-right"><span class="badgerojo" title="Anulado"> ANULADO</span></div>';
                                }
                                ?>
                            </td>
                        </tr>  
                        <?php }  ?>   
                </table>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div> 
</div>  