Ver Mensaje Individual
  #6 (permalink)  
Antiguo 12/11/2015, 02:47
javierconesa23
 
Fecha de Ingreso: febrero-2011
Ubicación: Barcelona
Mensajes: 195
Antigüedad: 13 años, 2 meses
Puntos: 1
Respuesta: convertir resultado en un icono

Solo me funciona una vez:



Código PHP:
Ver original
  1. if( $distrib->Estado === 'Confirmada' )
  2. { echo '<button type="button" class="btn btn-success">
  3.                        <i class="entypo-check"></i>
  4.                    </button>';
  5. }
  6. else
  7. {
  8.     echo $distrib->Estado; <-----------------------Esta si que me la pinta como icono-------
  9. }  
  10.  echo $distrib->Estado; <-------------------------Esta ya no , sale "Confirmada" en texto plano----
  11. echo '<table class="table  table-bordered table-striped datatable"  id="table-2">';
  12. echo    '<thead>';
  13. echo        '<tr class="success" >';
  14. echo            '<th>Contrato</th>';
  15. echo            '<th>Cliente</th>';
  16. echo            '<th>Matricula Tractora</th>';
  17. echo            '<th>DNI PASAPORTE</th>';
  18. echo            '<th>Matricula Remolque</th>';
  19. echo            '<th>Nombre</th>';
  20. echo            '<th>Estado</th>'; 
  21. echo        '</tr>';
  22. echo    '</thead>';
  23. if (is_array($distribuciones)) {
  24.   foreach($distribuciones as $distrib) {
  25.            
  26.  echo ' <tbody>
  27.       <tr>
  28.            <td>'.$distrib->Contrato.'</td>
  29.             <td>'.$distrib->Cliente.'</td>
  30.             <td>'.$distrib->Matricula_tractora.'</td>
  31.             <td>'.$distrib->DNI_conductor.'</td>
  32.             <td>'.$distrib->Matricula_remolque.'</td>
  33.             <td>'.$distrib->Nombre_conductor.'</td>';
  34.          echo   '<td>'.$distrib->Estado.'</td>';    <------------------------Yo quiero que me pinte esta
  35.    echo     '</tr>';        
  36.            
  37.    
  38.   }    
  39. }
  40. echo '</table>';
esto esta quedando asi:


Contrato Cliente Matricula Tractora DNI PASAPORTE Matricula Remolque Nombre Estado
COPI299/15 101222 1234 HLK 39345123K 4567 EDF Juan Moreno Confirmada
COPI299/15 101222 5678 EFG 39877892G 6536 DDE Pedro Rodriguez Confirmada
Autorizar Matrículas