Programación Web y Scripting > PHP

 Reporte De Susarios En Php

(1/2) > >>

frezeer:
Hola Tengo un problemilla quiero sacar reportes de usaurios

este reporte esta en una sola tabla



$arr_user[]= array($nombre,$num_proy, $num_bug,$name_proy,
                            $num_tarea , $num_servicio,$cliente,$proyecto,$actividad ,
                                  $lun , $mar,  $mie ,$juev, $vie ,$sab,$dom,$horas,$horas,$chargables,
                                  $fecha_ini, $fecha_fin,$lunes, $martes,$miercoles,$jueves,$viernes,
                                  $sabado,$domingo);

<table border="0" style=" width:250px; " cellpadding="2" cellspacing="2" border="1">
      <tr>
          <th >NOMBRE</th>
          <th ># PROYECTO</th>
            <th ># BUG </th>
              <th > NOMBRE PROYECTO</th>
          <th ># TAREA </th>
          <th ># SERVICIO </th>
          <th >CLIENTE</th>
          <th >NOMBRE DEL PROYECTO</th>
          <th >ACTIVIDAD</th>
          <th style="border: 1px solid #C0C0C0;" NOWRAP>LUNES</th>
          <th >MARTES</th>
          <th >MIERCOLES</th>
          <th >JUEVES</th>
          <th >VIERNES</th>
          <th >SABADO</th>
          <th >DOMINGO</th>
       <!--<th >TOTAL</th>-->
          <th >SUBT</th>
          <th >CHARGABLES</th>       
      </tr>
      <tr>
         <th > </th>
          <th > </th>
            <th > </th>
          <th > </th>
          <th > </th>
          <th > </th>
          <th > </th>
          <th > </th>
          <th > </th>
          <th >
            <font color="<?echo $a;?>"><? echo $dates[1][1]; ?></font></th>

      <th ><font color="<?echo $a;?>"><? echo $dates[1][2]; ?></font></th>
       <th ><font color="<?echo $a;?>"><? echo $dates[1][3]; ?></font></th>
      <th ><font color="<?echo $a;?>"><? echo $dates[1][4]; ?></font></th>
      <th ><font color="<?echo $a;?>"><? echo $dates[1][5]; ?></font></th>
      <th ><font color="<?echo $a;?>"><? echo $dates[1][6]; ?></font></th>
      <th ><font color="<?echo $a;?>"><? echo $dates[1][7]; ?></font></th>
      <th >SUBTOTAL</th>
      <th >(Y/N)</th>
      </tr>
   
      <tr>
      
      <?php
      $TOTAL=0;
      
   
            foreach ($supervisores as $g=> $arr_info)
               {
      
                       
            
      
         $SUBTOTAL = $arr_user[10] + $arr_user[11] + $arr_user[12] +
         $arr_user[13] + $arr_user[14] + $arr_user[15] + $arr_user[16];
         
         $TOTAL += $SUBTOTAL;
      ?>
   
      <td " nowrap><font color="<?echo $a; ?>"><?php echo $arr_user[0];  ?></font></td>
      <td ">       <font color="<?echo $a; ?>"><?php echo $arr_user[1];  ?></font></td>
      <td ">       <font color="<?echo $a; ?>"><?php echo $arr_user[2];  ?></font></td>
      <td ">       <font color="<?echo $a; ?>"><?php echo $arr_user[3];  ?></font></td>
      <td ><font color="<?echo $a; ?>"><?php echo $arr_user[4];  ?></font></td>
      <td ">       <font color="<?echo $a; ?>"><?php echo $arr_user[5];  ?></font></td>
      <td ">       <font color="<?echo $a; ?>"><?php echo $arr_user[6];  ?></font></td>
      <td ><font color="<?echo $a; ?>"><?php echo $arr_user[7];  ?></font></td>
      <td ><font color="<?echo $a; ?>"><?php echo $arr_user[8];  ?></font></td>
   
   <!--------------------------------------------------------------------------------------------------->
         
   <td ">
      <font color="<?echo $a; ?>"><?php echo number_format($arr_user[10],"2",".",""); ?></font></td>
    <td ">
      <font color="<?echo $a; ?>"><?php echo number_format($arr_user[11],"2",".",""); ?></font></td>
   <td ">
      <font color="<?echo $a; ?>"><?php echo number_format($arr_user[12],"2",".",""); ?></font></td>
   <td ">
      <font color="<?echo $a; ?>"><?php echo number_format($arr_user[13],"2",".",""); ?></font></td>
   <td ">
      <font color="<?echo $a; ?>"><?php echo number_format($arr_user[14],"2",".",""); ?></font></td>
   <td ">
      <font color="<?echo $a; ?>"><?php echo number_format($arr_user[15],"2",".",""); ?></font></td>
   <td ">
      <font color="<?echo $a; ?>"><?php echo number_format($arr_user[16]); ?></font></td>
   <!--<td ">
      <font color="<?echo $a; ?>"><?php echo $arr_user[17]; ?></font></td>--->
   <td ">
      <font color="<?echo $a; ?>"><?php echo  $SUBTOTAL; ?></font></td>
   <td ">
      <font color="<?echo $a; ?>"><?php echo $dataarr_user[18]; ?></font></td>
   </tr>
   
   <?php
         }
      }
   ?>

      <tr><td> </td></tr>   
      <tr>
      <td bgcolor="#FF9900"  align="right"> </td>   
      <td > </td>
      <td > </td>
      <td > </td>
      <td > </td>
      <td > </td>
      <td > </td>
      <td > </td>
      <td > </td>
      <td > </td>
      <td > </td>
      <td > </td>
      <td > </td>
      <td > </td>
      <td > </td>
      <td > </td>
   <!--<td > </td>-->
      <td bgcolor="#FF6600"  align="left"></b><font color="<?echo $a; ?>">TOTAL</B></font></td>
      <td bgcolor="#FF6600"  align="center">
         <font color="<?echo $a; ?>">
                     <B><?php echo $TOTAL; ?></B>
               </font>
           </td>
            </tr>
                    
       </table>


