Ver Mensaje Individual
  #8 (permalink)  
Antiguo 27/01/2014, 14:32
Avatar de letingel
letingel
 
Fecha de Ingreso: noviembre-2013
Ubicación: neiva
Mensajes: 41
Antigüedad: 10 años, 5 meses
Puntos: 0
Respuesta: títulos flotantes en html o js

este es el codigo de el formulario que muestra unas actividades previamente programadas

junto con alguno datos extra que debe diligenciar el usuario, resalto que tiene alguno problemas de identacion, pero es totalmente funcional.

Código PHP:
Ver original
  1. <?php
  2. include("../../conexion.php");
  3. include("fechas.php");
  4. if (!$_SESSION['id_usuario']){
  5. echo '<script language = javascript>
  6. alert("usuario no autenticado")
  7. self.location = "../../index.html"
  8. </script>';
  9. }
  10. if(isset($_POST["ordenes"])){
  11.     echo '<input type="hidden" name="idw" value="'.$_POST["ordenes"].'" />';
  12.     $id_ord = $_POST["ordenes"];
  13. }
  14. else{  
  15.     echo '<input type="hidden" name="idw" value="'.$_GET["id_Work"].'" />';
  16.     $id_ord = $_GET["id_Work"];
  17. }
  18. if(isset($_GET["var"])){
  19.     $fechaEnCurso=$_GET["var"];
  20. }
  21. ?>
  22. <html>
  23. <head>
  24. <script>
  25.     function aviso(){
  26.         var pres=confirm("Esta seguro de pasar al siguiente paso");
  27.         if (pres){
  28.                 document.inicio.action="procesa_informe_diario.php";
  29.             document.inicio.submit();
  30.             }
  31.         }
  32. </script>
  33. <meta http-equiv="Content-Type" content="text/html; charset=gb18030" />
  34. <title>Control de obra | LETINGEL S.A.S</title>
  35. <link rel="stylesheet" type="text/css" href="style.css" media="screen" />
  36. <style type="text/css">
  37. .auto-style1 {
  38.     margin-top: 0px;
  39. }</style>
  40. </head>
  41. <div id="main_container">
  42. <div id="header">
  43. <div class="logo"></div>
  44. <div id="menu">
  45. <ul>
  46. <li><a class="tooltip" href="residente.php" title=""><img src="images/icon1.gif" border="0" alt="" title="" /><span>Inicio</span></a></li>
  47. <li><a class="tooltip" href="soporte.html" title=""><img src="images/icon4.gif" border="0" alt="" title="" /><span>Soporte</span></a></li></ul></div></div>
  48. <div class="subheader_content">
  49. <div class="subheader_text">CONTROL DE OBRA | LETINGEL S.A.S</div></div>
  50. <div id="center_content">
  51. <div align="center"><h1>Informe Diario</h1></div>
  52. <div class="left_content">
  53. <div class="inner_copy"></div>
  54. <div align="center"><h1>Actividades</h1></div><br>
  55. <form name="inicio" method="post" onsubmit="return aviso()" action="">
  56. <?php
  57. echo '<input type="hidden" name="idw" value="'.$id_ord.'" />';
  58. $sql1 = mysql_query ("SELECT * FROM dias_actv WHERE fecha = '$fechaEnCurso'");
  59. echo "<hr>";
  60. echo "<table align=center>
  61.         <tr>       
  62.                 <td ALIGN=CENTER>Item</td>
  63.                 <td ALIGN=CENTER></td>
  64.                 <td ALIGN=CENTER></td>
  65.                 <td ALIGN=CENTER>Actividad</td>
  66.                 <td ALIGN=CENTER></td>
  67.                 <td ALIGN=CENTER></td>
  68.                 <td ALIGN=CENTER>Programado</td>
  69.                 <td ALIGN=CENTER></td>
  70.                 <td ALIGN=CENTER></td>
  71.                 <td ALIGN=CENTER>Realizado</td>
  72.                
  73.                 </tr>";    
  74. while ($row = mysql_fetch_row($sql1,MYSQL_ASSOC)){
  75.     $id_ac=$row['id_actv'];
  76.     $temp=mysql_query("SELECT * FROM Actividades WHERE id_act = '$id_ac'") or die(mysql_error());
  77.     $actv = mysql_fetch_array($temp);
  78.             echo "<tr>
  79.                       <td ALIGN=CENTER>".$actv['id_act']."</td>
  80.                       <td ALIGN=CENTER></td>
  81.                 <td ALIGN=CENTER></td>
  82.                       <td ALIGN=left title=".$actv['Descripcion'].">".$actv['Descripcion']."</td>
  83.                      <td ALIGN=CENTER></td>
  84.                 <td ALIGN=CENTER></td>
  85.                 <td ALIGN=center>".$row['cantidad']."</td>
  86.                      <td ALIGN=CENTER></td>
  87.                 <td ALIGN=CENTER></td>
  88.                       <td ALIGN=CENTER><input type='text' name='cantidad' size='3' required></td>
  89.                   </tr>";                  
  90. }
  91. echo "</table>";       
  92. ?>
  93. </body>
  94. </html>