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 originalpublic function agenda()
{
if($this->session->userdata('nombre_usuario'))
{
$data = array('resultados' => $this->busqueda()); $data['results'] = $this->prejud_model->getsucursal();
$data['result'] = $this->callcenter_model->getcall2();
$datos_pag["titulo"]= "Call Center";
$datos_pag["submenu"]= "1";
$datos_pag["contenido"]= "Call Center/agenda";
$this->load->view("plantillas/front_end/header",compact("datos_pag")); $this->load->view("plantillas/front_end/sidebar");
$this->load->view("callcenter/agenda",$data);
$this->load->view("plantillas/front_end/footer");
}
else
{
redirect('index/index');
}
}
public function busqueda()
{
if($this->input->get('buscar'))
{
//los campos del formulario deben tener el mismo nombre
//que los de la base de datos a buscar, esto luego lo
//recorremos para comprobar como vienen
$campos = array('TipoGestion', 'rut', 'sucursal'); //envíamos los datos al modelo para hacer la búsqueda
$resultados = $this->buscador_model->nueva_busqueda($campos);
if($resultados !== FALSE)
{
return $resultados;
}
}
}
y esta es la vista.
Código PHP:
Ver original<form action="<?= base_url().'callcenter/Agendaexcel'?>">
<div class="muestra_poblaciones">
<div class="table">
<div class="table-responsive">
<table class="table table-condensed">
<?php //si hay resultados los mostramos
{
?>
<thead>
<tr>
<th>ESTADO</th>
<th>ACCION</th>
<th>TIPO DE GESTION</th>
<th>MONTO INSOLUTO</th>
<th>SUPERVISOR</TH>
<th>NOMBRE</th>
<th>RUT</th>
<th>DV</th>
<th>SUCURSAL</th>
<th>DIAS MORA</th>
<th>Fecha Llamado</th>
<th>Compromiso Pago</th>
<?php
foreach($resultados as $fila){
?>
</tr>
</thead>
<tbody>
<tr class="cuerpo">
<?php
if($fila->estado != 'SOLICITADO' and $fila->estado != 'GESTIONADO-TERRENO' and $fila->estado != 'GESTIONADO-TELEFONICA' )
{
?>
<?php
if( $fila->estado == 'GESTIONADO')
{
?>
<TD class="success" style="color:green"> <img src="<?=base_url()?>public/images/check.png" width="20"> <?php print $fila->estado?></TD>
<?php
}elseif ( $fila->estado == '') {
?>
<TD class="danger" style="color:red"> <img src="<?=base_url()?>public/images/pendiente.png" width="20">PENDIENTE</TD>
<?php
}
?>
<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>
<td><?php print $fila->TipoGestion?></td>
<TD><?php print $fila->supervisor?></TD>
<td> <?php print $fila->Nombre ?> </td>
<td><?php print $fila->Rut ?></td>
<td><?php print $fila->cDv ?></td>
<td><?php print $fila->Sucursal ?></td>
<td><?php print $fila->qDiasMora ?></td>
<?php
foreach($result->result() as $row){
?>
<?php
$interval = date_diff($datetime1, $datetime2);
?>
<?php
$row->CompromisoPago;
$date = date_create_from_format('Y-m-d',$row->Fecha_Llamado);
$interval2 = date_diff($datetime3, $datetime4);
?>
<?php if($interval->format('%R%a')>2){ ?>
<?php if($fila->Nombre == $row->Nombre) {?>
<td> <?php echo $interval->format('%R%a'); ?></td>
<?php if ($interval2->format('%R%a') > 0) { ?>
<td> <?php echo $interval2->format('%R%a'); ?></td>
<?php } ?>
<?php } ?>
<?php } ?>
<?php } ?>
<?php
}
?>
</tr>
</tbody>
<?php
}
?>
<?php
}
?>
</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.