Ver Mensaje Individual
  #5 (permalink)  
Antiguo 19/10/2010, 18:29
moscrates
 
Fecha de Ingreso: julio-2008
Mensajes: 366
Antigüedad: 15 años, 9 meses
Puntos: 7
Respuesta: Llamar una funcion

Código PHP:
Ver original
  1. class Usuarios extends Conexion
  2.  {
  3.     function Consulta_Todos()
  4.       {
  5.          $Query = 'SELECT * FROM user_dat';
  6.          $resul=$this->EjecutarQuery($Query);
  7.          $listado = $this->Listado($resul);
  8.          return $listado;
  9.       }
  10.     function Listado($dato)
  11.       {
  12.         $lista = '';
  13.          $lista.='<table width="312" border="1" bgcolor="#FFFFFF" align="center">
  14.             <tr align="center">
  15.                 <th width="110" nowrap="nowrap" scope="col" bgcolor="#999999">Nombre</th>
  16.                 <th width="110" nowrap="nowrap" scope="col" bgcolor="#999999">Apellido Paterno</th>
  17.                 <th width="110" nowrap="nowrap" scope="col" bgcolor="#999999">Apellido Materno</th>
  18.                 <th width="110" nowrap="nowrap" scope="col" bgcolor="#999999">Telefono Empresa</th>
  19.                 <th width="110" nowrap="nowrap" scope="col" bgcolor="#999999">Celular</th>
  20.                 <th width="110" nowrap="nowrap" scope="col" bgcolor="#999999">Correo</th>
  21.                 <th width="110" nowrap="nowrap" scope="col" bgcolor="#999999">Accion</th>
  22.             </tr>';
  23.         while($filas = mysql_fetch_array($dato))
  24.             {
  25.               $lista.='
  26.                     <tr align="center">
  27.                         <td width="110" nowrap="nowrap" scope="col" >'.$filas['nom_user'].'</td>
  28.                         <td width="110" nowrap="nowrap" scope="col" >'.$filas['ape_1'].'</td>
  29.                         <td width="110" nowrap="nowrap" scope="col" >'.$filas['ape_2'].'</td>
  30.                         <td width="110" nowrap="nowrap" scope="col" >'.$filas['tel_empresa'].'</td>
  31.                         <td width="110" nowrap="nowrap" scope="col" >'.$filas['cel_user'].'</td>
  32.                         <td width="110" nowrap="nowrap" scope="col" >'.$filas['mail_user'].'</td>
  33.                         <td width="110" nowrap="nowrap" scope="col" ><a href="#"><img src="Imagenes/cross.png" width="30" height="30" /></a></td>
  34.                     </tr>';
  35.                 }
  36.             $lista.='</table>';
  37.            }
  38.          return $lista;
  39.      }