Guest User

Untitled

a guest
Mar 18th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. <!doctype html>
  2. <?php
  3.  
  4. include('libreria/motor.php');
  5. require ('connection.php');
  6. require ('libreria/verificar-usuario.php');
  7. require ('libreria/solo-admin.php');
  8.  
  9. $v1 =$_GET['id'];
  10. if (isset($v1)) {
  11. $v2 = $v1;
  12. $query="select * from tareas where ID='$v2'";
  13. $result=mysql_query($query);
  14. $fila=mysql_fetch_array($result);
  15. }else{
  16. header("Location: tareas.php");
  17. }
  18.  
  19. $hora=strtotime($fila['TIEMPOASIG']);
  20. echo $fila['TIEMPOASIG'];
  21. //imprime 2018-03-30 18:00:00
  22. echo $hora;
  23. //imrpime 1522425600
  24. $horaformateada=date("d/m/Y G:i", $hora);
  25. echo $horaformateada;
  26. //imprime 30/03/2018 18:00
  27.  
  28. $viajebuque=$fila['NROVIAJE'];
  29. $queryx="SELECT BUQUE as buqueviaje FROM viajes WHERE NROVIAJE='$viajebuque'";
  30. $resultx=mysql_query($queryx);
  31. $filax=mysql_fetch_assoc($resultx);
  32. $buqueviaje=$filax["buqueviaje"];
  33.  
  34. $result = mysql_query("SELECT NROVIAJE, BUQUE FROM viajes ORDER BY NROVIAJE ASC");
  35. $opcion=' ';
  36. while($row=mysql_fetch_assoc($result)){
  37. $opcion .= '<option value = "'.$row['NROVIAJE'].'">'.$row['NROVIAJE'].' - '.$row['BUQUE'].'</option>';
  38. }
  39. $resultch = mysql_query("SELECT nombre FROM usuarios ORDER BY nombre ASC");
  40. $opcionch=' ';
  41. while($row=mysql_fetch_assoc($resultch)){
  42. $opcionch .= '<option value = "'.$row['nombre'].'">'.$row['nombre'].'</option>';
  43. }
  44.  
  45. ?>
  46. <html>
  47. <head>
  48. <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  49. <title>Modificar Tarea</title>
  50. <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen">
  51. </head>
  52. <body>
  53. <h1>Modificar Tarea</h1>
  54. <div class="form-group">
  55. <form id="form1" name="form1" method="post">
  56. <label for="NROVIAJE">Número de Viaje:</label>
  57. <select name="NROVIAJE" required id="NROVIAJE">
  58. <option value="<?php echo $fila['NROVIAJE']; ?>"> <?php echo $fila['NROVIAJE']; ?> - <?php echo $buqueviaje; ?></option>
  59. <?php echo $opcion; ?>
  60. </select><br>
  61. <label for="TAREA">Tarea</label>
  62. <input name="TAREA" type="text" required id="TAREA" value="<?php echo $fila['TAREA']; ?>"><br>
  63. <label for="DETALLESTAREA">Detalles de Tarea</label>
  64. <textarea name="DETALLESTAREA" required id="DETALLESTAREA" ><?php echo $fila['DETALLESTAREA']; ?></textarea><br>
  65. <label for="TIEMPOASIG">Tiempo asignado para finalización</label>
  66. <input name="TIEMPOASIG" type="datetime-local" required= id="TIEMPOASIG" value="<?php echo $horaformateada; ?>"><br>
  67.  
  68. <!-- no muestra ninguna hora -->
  69.  
  70. <label for="RESPONSABLE">Tarea asignada a:</label>
  71. <select name="RESPONSABLE" required id="RESPONSABLE" >
  72. <option value="<?php echo $fila['RESPONSABLE']; ?>"> <?php echo $fila['RESPONSABLE']; ?> </option>
  73. <?php echo $opcionch; ?>
  74. </select><br>
  75. <input name="Enviar" id="Enviar" value="Enviar" type="submit" class="btn btn-default">
  76. </form>
  77. </div>
  78. </body>
  79. </html>
Add Comment
Please, Sign In to add comment