PageRenderTime 39ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/vidcamaraaxisguard/view/vid_camara_axisguard_tour.php

https://gitlab.com/talueses/SIPVE
PHP | 248 lines | 178 code | 17 blank | 53 comment | 18 complexity | 75ad9cd8b655dac725969b8bd11acf2b 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. * Listado de horarios
  41. * @author David Cocepcion CENIT-DIDI
  42. */
  43. session_start(); // start up your PHP session!
  44. if(!isset($_SESSION['usuario'])){
  45. header("location: login.php",true);
  46. return false;
  47. }
  48. header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
  49. header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
  50. //echo "<div align='left'><pre>".print_r($_REQUEST,true)."</pre></div>";
  51. require_once "../controller/vid_camara_axisguard_tour.control.op.php";// Class CONTROLLER
  52. $obj = new VidCamaraAxisguardTours();
  53. $data = $obj->getCamaraAxisGuardTours($_REQUEST["idcamaraaxisguard"]);
  54. ?>
  55. <html>
  56. <head>
  57. <meta http-equiv="Content-Type" content="text/html; charset=utf-8 ">
  58. <title>VidCamaraAxisguardTours</title>
  59. <link href="../../inicio/css/comunes.css" rel="stylesheet" type="text/css" />
  60. <link type="text/css" href="../../inicio/css/jquery-ui.css" rel="stylesheet" />
  61. <script type="text/javascript" src="../../inicio/js/jquery.js"></script>
  62. <script type="text/javascript" src="../../inicio/js/jquery-ui.min.js"></script>
  63. <style type="text/css" >
  64. #tabla{
  65. width:99%;
  66. height:95%;
  67. border: #aaaaaa solid 1px;
  68. background:#fff;
  69. -moz-border-radius: 6px;
  70. -webkit-border-radius: 6px;
  71. border-radius: 6px;
  72. }
  73. #listado{
  74. width:99%;
  75. background:#fff;
  76. margin: 0px 1px 0px 1px;
  77. border: #aaaaaa solid 1px;
  78. -moz-border-radius: 6px;
  79. -webkit-border-radius: 6px;
  80. border-radius: 6px;
  81. }
  82. #titulo{
  83. height: 30px;
  84. 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;
  85. -moz-border-radius: 6px;
  86. -webkit-border-radius: 6px;
  87. border-radius: 6px;
  88. }
  89. #listado tr {
  90. background:#fff;
  91. }
  92. #listado tr th {
  93. border: 1px solid #d3d3d3; background: #e6e6e6 url(../../inicio/css/images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555;
  94. -moz-border-radius: 6px;
  95. -webkit-border-radius: 6px;
  96. border-radius: 6px;
  97. }
  98. #listado tr.chequeada {
  99. background:#dd0;
  100. }
  101. #listado tr.pasada {
  102. background:#dd0;
  103. cursor:pointer;
  104. }
  105. #botones{
  106. margin: 10px;
  107. }
  108. img.accion{
  109. cursor: pointer;
  110. }
  111. </style>
  112. <script type="text/javascript" language="javascript">
  113. $(function() {
  114. $( "input:button, input:submit" ).button();
  115. $('#guardnbr').val( $('#guardnbr',parent.document).val());
  116. $('#idcamara').val( $('#idcamara',parent.document).val());
  117. });
  118. function visualizar(fila){
  119. $('#idvidcamaraaxisguardtour').val(fila.id);
  120. //$('#accion').val('visualizar');
  121. //$('#f1').attr('action','vid_camara_axisguard_tour.Acc.php');
  122. //$('#f1').submit();
  123. }
  124. filaseleccionada = {};
  125. function oclic(fila){
  126. filaseleccionada.className='';
  127. filaseleccionada = fila;
  128. $('#'+fila.id).attr("className",'chequeada');
  129. }
  130. function omover(fila){
  131. if (fila.id===filaseleccionada.id ) return false;
  132. //fila.className = 'pasada';
  133. $('#'+fila.id).attr("className",'pasada');
  134. }
  135. function omout(fila){
  136. if (fila.id===filaseleccionada.id ) return false;
  137. $('#'+fila.id).attr("className",'');
  138. }
  139. function Accion(acc){
  140. $('#accion').val(acc);
  141. $('#f1').attr('action','vid_camara_axisguard_tour.Acc.php');
  142. if (acc == "modificar" || acc == "eliminar" || acc == "enviarArchivo"){
  143. if ($('#idvidcamaraaxisguardtour').val()==""){
  144. alert("Debe seleccionar un registro de la lista");
  145. return false
  146. }
  147. if (acc == "eliminar"){
  148. if (!confirm("\xbf Esta seguro que desea eliminar el registro ?")){
  149. return false;
  150. }
  151. $('#f1').attr('action','vid_camara_axisguard_tour.Op.php');
  152. }
  153. }
  154. $('#f1').submit();
  155. return true;
  156. }
  157. </script>
  158. </head>
  159. <body style="margin:0px;background:#fff;">
  160. <div id="principal" style="width:99%;" >
  161. <div id="tabla" align="center">
  162. <?php
  163. if (!Controller::chkPermiso($_SESSION["usuario"], CATEGORIA,"grdPos")){
  164. echo Controller::$mensajePermisos;
  165. }else{
  166. ?>
  167. <table id="listado">
  168. <tr>
  169. <th width="80%">Position</th>
  170. <th width="20%" align="center" title="Agregar">
  171. <img class="accion" src="../images/sub_black_add-20.png" onclick="return Accion('agregar')" />
  172. </th>
  173. </tr>
  174. <?php
  175. $setPosition = null;
  176. if (count($data) > 0){
  177. foreach ($data as $row){?>
  178. <tr id="<?php echo $row->idvidcamaraaxisguardtour;?>" onmouseover="omover(this)" onmouseout="omout(this)">
  179. <td><?php echo $row->presetname;?></td>
  180. <td align="center">
  181. <img title="Modicicar" class="accion" src="../images/Notes-edit-20.png" onclick="$('#idvidcamaraaxisguardtour').val('<?php echo $row->idvidcamaraaxisguardtour;?>');return Accion('modificar')" />
  182. &nbsp;&nbsp;
  183. <img title="Eliminar" class="accion" src="../images/sub_black_delete-20.png" onclick="$('#idvidcamaraaxisguardtour').val('<?php echo $row->idvidcamaraaxisguardtour;?>');$('#tournbr').val('<?php echo $row->tournbr;?>');return Accion('eliminar')" />
  184. </td>
  185. </tr>
  186. <?php
  187. $countPos++;
  188. //echo "<p>$countPos!=$row->position && !$setPosition</p>";
  189. if ($countPos!=$row->position && !$setPosition){
  190. $setPosition = $countPos;
  191. }
  192. }
  193. }else{
  194. ?>
  195. <tr>
  196. <td colspan="3">
  197. <div id="divmensaje" style="width:99%;border:2px solid red" align="center">No se encontraron registros</div>
  198. </td>
  199. </tr>
  200. <?php
  201. }
  202. if (!$setPosition){
  203. $countPos++;
  204. $setPosition = $countPos;
  205. }
  206. ?>
  207. </table>
  208. <div id="botones" >
  209. <center>
  210. <form name="f1" id="f1" action="vid_camara_axisguard_tour.Acc.php" method="POST">
  211. <input type="hidden" name="idvidcamaraaxisguardtour" id="idvidcamaraaxisguardtour">
  212. <input type="hidden" name="idcamaraaxisguard" id="idcamaraaxisguard" value="<?php echo $_REQUEST["idcamaraaxisguard"]?>" />
  213. <input type="hidden" name="setPosition" id="setPosition" value="<?php echo $setPosition?>" />
  214. <input type="hidden" name="idcamara" id="idcamara" />
  215. <input type="hidden" name="guardnbr" id="guardnbr" />
  216. <input type="hidden" name="tournbr" id="tournbr" />
  217. <input type="hidden" name="accion" id="accion" value="">
  218. <!--<input type="submit" value="Agregar" onclick="return Accion('agregar')" class="boton">
  219. <input type="submit" value="Modificar" onclick="return Accion('modificar')" class="boton">
  220. <input type="button" value="Eliminar" onclick="return Accion('eliminar')" class="boton">
  221. <input type="submit" value="Ayuda" onclick="this.form.action='vid_camara_axisguard_tour.Ayuda.php'" class="boton">-->
  222. </form>
  223. </center>
  224. </div>
  225. <?php
  226. }
  227. ?>
  228. </div>
  229. </div>
  230. </body>
  231. </html>