lo que quiero es que cada ves que cambie el usuario haga un nuevo reporte y no lo haga en la misma tabla

como puedo hacer esto

ibito:
La verdad yo no te entendí
 :huh:

frezeer:
Hola disculpen por ser chilero ( o en su defecto webon) lo que pasa es que solo tengo internet en mi trabajo y no puedo explicarselos con mas detalle y en micasa
aun no tengo internet bueno

lo que pasa es es que en una tabla tengo informacion de varios usuario

estos usuarios tienen la misma informacion por lo tanto al hacer la consulta me trae todos los susuario


NOMBRE # PROYECTO # BUG  NOMBRE PROYECTO # TAREA  # SERVICIO  CLIENTE NOMBRE DEL PROYECTO ACTIVIDAD LUNES MARTES MIERCOLES JUEVES VIERNES SABADO DOMINGO SUBT CHARGABLES

este es el encabezado de la tabla  y en cada fila lleva su dato

por ejemplo en la columna nombre el dato cambia el usuario es diferente

ok  lo que quiero es que cada usario tenga su reporte se que con los arreglos lo puedo hacer  tengo id y nombre

buen que en la misma pagina me muestre un repoorte por ejemplo


id   nombre  actividad  horas  total
1    sergio     reportes    1         1



   pedro

carlos

piter

frezeer:
perdon por el el error



id nombre actividad reporte horas total
1    sergio   mmm      1         1       1
2    sergio   pppp       1         1       1
3    sergio   aaqaa     2         2       2
4    mayra   lllll          1         2       1
5    mayra   lllll          1         2       1
6    mayra   lllll          1         2       1
7    mayra   lllll          1         2       1
8    mayra   lllll          1         2       1
9    pedro    55          55        5       5

                                               total 14
ok asi lo tengo



lo que nesesito es que  

id nombre actividad reporte horas total
1    sergio   mmm      1         1       1
2    sergio   pppp       1         1       1
3    sergio   aaqaa     2         2       2
                                            total 4

id nombre actividad reporte horas total
4    mayra   lllll          1         2       1
5    mayra   lllll          1         2       1
6    mayra   lllll          1         2       1
7    mayra   lllll          1         2       1
8    mayra   lllll          1         2       1

                                                   total 5


id nombre actividad reporte horas total
9    pedro    55          55        5       5
                                                   total 5




ok asi sucesivamente para tener un listado de todos los usarios en una sola tabla
y cada uno con su reporte

por su amable comprension gracias

ibito:
entonces necesitas (en éste ejemplo) 3 tablas?

Navegación

[0] Índice de Mensajes

[#] Página Siguiente

Ir a la versión completa