PageRenderTime 52ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/vidalarmaslist/view/loadEvento.php

https://gitlab.com/talueses/SIPVE
PHP | 233 lines | 177 code | 10 blank | 46 comment | 4 complexity | 70980f52f4e66374d1a6dcb03e69ec4c 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. * Jenner Fuentes.
  17. *
  18. * This program is free software: you can redistribute it and/or modify
  19. * it under the terms of the GNU General Public License as published by
  20. * the Free Software Foundation, either VERSION 3 of the License, or
  21. * (at your option) any later version.
  22. *
  23. * This program is distributed in the hope that it will be useful,
  24. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  25. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. * GNU General Public License for more details.
  27. *
  28. * You should have received a copy of the GNU General Public License
  29. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  30. *
  31. * Para mas información visite
  32. * @link http://repositorio.softwarelibre.gob.ve/ - RNA
  33. * @link http://sourceforge.net/projects/sipve/ - SourceForge
  34. * @link https://gitlab.com/talueses/SIPVE - Gitlab Repositorio.
  35. *
  36. \*******************************************************************************/
  37. ?>
  38. <?php
  39. /*
  40. * Autor David Concepcion 07-10-2010 CENIT
  41. * Listado de eventos
  42. */
  43. session_start(); // start up your PHP session!
  44. header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
  45. header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
  46. require_once "../controller/vid_alarmaslist.control.op.php";
  47. //echo "<div align='left'><pre>".print_r($_SERVER,true)."</pre></div>";
  48. $obj = new ControlAlarmasList();
  49. $data = $obj->loadEvento();
  50. $data = $data[0];
  51. // ------------ SRC IMAGEN GUARDADA EN SERVIDOR MOTION -------------------------------//
  52. $numero = $data->numero;
  53. if ($data->numero < 10){
  54. $numero = "0".$data->numero;
  55. }
  56. $src = "http://".$data->ipv4Servidor."/motion/cam".$numero."/".basename($data->file_picture_save);
  57. // ------------ SRCMOVIE VIDEO GUARDADO EN SERVIDOR MOTION -------------------------------//
  58. $srcMovie = base64_encode("http://".$data->ipv4Servidor."/motion/cam".$numero."/".basename($data->file));
  59. ?>
  60. <html>
  61. <head>
  62. <meta http-equiv="Content-Type" content="text/html; charset=utf-8 ">
  63. <title>Listado de Eventos</title>
  64. <link href="../../inicio/css/comunes.css" rel="stylesheet" type="text/css" />
  65. <link type="text/css" href="../../inicio/css/jquery-ui.css" rel="stylesheet" />
  66. <link type="text/css" rel="stylesheet" media="screen" href="../css/jquery.toChecklist.css" />
  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. #titulo{
  71. width: 440px;
  72. height: 20px;
  73. 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;
  74. -moz-border-radius: 6px;
  75. -webkit-border-radius: 6px;
  76. border-radius: 6px;
  77. }
  78. #datos{
  79. background:#fff;
  80. margin: 1px 1px 1px 1px;
  81. padding: 1px;
  82. border: #aaaaaa solid 1px;
  83. -moz-border-radius: 6px;
  84. -webkit-border-radius: 6px;
  85. border-radius: 6px;
  86. }
  87. img{
  88. background:#fff;
  89. border: #aaaaaa solid 1px;
  90. -moz-border-radius: 6px;
  91. -webkit-border-radius: 6px;
  92. border-radius: 6px;
  93. }
  94. #divmensaje{
  95. width: 450px;
  96. position: absolute;
  97. top: -10px;
  98. opacity:0.9;
  99. }
  100. </style>
  101. <script type="text/javascript" language="javascript">
  102. $(document).ready(function(){
  103. $( "input:button, input:submit,button" ).button();
  104. //hideLoading();
  105. setColorStatus();
  106. $('#divmensaje').live({
  107. click: function() {
  108. $(this).fadeOut('slow');
  109. }
  110. });
  111. });
  112. function hideLoading(){
  113. $("#cargando").fadeOut("slow");
  114. }
  115. function setColorStatus(){
  116. if ($("#status").val()=="0"){
  117. $("#status").css("color","#FF0000");
  118. }
  119. if ($("#status").val()=="1"){
  120. $("#status").css("color","#006400");
  121. }
  122. }
  123. function errorImg(obj){
  124. $("#"+obj.id).attr("src","../images/Video-Camera-640x480.png");
  125. }
  126. </script>
  127. </head>
  128. <body style="margin:0px;background:#fff;" onload="hideLoading();">
  129. <div id="cargando" align="center" style="position: absolute;background-color:#000000;opacity:.7;width: 100%;height: 100%;vertical-align: middle;color: #FFFFFF;font-size: 20px;">
  130. <br>&nbsp;<br>&nbsp;<br>&nbsp;<br>&nbsp;<br>&nbsp;<br>&nbsp;<img src="../images/loading51.gif" border="0"><br>&nbsp;<b>Cargando...</b>
  131. </div>
  132. <iframe name="ifrm1" id="ifrm1" frameborder="0" width="0" height="0" scrolling="no"></iframe>
  133. <div id="datos" align="center">
  134. <table>
  135. <tr>
  136. <th colspan="2" >
  137. <img src="<?php echo $src;?>" alt="<?php echo $data->camara." - ".$data->numero?>" id="imagen" width="320" height="240" onerror="errorImg(this);">
  138. <br><div id="divmensaje" ></div>
  139. </th>
  140. </tr>
  141. <tr>
  142. <th colspan="2" id="titulo" style="padding: 5px">
  143. <div align="right" style="float:left;" >
  144. <a href="downloadFile.php?file=<?php echo $srcMovie;?>" target="ifrm1"><img src="../images/Video-Camera-32x15.png" alt="Descargar Video" title="Descargar Video" border="0" ></a>
  145. <?php
  146. if ($data->idplantafisica){
  147. ?><a href="mapaGetZonasCamaras.php?idcamara=<?php echo $data->idcamara;?>&idplantafisica=<?php echo $data->idplantafisica;?>&idevento=<?php echo $data->idevento;?>" ><img src="../images/Layers-Map-32x16.png" alt="" title="Ubicaci&oacute;n de la c&aacute;mara"/></a><?php
  148. }
  149. ?>
  150. </div>
  151. <div style="width: 40%;float:left;" >
  152. <?php echo trim($data->camara ." - ".$data->numero);?>
  153. </div>
  154. <div id="reloj" align="right" style="float: left;" >
  155. <?php echo trim(Controller::formatoFecha($data->fecha));?>
  156. </div>
  157. </th>
  158. </tr>
  159. <tr title="Pa&iacute;s">
  160. <td align="right">Pa&iacute;s:</td>
  161. <td>
  162. <input type="text" name="pais" size="30" maxlength="100" title="Pa&iacute;s" value="<?php echo $data->pais;?>" readonly>
  163. </td>
  164. </tr>
  165. <tr title="Estado">
  166. <td align="right">Estado:</td>
  167. <td>
  168. <input type="text" name="estado" size="30" maxlength="100" title="Estado" value="<?php echo $data->estado;?>" readonly>
  169. </td>
  170. </tr>
  171. <tr title="Ciudad">
  172. <td align="right">Ciudad:</td>
  173. <td>
  174. <input type="text" name="ciudad" size="30" maxlength="100" title="Ciudad" value="<?php echo $data->ciudad;?>" readonly>
  175. </td>
  176. </tr>
  177. <tr title="Avenida">
  178. <td align="right">Avenida:</td>
  179. <td>
  180. <input type="text" name="avenida" size="30" maxlength="100" title="Avenida" value="<?php echo $data->avenida;?>" readonly>
  181. </td>
  182. </tr>
  183. <tr title="Edificio">
  184. <td align="right">Edificio:</td>
  185. <td>
  186. <input type="text" name="edificio" size="30" maxlength="100" title="Edificio" value="<?php echo $data->edificio;?>" readonly>
  187. </td>
  188. </tr>
  189. <tr title="Piso">
  190. <td align="right">Piso:</td>
  191. <td>
  192. <input type="text" name="piso" size="30" maxlength="100" title="Piso" value="<?php echo $data->piso;?>" readonly>
  193. </td>
  194. </tr>
  195. <tr title="Oficina">
  196. <td align="right">Oficina:</td>
  197. <td>
  198. <input type="text" name="oficina" size="30" maxlength="100" title="Oficina" value="<?php echo $data->oficina;?>" readonly>
  199. </td>
  200. </tr>
  201. <!-------------------------------------------------------- DATOS EVENT_START ----------------------------------------------------->
  202. <tr title="Estado">
  203. <td align="right">Estado:</td>
  204. <td>
  205. <select name="status" id="status" style="color: #FF0000;" disabled>
  206. <option value="0" style="color: #FF0000;" onclick="setColorStatus(this)" <?php echo Controller::busca_valor($data->status, "0")?>>No Atendido</option>
  207. <option value="1" style="color: #006400;" <?php echo Controller::busca_valor($data->status, "1")?>>Atendido</option>
  208. </select>
  209. </td>
  210. </tr>
  211. <tr title="Observaci&oacute;n">
  212. <td align="right" valign="top">Observaci&oacute;n:</td>
  213. <td>
  214. <textarea name="observacion" id="observacion" cols="33" rows="5" readonly><?php echo $data->observacion;?></textarea>
  215. </td>
  216. </tr>
  217. </table>
  218. </div>
  219. <center>
  220. <input type="hidden" name="idevento" id="idevento" value="<?php echo $data->idevento;?>">
  221. </center>
  222. </body>
  223. </html>