Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/02/2016, 05:52
esoto
 
Fecha de Ingreso: abril-2015
Mensajes: 96
Antigüedad: 9 años
Puntos: 1
Ocultar Filas.

Estimados.. quisiera ver si me pueden ayudar nuevamente,

lo que sucede es que tengo una tabla.. de la siguiente manera.

CONTROLADOR:
Código PHP:
Ver original
  1. public function agenda()
  2.   {
  3.       if($this->session->userdata('nombre_usuario'))
  4.      {
  5.  
  6.            
  7.            $data = array('resultados' => $this->busqueda());                    
  8.            $data['results'] = $this->prejud_model->getsucursal();          
  9.            $data['result'] = $this->callcenter_model->getcall2();          
  10.            $datos_pag["titulo"]= "Call Center";
  11.            $datos_pag["submenu"]= "1";
  12.            $datos_pag["contenido"]= "Call Center/agenda";
  13.            $this->load->view("plantillas/front_end/header",compact("datos_pag"));
  14.            $this->load->view("plantillas/front_end/sidebar");
  15.            $this->load->view("callcenter/agenda",$data);
  16.            $this->load->view("plantillas/front_end/footer");
  17.  
  18.       }
  19.       else
  20.       {
  21.        redirect('index/index');
  22.        
  23.       }
  24.          
  25.  
  26.   }
  27.  
  28.     public function busqueda()
  29.   {
  30.      
  31.     if($this->input->get('buscar'))
  32.     {
  33.      
  34.      
  35.          
  36.       //los campos del formulario deben tener el mismo nombre
  37.       //que los de la base de datos a buscar, esto luego lo
  38.       //recorremos para comprobar como vienen      
  39.       $campos = array('TipoGestion', 'rut', 'sucursal');      
  40.       //envíamos los datos al modelo para hacer la búsqueda
  41.       $resultados = $this->buscador_model->nueva_busqueda($campos);
  42.      
  43.       if($resultados !== FALSE)
  44.       {
  45.        
  46.         return $resultados;
  47.        
  48.       }
  49.      
  50.     }
  51.    
  52.   }

y esta es la vista.

Código PHP:
Ver original
  1. <form action="<?= base_url().'callcenter/Agendaexcel'?>">
  2.  
  3.   <div class="muestra_poblaciones">
  4. <div class="table">
  5. <div class="table-responsive">
  6.  
  7.  <table class="table table-condensed">
  8.   <?php //si hay resultados los mostramos
  9.  
  10.   if(is_array($resultados) && !is_null($resultados))
  11.   {
  12.   ?>
  13.    
  14.  
  15.  
  16.     <thead>
  17.         <tr>
  18.  
  19.             <th>ESTADO</th>
  20.             <th>ACCION</th>                  
  21.             <th>TIPO DE GESTION</th>
  22.             <th>MONTO INSOLUTO</th>
  23.             <th>SUPERVISOR</TH>
  24.             <th>NOMBRE</th>
  25.             <th>RUT</th>
  26.             <th>DV</th>                                  
  27.             <th>SUCURSAL</th>                                        
  28.             <th>DIAS MORA</th>                                    
  29.             <th>Fecha Llamado</th>
  30.             <th>Compromiso Pago</th>
  31.  
  32.     <?php
  33.     foreach($resultados as $fila){
  34.     ?>
  35.         </tr>
  36.     </thead>
  37.     <tbody>  
  38.  
  39.  
  40.  
  41.    
  42.  
  43.         <tr class="cuerpo">
  44.    
  45.           <?php
  46.            if($fila->estado != 'SOLICITADO' and $fila->estado != 'GESTIONADO-TERRENO' and $fila->estado != 'GESTIONADO-TELEFONICA' )
  47.            {
  48.           ?>
  49.  
  50.  
  51.  
  52.          <?php
  53.           if( $fila->estado == 'GESTIONADO')
  54.           {
  55.           ?>
  56.           <TD class="success" style="color:green"> <img src="<?=base_url()?>public/images/check.png" width="20">  <?php print $fila->estado?></TD>          
  57.           <?php
  58.           }elseif ( $fila->estado == '') {
  59.                    
  60.           ?>
  61.           <TD class="danger" style="color:red"> <img src="<?=base_url()?>public/images/pendiente.png" width="20">PENDIENTE</TD>
  62.           <?php
  63.           }
  64.           ?>    
  65.        
  66.  
  67.           <td class=""><a  href="<?php echo base_url() ?>callcenter/guardar/<?php echo $fila->iPersona ?>"  ><img src="<?=base_url()?>public/images/call2.ico" width="20"  /><p><b class="b">GESTION TELEFONICA</b></p> </a></td>  
  68.          
  69.          
  70.           <td><?php print $fila->TipoGestion?></td>
  71.           <td>$ <?php print number_format($fila->vMontoInsoluto)?></td>
  72.           <TD><?php print $fila->supervisor?></TD>          
  73.           <td> <?php print $fila->Nombre ?> </td>            
  74.           <td><?php print $fila->Rut ?></td>  
  75.           <td><?php print $fila->cDv ?></td>                                
  76.           <td><?php print $fila->Sucursal ?></td>                                  
  77.           <td><?php print $fila->qDiasMora ?></td>
  78.                 <?php
  79.        foreach($result->result() as $row){
  80.     ?>
  81.    
  82.      <?php
  83.           $datetime1 = date_create($row->Fecha_Llamado);
  84.           $datetime2 = date_create(DATE('Y-m-d'));
  85.           $interval = date_diff($datetime1, $datetime2);
  86.          
  87.           ?>
  88.  
  89.        <?php
  90.  
  91.             $row->CompromisoPago;          
  92.             $Pago = str_replace('/', '-', $row->CompromisoPago);
  93.             $date = date_create_from_format('Y-m-d',$row->Fecha_Llamado);
  94.             $fecha2 = date_format($date, 'd-m-Y');
  95.              
  96.  
  97.  
  98.           $datetime3 = date_create($Pago);
  99.           $datetime4 = date_create(DATE('d-m-Y'));
  100.           $interval2 = date_diff($datetime3, $datetime4);
  101.  
  102.          
  103.          
  104.  
  105.            
  106.         ?>
  107.  
  108.        
  109.           <?php if($interval->format('%R%a')>2){ ?>
  110.  
  111.           <?php if($fila->Nombre == $row->Nombre) {?>          
  112.           <td> <?php echo $interval->format('%R%a'); ?></td>
  113.           <?php if ($interval2->format('%R%a') > 0) { ?>
  114.           <td> <?php  echo $interval2->format('%R%a'); ?></td>
  115.          <?php } ?>
  116.  
  117.          
  118.           <?php } ?>
  119.            <?php } ?>
  120.            <?php } ?>
  121.            
  122.             <?php
  123.              }
  124.             ?>
  125.          
  126.            
  127.         </tr>
  128.        
  129.     </tbody>
  130.  
  131.        <?php
  132.     }
  133.     ?>
  134.       <?php
  135.   }
  136.   ?>  
  137. </table>

entonces quiero ver la posibilidad de ocultar los siguientes td, osea no solo estos td.. si no que toda la fila completa.

- $interval->format('%R%a');
- $interval2->format('%R%a');

quisiera ver si me pueden ayudar.