PageRenderTime 41ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/vidcamaraaxisguard/view/vid_camara_axisguard_tour.Acc.php

https://gitlab.com/talueses/SIPVE
PHP | 170 lines | 120 code | 8 blank | 42 comment | 12 complexity | 7ba150b961514f3dfbafff747901f806 MD5 | raw file
  1. <?php
  2. /*******************************************************************************\
  3. * @copyright
  4. *
  5. * === SIPve ===
  6. * Sistema Integrado de Protección con capacidades de Videovigilancia
  7. * Control de Acceso y Carnetización para el resguardo físico de instalaciones.
  8. *
  9. * Copyright (C) 2012 Fundación Centro Nacional de Innovación Tecnológica, Cenit.
  10. * Dirección de Investigación, Desarrollo e Innovación.
  11. * Gilda Ramos.
  12. * José Medina.
  13. * Héctor Reverón.
  14. * David Concepción.
  15. * Ronald Delgado.
  16. *
  17. * This program is free software: you can redistribute it and/or modify
  18. * it under the terms of the GNU General Public License as published by
  19. * the Free Software Foundation, either VERSION 3 of the License, or
  20. * (at your option) any later version.
  21. *
  22. * This program is distributed in the hope that it will be useful,
  23. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  24. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  25. * GNU General Public License for more details.
  26. *
  27. * You should have received a copy of the GNU General Public License
  28. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  29. *
  30. * Para mas información visite
  31. * @link http://repositorio.softwarelibre.gob.ve/ - RNA
  32. * @link http://sourceforge.net/projects/sipve/ - SourceForge
  33. *
  34. \*******************************************************************************/
  35. ?>
  36. <?php
  37. /**
  38. * Formulario de acciones agregar, modificar y visualizar datos
  39. * @author David Concepcion
  40. */
  41. session_start(); // start up your PHP session!
  42. if(!isset($_SESSION['usuario'])){
  43. header("location: login.php",true);
  44. return false;
  45. }
  46. header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
  47. header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
  48. //echo "<div align='left'><pre>".print_r($_REQUEST,true)."</pre></div>";
  49. require_once "../controller/vid_camara_axisguard_tour.control.op.php";// Class CONTROLLER
  50. if ($_REQUEST["accion"] == "modificar" || $_REQUEST["accion"] == "visualizar"){
  51. $obj = new VidCamaraAxisguardTours();
  52. $data = $obj->getVidCamaraAxisguardTour($_REQUEST["idvidcamaraaxisguardtour"]);
  53. if (!$data ){
  54. echo $obj->getMensaje();
  55. }
  56. }
  57. $disabled = "";
  58. if ($_REQUEST["accion"] == "visualizar"){
  59. $disabled = "disabled";
  60. }
  61. ?>
  62. <html>
  63. <head>
  64. <meta http-equiv="Content-Type" content="text/html; charset=utf-8 ">
  65. <link href="../../inicio/css/comunes.css" rel="stylesheet" type="text/css" />
  66. <link type="text/css" href="../../inicio/css/jquery-ui.css" rel="stylesheet" />
  67. <script type="text/javascript" src="../../inicio/js/jquery.js"></script>
  68. <script type="text/javascript" src="../../inicio/js/jquery-ui.min.js"></script>
  69. <style type="text/css">
  70. .list{
  71. color: #000000;
  72. font-style: oblique;
  73. background-color: #f0ebe2;
  74. width: 300px;
  75. border: 1px solid #ccc0a9;
  76. }
  77. #contenido{
  78. width:95%;
  79. padding: 5px;
  80. border: #aaaaaa solid 1px;
  81. background:#fff;
  82. -moz-border-radius: 6px;
  83. -webkit-border-radius: 6px;
  84. border-radius: 6px;
  85. }
  86. #titulo{
  87. height: 20px;
  88. border: 1px solid #aaaaaa; background: #cccccc url(../../inicio/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold;
  89. -moz-border-radius: 6px;
  90. -webkit-border-radius: 6px;
  91. border-radius: 6px;
  92. }
  93. #datos{
  94. width: 95%;
  95. background:#fff;
  96. margin: 5px 1px 0px 1px;
  97. padding: 5px;
  98. border: #aaaaaa solid 1px;
  99. -moz-border-radius: 6px;
  100. -webkit-border-radius: 6px;
  101. border-radius: 6px;
  102. }
  103. #botones{
  104. margin: 10px;
  105. }
  106. </style>
  107. <script type="text/javascript" language="javascript">
  108. $(function() {
  109. $( "input:button, input:submit" ).button();
  110. $('#guardnbr').val( $('#guardnbr',parent.document).val());
  111. $('#idcamara').val( $('#idcamara',parent.document).val());
  112. });
  113. </script>
  114. </head>
  115. <body style="margin:0px;background:#fff;">
  116. <div id="divmensaje" style="width:99%;"></div>
  117. <br />
  118. <iframe name="ifrm1" id="ifrm1" frameborder="0" width="0" height="0" scrolling="no"></iframe>
  119. <form method="POST" name="f1" action="vid_camara_axisguard_tour.Op.php" target="ifrm1">
  120. <div id="contenido" align="center">
  121. <table>
  122. <tr title="Guardia">
  123. <td align="right">Guardia:</td>
  124. <td>
  125. <select disabled>
  126. <?php echo ControlVidCamaraAxisguardTour::make_combo("vid_camara_axisguard","where idcamaraaxisguard = '".$_REQUEST["idcamaraaxisguard"]."'", "idcamaraaxisguard", "guardname", $_REQUEST["idcamaraaxisguard"],false);?>
  127. </select>
  128. </td>
  129. </tr>
  130. <tr title="Posiciones de la C&aacute;mara">
  131. <td align="right">Posiciones de la C&aacute;mara:</td>
  132. <td>
  133. <select name="idcamaraaxispresetpos" id="idcamaraaxispresetpos" <?php echo $disabled;?>>
  134. <option value="">Seleccione</option>
  135. <?php echo ControlVidCamaraAxisguardTour::make_combo("vid_camara_axispresetpos pos","where pos.idcamara = (select vg.idcamara from vid_camara_axisguard vg where vg.idcamaraaxisguard ='".$_REQUEST["idcamaraaxisguard"]."') order by pos.presetname", "pos.idcamaraaxispresetpos", "pos.presetname", $data->idcamaraaxispresetpos,false);?>
  136. </select>
  137. </td>
  138. </tr>
  139. </table>
  140. </div>
  141. <br />
  142. <div id="botones" align="center">
  143. <input type="hidden" name="accion" value="<?php echo $_REQUEST["accion"];?>">
  144. <input type="hidden" name="idvidcamaraaxisguardtour" id="idvidcamaraaxisguardtour" value="<?php echo $data->idvidcamaraaxisguardtour ?>">
  145. <input type="hidden" name="idcamaraaxisguard" id="idcamaraaxisguard" value="<?php echo $_REQUEST["idcamaraaxisguard"]?>" />
  146. <input type="hidden" name="idcamara" id="idcamara" />
  147. <input type="hidden" name="guardnbr" id="guardnbr" />
  148. <input type="hidden" name="tournbr" id="tournbr" value="<?php echo $data->tournbr==""?"9999":$data->tournbr;?>" >
  149. <input type="hidden" name="position" id="position" value="<?php echo $data->position==""?$_REQUEST["setPosition"]:$data->position;?>" >
  150. <input type="hidden" name="movespeed" id="movespeed" value="<?php echo $data->movespeed==""?"5":$data->movespeed;?>" >
  151. <input type="hidden" name="waittime" id="waittime" value="<?php echo $data->waittime==""?"1":$data->waittime;?>" >
  152. <input type="hidden" name="waittimeviewtype" id="waittimeviewtype" value="<?php echo $data->waittimeviewtype==""?"seconds":$data->waittimeviewtype;?>" >
  153. <?php
  154. if ($_REQUEST["accion"] == "agregar" || $_REQUEST["accion"] == "modificar"){
  155. echo "<input type=\"submit\" value=\"".ucfirst($_REQUEST["accion"])." Punto\" />&nbsp;&nbsp;&nbsp;";
  156. echo "<input type=\"button\" onclick=\"document.location.href='vid_camara_axisguard_tour.php?idcamaraaxisguard=".$_REQUEST["idcamaraaxisguard"]."'\" value=\"Volver\" />";
  157. }
  158. ?>
  159. </div>
  160. </form>
  161. </body>
  162. </html>