if (IdentificarHorasSubproyecto($row[0], $fechaini, $fechafin, $link)) { $nom_subproyecto = sacar_nom_subproyecto($row[0], $link); //echo "<br>Subproyecto:". $nom_subproyecto; ///////////////////// echo "<tr>\n\t\t\t\t\t\t<td width='287' height='16' align='center' class='style_subpro'><strong>" . $nom_subproyecto . "</strong></td>\n\t\t\t\t\t\t<td width='522' bgcolor='#666666' align='center'>\n\t\t\t\t\t\t <table border='0' align='center' cellspacing='1'>\n\t\t\t\t\t\t\t<tr>"; if ($id_empleado == 0) { $sql_1 = "SELECT id_empleado, nombre FROM empleados ORDER BY nombre"; } else { $sql_1 = "SELECT id_empleado, nombre FROM empleados WHERE id_empleado='{$id_empleado}'"; } $res_1 = mysql_query($sql_1, $link); $suma_horas_total_subproyecto = 0; $cont = 1; while ($row_1 = mysql_fetch_array($res_1)) { if (IdentificarHorasEmpleado($id_subproyecto, $row_1[0], $fechaini, $fechafin, $link)) { $horas_empleado_subproyecto = HorasEmpleadoSubproyecto($row_1[0], $row[0], $fechaini, $fechafin, $link); $suma_horas_total_subproyecto += $horas_empleado_subproyecto; $cont++; if ($cont % 2 == 0) { ?> <td width="92" height="16" align="center" bordercolor="#000000" bgcolor="#E6E6E6" onmouseover="tooltip.show('<strong>Empleado: </strong><?php echo $row_1[1]; ?> <br><strong>Subproyecto: </strong><?php echo sacar_nom_subproyecto($row[0], $link); ?> ');" onmouseout="tooltip.hide();"><font color="#333333"> <div style="width:80px; height:50px; overflow:auto"><?php echo $horas_empleado_subproyecto; ?> </div>
?> </td> <!-- HORAS DE CADA EMPLEADO --> <td> <table border="0" align="center" cellspacing="1" > <tr> <?php if ($id_empleado == 0) { $sqlEmp = "SELECT id_empleado, nombre FROM empleados ORDER BY nombre"; } else { $sqlEmp = "SELECT id_empleado, nombre FROM empleados WHERE id_empleado = '{$id_empleado}'"; } $resEmp = mysql_query($sqlEmp); while ($rowEmp = mysql_fetch_array($resEmp)) { if (IdentificarHorasEmpleado($id_subproyectos[$indSupPro], $rowEmp[0], $fechaini, $fechafin, $link)) { $horasEmp = HorasEmpleadoSubproyecto($rowEmp[0], $id_subproyectos[$indSupPro], $fechaini, $fechafin, $link); $horasTotales += $horasEmp; ?> <td width="100" height="16" align="center" bordercolor="#000000" bgcolor="#E2EBFE"> <font color="#333333"><div style=" width:80px; height:50px; overflow:auto"> <strong><font color="#333333"><strong></strong> <strong><font color="#333333"><strong><?php echo $horasEmp; ?> </strong> </font></strong></font></strong></div></font> </td> <?php } }