Ver Mensaje Individual
  #5 (permalink)  
Antiguo 21/01/2013, 16:42
Avatar de jmorasandi
jmorasandi
 
Fecha de Ingreso: enero-2013
Mensajes: 30
Antigüedad: 11 años, 3 meses
Puntos: 1
Respuesta: Color de fondo en texto segun "texto"

Ya lo intente de la manera que se me indico pero no funciona. No me muestra ningun error sin embargo no muestra $estado en el PHP Correccion: EL ERROR ES: Query was empty

Código:
<table width="600" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th>N. Reporte</th>
    <th>Nodo</th>
    <th>Estado</th>
   <th>Localizacion</th><th>Descripcion</th><th>Movil</th><th>&nbsp;</th><th>&nbsp;</th>
  </tr>
  <?php while ($rsEmp = mysql_fetch_assoc($queEmp)) { ?>
  <tr>
    <td><?php echo $rsEmp['nombre']; ?></td>
 <td><?php echo $rsEmp['direccion']; ?></td> 
	<td><?php switch($estado) {
	case 'pendiente':
		$cssClass = 'pendiente'; break;
	case 'abierto':
		$cssClass = 'abierto'; break;
	case 'proc':
		$cssClass = 'proc'; break;
	case 'asignado a he':
		$cssClass = 'he'; break;
}
 echo "<span class=\"{$cssClass}\">{$estado}</span>";?></td>
 <td><?php echo $rsEmp['zona']; ?></td> 
 <td><?php echo $rsEmp['descripcion']; ?></td> 
 <td><?php echo $rsEmp['movil']; ?></td> 
   <td><a href="editar.php?id=<?php echo $rsEmp['id']; ?>" target="_parent">Editar</a></td>
 <td><a href="#" onclick="delEmpresa(<?php echo $rsEmp['id']; ?>);">Eliminar</a></td>
  </tr>
  <?php } ?>
</table>