index.php 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543
  1. <?php
  2. ini_set('display_errors', 1);
  3. error_reporting(E_ALL);
  4. header('Expires: Sun, 01 Jan 2014 00:00:00 GMT');
  5. header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
  6. header('Cache-Control: no-store, no-cache, must-revalidate');
  7. header('Cache-Control: post-check=0, pre-check=0', false);
  8. header('Pragma: no-cache');
  9. require_once("./include/bd_pdo.php");//die on error
  10. require_once("./include/util.php");
  11. define("COOKIE_N", "checador");
  12. date_default_timezone_set('America/Mexico_City');
  13. $auth = false;
  14. if(isset($_GET["error"])){
  15. switch(intval($_GET["error"])){
  16. case 0: $errorDesc="El usuario/contraseña son incorrectos"; break;
  17. case 1: $errorDesc="El usuario no está registrado en el sistema"; break;
  18. case 2: $errorDesc="Ocurrió un error al leer la información"; break;
  19. }
  20. }
  21. //Valida usuario en windows, regresa falso con error, 1 si es aceptado, 0 si es rechazado
  22. function validaUsuario($user, $pass){
  23. //$client = new nusoap_client('http://200.13.89.2/validacion.php?wsdl', 'wsdl');
  24. $client = new nusoap_client('http://validacion.lci.ulsa.mx/validacion.php?wsdl', 'wsdl');
  25. $error = $client->getError();
  26. if ($error) {
  27. return false;
  28. }
  29. $pass = utf8_decode($pass);
  30. $result = $client->call("valida_user_addo", array($user, $pass));
  31. if ($client->fault) {
  32. return false;
  33. } else {
  34. $error = $client->getError();
  35. if ($error) {
  36. return false;
  37. } else {
  38. if($result) return 1;
  39. else return 0;
  40. }
  41. }
  42. }
  43. if (isset($_COOKIE[COOKIE_N])){
  44. $usr_id = intval(desencripta($_COOKIE[COOKIE_N]));
  45. $stmt = $pdo->prepare('Select * from fs_usuario(:usr)');
  46. $stmt->bindParam(":usr", $usr_id);
  47. if(!$stmt->execute()){
  48. //print_r($stmt->errorInfo());
  49. header("Location: ../index.php?error=2");
  50. exit();
  51. }
  52. $auth=true;
  53. $usr_rs = $stmt->fetch();//Devuelve sólo 1 resultado
  54. $stmt->closeCursor(); // cierra conexion de resultado
  55. $stmt = null; // cierra conexion
  56. $usr_nombre = $usr_rs["Usuario_nombre"]." ".$usr_rs["Usuario_apellidos"];
  57. $usr_cve = $usr_rs["Usuario_claveULSA"];
  58. unset($usr_rs);
  59. }
  60. if($auth && !empty($usr_id)){
  61. //Buscar las materias que puede checar
  62. $error = false;
  63. //$fecha = '2021-03-08';//17
  64. //$hora = '08:45';
  65. $fecha = date("Y-m-d");
  66. $hora = date("H:i");
  67. $esProf = false;
  68. $esAdmin = false;
  69. $asistRegistrada = false;
  70. $msg = 0;
  71. $fecha_hora = $fecha." ".$hora;
  72. $hasAsistencia = false;
  73. //Arrelo para guardar los resultados de las validaciones
  74. $asistenciasArr = array(
  75. "asistencia" => array("profesor"=>array(), "administrativo"=>array()),
  76. "retardo" => array("profesor"=>array(), "administrativo"=>array())
  77. );
  78. //--Profesor LICENCIATURA
  79. if(!$error){
  80. //Lee asistencias
  81. $stmt = $pdo->prepare('Select * from fs_asistenciaprofesor_busca(:fecha, :hora, :usr, -30, 16, 1)');//Limite inferior es incluyente, limite superior excluyente
  82. $stmt->bindParam(":usr", $usr_id);
  83. $stmt->bindParam(":fecha", $fecha);
  84. $stmt->bindParam(":hora", $hora);
  85. if(!$stmt->execute()){
  86. //$t = $stmt->errorInfo();
  87. $errorDesc = "No se pudieron leer los horarios.";
  88. $error = true;
  89. }else{
  90. $esProf = true;
  91. $rs = $stmt->fetchAll();
  92. if(count($rs) > 0) $hasAsistencia = true;
  93. $asistenciasArr["asistencia"]["profesor"] = array_merge($asistenciasArr["asistencia"]["profesor"], $rs);
  94. }
  95. $stmt->closeCursor();
  96. }
  97. if(!$error){
  98. //Lee retardos
  99. $stmt = $pdo->prepare('Select * from fs_asistenciaprofesor_busca(:fecha, :hora, :usr, 16, 31, 1)');//Limite inferior es incluyente, limite superior excluyente
  100. $stmt->bindParam(":usr", $usr_id);
  101. $stmt->bindParam(":fecha", $fecha);
  102. $stmt->bindParam(":hora", $hora);
  103. if(!$stmt->execute()){
  104. //$t = $stmt->errorInfo();
  105. $errorDesc = "No se pudieron leer los horarios. ";
  106. $error = true;
  107. }else{
  108. $esProf = true;
  109. $rs = $stmt->fetchAll();
  110. if(count($rs) > 0) $hasAsistencia = true;
  111. $asistenciasArr["retardo"]["profesor"] = array_merge($asistenciasArr["retardo"]["profesor"], $rs);
  112. }
  113. $stmt->closeCursor();
  114. }
  115. //--Profesor POSGRADO
  116. if(!$error){
  117. //Lee asistencias
  118. $stmt = $pdo->prepare('Select * from fs_asistenciaprofesor_busca(:fecha, :hora, :usr, -60, 10, 2)');//Limite inferior es incluyente, limite superior excluyente
  119. $stmt->bindParam(":usr", $usr_id);
  120. $stmt->bindParam(":fecha", $fecha);
  121. $stmt->bindParam(":hora", $hora);
  122. if(!$stmt->execute()){
  123. //$t = $stmt->errorInfo();
  124. $errorDesc = "No se pudieron leer los horarios. ";
  125. $error = true;
  126. }else{
  127. $esProf = true;
  128. $rs = $stmt->fetchAll();
  129. if(count($rs) > 0) $hasAsistencia = true;
  130. $asistenciasArr["asistencia"]["profesor"] = array_merge($asistenciasArr["asistencia"]["profesor"], $rs);
  131. }
  132. $stmt->closeCursor();
  133. }
  134. if(!$error){
  135. //Lee retardos
  136. $stmt = $pdo->prepare('Select * from fs_asistenciaprofesor_busca(:fecha, :hora, :usr, 10, 31, 2)');//Limite inferior es incluyente, limite superior excluyente
  137. $stmt->bindParam(":usr", $usr_id);
  138. $stmt->bindParam(":fecha", $fecha);
  139. $stmt->bindParam(":hora", $hora);
  140. if(!$stmt->execute()){
  141. //$t = $stmt->errorInfo();
  142. $errorDesc = "No se pudieron leer los horarios. ";
  143. $error = true;
  144. }else{
  145. $esProf = true;
  146. $rs = $stmt->fetchAll();
  147. if(count($rs) > 0) $hasAsistencia = true;
  148. $asistenciasArr["retardo"]["profesor"] = array_merge($asistenciasArr["retardo"]["profesor"], $rs);
  149. }
  150. $stmt->closeCursor();
  151. }
  152. //--Administrativo
  153. if(!$error){
  154. //Lee avisos de hoy
  155. $avisoArr = array();
  156. $stmt = $pdo->prepare('Select * from fs_avisochecador(:usr, :fecha)');
  157. $stmt->bindParam(":usr", $usr_id);
  158. $stmt->bindParam(":fecha", $fecha);
  159. if($stmt->execute()){
  160. $aviso_rs = $stmt->fetchAll();
  161. foreach($aviso_rs as $aviso){
  162. $avisoArr[] = $aviso["Aviso_texto"];
  163. }
  164. }else{
  165. $t = $stmt->errorInfo();
  166. $errorDesc = "No se pudieron obtener los avisos".$t[2];
  167. }
  168. $stmt->closeCursor();
  169. //Lee asistencias
  170. /*$stmt = $pdo->prepare('Select * from fs_asistenciaadministrativo_busca(:fecha, :hora, :usr)');//Limite inferior es incluyente, limite superior excluyente
  171. $stmt->bindParam(":usr", $usr_id);
  172. $stmt->bindParam(":fecha", $fecha);
  173. $stmt->bindParam(":hora", $hora);
  174. if(!$stmt->execute()){
  175. $t = $stmt->errorInfo();
  176. $errorDesc = "No se pudieron leer los horarios administrativos. ";
  177. $error = true;
  178. }else{
  179. $esAdmin = true;
  180. $rs = $stmt->fetchAll();
  181. if(count($rs) > 0) $hasAsistencia = true;
  182. $asistenciasArr["asistencia"]["administrativo"] = array_merge($asistenciasArr["asistencia"]["administrativo"], $rs);
  183. }
  184. $stmt->closeCursor();*/
  185. }
  186. //Profesor Lic
  187. $registradasArr = null;
  188. $registradasArr = array();
  189. $stmt = $pdo->prepare('Select * from fs_asistenciaprofesor_registrada(:fecha, :hora, :usr, -30, 31, 1)');//Limite inferior es incluyente, limite superior excluyente
  190. $stmt->bindParam(":usr", $usr_id);
  191. $stmt->bindParam(":fecha", $fecha);
  192. $stmt->bindParam(":hora", $hora);
  193. if(!$stmt->execute()){
  194. //$t = $stmt->errorInfo();
  195. $resultMsg = "No se pudieron leer los horarios.";
  196. $error = true;
  197. }else{
  198. $rs = $stmt->fetchAll();
  199. foreach($rs as $row){
  200. $salon = "";
  201. if(isset($row["Salon_desc"])){//para profesores
  202. if($row["Salon_desc_larga"]!= ""){
  203. $salon = $row["Salon_desc"]." (".$row["Salon_desc_larga"].")";
  204. }else{
  205. $salon = $row["Salon_desc"];
  206. }
  207. }
  208. $registradasArr[]= array("salon"=>$salon, "hora"=>$row["Horario_hora"], "hora_inicio"=>substr($row["Horario_hora"], 0, 5), "tipo"=>1, "fecha"=>$row["Fecha"], "retardo"=>$row["Asistencia_isRetardo"], "materia"=>$row["Materia_desc"], "grupo"=>$row["Grupo_desc"]." ".$row["Carrera_prefijo"]);
  209. }
  210. }
  211. $stmt->closeCursor();
  212. //Profesor Posgrado
  213. $stmt = $pdo->prepare('Select * from fs_asistenciaprofesor_registrada(:fecha, :hora, :usr, -60, 31, 2)');//Limite inferior es incluyente, limite superior excluyente
  214. $stmt->bindParam(":usr", $usr_id);
  215. $stmt->bindParam(":fecha", $fecha);
  216. $stmt->bindParam(":hora", $hora);
  217. if(!$stmt->execute()){
  218. //$t = $stmt->errorInfo();
  219. $resultMsg = "No se pudieron leer los horarios.";
  220. $error = true;
  221. }else{
  222. $rs = $stmt->fetchAll();
  223. foreach($rs as $row){
  224. $salon = "";
  225. if(isset($row["Salon_desc"])){//para profesores
  226. if($row["Salon_desc_larga"]!= ""){
  227. $salon = $row["Salon_desc"]." (".$row["Salon_desc_larga"].")";
  228. }else{
  229. $salon = $row["Salon_desc"];
  230. }
  231. }
  232. $registradasArr[]= array("salon"=>$salon, "hora"=>$row["Asistencia_hora"], "hora_inicio"=>substr($row["Horario_hora"], 0, 5), "tipo"=>1, "fecha"=>$row["Fecha"], "retardo"=>$row["Asistencia_isRetardo"], "materia"=>$row["Materia_desc"], "grupo"=>$row["Grupo_desc"]." ".$row["Carrera_prefijo"]);
  233. }
  234. }
  235. $stmt->closeCursor();
  236. }
  237. function imprimeRegistro($grupo, $materia, $hora, $salon){
  238. $salon = (!empty($salon)) ? "<b>Salón:</b> $salon" : "";
  239. $grupo = (!empty($grupo)) ? $grupo : "";
  240. echo "<tr class='list-result'>
  241. <td style='width:120px; vertical-align:top'><h4 class='mb-1 '>$grupo</h4></td>
  242. <td><h4 class='mb-1 '>$materia</h4><p><b>Hora:</b> $hora <br><span></span>$salon</p></td>
  243. </tr>";
  244. }
  245. function imprimeRegistroChecado($grupo, $materia, $hora, $salon, $retardo){
  246. $salon = (!empty($salon)) ? "<b>Salón:</b> $salon" : "";
  247. $grupo = (!empty($grupo)) ? $grupo : "";
  248. $retardo_desc ="<h5 class='text-success'>Asistencia</h5>";
  249. if($retardo){
  250. $retardo_desc = "<h5 class='text-warning'>Retardo</h5>";
  251. }
  252. echo "<tr class='list-result'>
  253. <td style='width:120px; vertical-align:top'><h4 class='mb-1 '>$grupo</h4></td>
  254. <td><h4 class='mb-1 '>$materia</h4><p><b>Hora:</b> $hora <br><span></span>$salon</p></td>
  255. <td class='text-center'>$retardo_desc</td>
  256. </tr>";
  257. }
  258. ?>
  259. <html>
  260. <head>
  261. <meta charset="UTF-8" />
  262. <meta name="viewport" content="width=device-width, initial-scale=1">
  263. <title>.: CHKDOR - Facultad de Ingeniería :.</title>
  264. <link rel="icon" type="image/png" href="imagenes/favicon.png" />
  265. <link rel="stylesheet" href="./css/bootstrap-ulsa.min.css">
  266. <link rel="stylesheet" href="./css/indivisa.css">
  267. <link rel="stylesheet" href="./css/lasalle.css">
  268. <link rel="stylesheet" href="./css/sgi.css">
  269. <link rel="stylesheet" href="./css/checador.css">
  270. <link rel="stylesheet" href="./css/fa_all.css">
  271. </head>
  272. <!--body oncontextmenu="return false" onselectstart="return false" ondragstart="return false"-->
  273. <body>
  274. <header class="py-4 px-4 text-secondary bg-white">
  275. <div class="d-flex">
  276. <div class="my-auto mr-auto"><img id="logo" src="./imagenes/logo_lasalle.png" alt="La Salle" class="img-fluid"/></div>
  277. <div class="my-auto hora pr-3 text-nowrap"><span id="hr">00</span>:<span id="min">00</span> h</div>
  278. <div class="my-auto ml-4 fecha text-center"><span id="fecha">00 Xxx</span><br><span id="ano">2000</span></div>
  279. </div>
  280. </header>
  281. <div class="bg-light text-center py-2"><p class="facultad m-0">Facultad de Ingeniería</p></div>
  282. <div class="container-fluid">
  283. <div class="h-100 fondo-img">
  284. <div class="d-flex justify-content-center h-75">
  285. <div class="bg-white align-self-center checa-box rounded-sm py-4 px-5" id="box">
  286. <!-- ---------- -->
  287. <?php
  288. if ($auth == false){ ?>
  289. <div class="logSize p-5 bg-white defaultShadow">
  290. <div class="row mb-4">
  291. <div class="col-sm-12"><h1 class="subtitle text-big mb-1">Iniciar sesión</h1></div>
  292. </div>
  293. <form method="post" action="index_action.php">
  294. <div class="row">
  295. <div class="col">
  296. <p class="text-center font-weight-bold text-info">Utiliza tu usuario y contraseña institucionales</p>
  297. </div>
  298. </div>
  299. <div class="form-group row">
  300. <div class="input-group px-4">
  301. <div class="input-group-prepend secondary">
  302. <div class="input-group-text bg-primary text-white"><i class="ing-usuario ing-fw"></i></div>
  303. </div>
  304. <input class="form-control form-control-lg" type="text" autocomplete="username" placeholder="Usuario (ad ó do)" id="username" name="username" value="" autofocus="true" maxlength="10"/>
  305. </div>
  306. </div>
  307. <div class="form-group row">
  308. <div class="input-group mb-2 px-4">
  309. <div class="input-group-prepend">
  310. <div class="input-group-text bg-primary text-white"><i class="ing-pass ing-fw"></i></div>
  311. </div>
  312. <input class="form-control form-control-lg" type="password" autocomplete="current-password" placeholder="Contraseña" id="passwd" name="passwd" value="" maxlength="50"/>
  313. </div>
  314. </div>
  315. <?php if(isset($errorDesc)){ ?>
  316. <p class="text-danger text-center font-weight-bold">¡ERROR! <?php echo $errorDesc;?></p>
  317. <?php } ?>
  318. <p class="text-center">
  319. <button type="submit" class="btn btn-lg btn-outline-primary btn-ing arrow">Ingresar</button>
  320. </p>
  321. </form>
  322. </div>
  323. <?php } else { //autenticado ?>
  324. <div id="registro" class="">
  325. <h1 class="subtitle"><?php echo $usr_nombre; ?></h1>
  326. <?php if(!empty($avisoArr) && count($avisoArr)>0){?>
  327. <div id="aviso-texto">
  328. <?php foreach($avisoArr as $aviso){
  329. echo "<div class='alert alert-warning' role='alert'>$aviso</div>";
  330. } ?>
  331. </div>
  332. <?php } ?>
  333. <form class="mt-4" id="formaChecador" autocomplete="off">
  334. <div class="row">
  335. <div class="col-12">
  336. <?php
  337. if(!empty($registradasArr) && count($registradasArr)>0){
  338. echo "<table class='table table-sm bg-info' >";
  339. foreach($registradasArr as $registrada){
  340. imprimeRegistroChecado($registrada["grupo"], $registrada["materia"], $registrada["hora_inicio"], $registrada["salon"], $registrada["retardo"]);
  341. }
  342. echo "</table>";
  343. //echo "<h2 class='text-center text-danger mt-4 d-none sin-horarios'>No hay horarios por registrar.</h2>";
  344. //echo "<h5 class='text-center text-danger mt-4 d-none sin-horarios'>Ya se han registrado todos los horarios activos.</h5>";
  345. }
  346. ?>
  347. <?php
  348. if(!empty($asistenciasArr) && $hasAsistencia){
  349. echo "<table class='table table-sm' >";
  350. foreach($asistenciasArr as $tipo=>$asist_rol){
  351. foreach($asist_rol as $rol=>$asist){
  352. foreach($asist as $mat){
  353. if($rol == 'profesor')
  354. imprimeRegistro($mat["Grupo_desc"].$mat["Carrera_prefijo"], $mat["Materia_desc"], substr($mat["Horario_hora"], 0, -3), $mat["Salon_desc"]);
  355. else
  356. imprimeRegistro(NULL, "HORARIO ADMINISTRATIVO", substr($mat["Horario_hora"], 0, -3), NULL);
  357. }
  358. }
  359. }
  360. echo "</table>";
  361. //echo "<h2 class='text-center text-danger mt-4 d-none sin-horarios'>No hay horarios por registrar.</h2>";
  362. //echo "<h5 class='text-center text-danger mt-4 d-none sin-horarios'>Ya se han registrado todos los horarios activos.</h5>";
  363. ?>
  364. <input type="hidden" name="id" id="id" value="<?php echo $usr_id; ?>">
  365. <input type="hidden" id="cve" value="<?php echo $usr_cve; ?>">
  366. <div class="row justify-content-center mt-4">
  367. <div class="col-sm-5">
  368. <button type="button" onclick="recargar()" class="btn btn-outline-secondary btn-lg btn-block font-weight-bold btnRecargar"><i class="ing-regresar ml-2 text-danger mr-2"></i> Recargar horarios</button>
  369. </div>
  370. <div class="col-sm-4">
  371. <button type="button" id="btnChecar" class="btn btn-outline-primary btn-lg btn-block font-weight-bold ">Checar <i class="icon icon-arrow font-weight-bold ml-2 text-danger"></i></button>
  372. </div>
  373. </div>
  374. <?php
  375. }else{
  376. echo "<h2 class='text-center text-danger mt-4'>No hay horarios por registrar</h2>";
  377. echo "<h5 class='text-center text-danger mt-4'>Las clases se pueden registrar desde 30 minutos antes del inicio y hasta 30 minutos después de iniciadas.</h5>";
  378. ?>
  379. <div class="row justify-content-center mt-5">
  380. <div class="col-sm-5">
  381. <button type="button" onclick="recargar()" class="btn btn-outline-secondary btn-lg btn-block font-weight-bold btnRecargar"><i class="ing-regresar ml-2 text-danger mr-2"></i> Recargar horarios</button>
  382. </div>
  383. </div>
  384. <?php
  385. }
  386. ?>
  387. </div>
  388. </div>
  389. </form>
  390. </div>
  391. <!-- ---------- -->
  392. <div id="result_ok" class="sub-bloque d-none">
  393. <div class="row">
  394. <div class="col-12 text-center" id="estado">
  395. <img src="imagenes/atiempo.png" alt="resultado" class="img-fluid d-none d-sm-block mx-auto">
  396. <h2 class="indivisa-title text-big">Asistencia</h2>
  397. </div>
  398. </div>
  399. <!--<div class="row justify-content-center mt-5">
  400. <div class="col-sm-4">
  401. <button type="button" onclick="recargar()" class="btn btn-outline-secondary btn-lg btn-block font-weight-bold btnRecargar"><i class="ing-regresar ml-2 text-danger mr-2"></i> Recargar</button>
  402. </div>
  403. </div>-->
  404. </div>
  405. <!-- ---------- -->
  406. <div id="result_no" class="sub-bloque row d-none">
  407. <div class="col-sm-8 my-auto">
  408. <h1 class="indivisa-title text-secondary text-big" id="nombre"><strong class="text-danger">No</strong> tiene horario asignado</h1>
  409. <p class="text-secondary sin-servicio">Verifique que la clave <span class="clave font-weight-bold">000</span> sea correcta.</p>
  410. </div>
  411. <div class="col-sm-4 text-center my-auto d-none d-sm-block">
  412. <img src="imagenes/sinregistro.png" alt="sin horario" class="img-fluid">
  413. </div>
  414. <div class="col-12">
  415. <div class="row justify-content-center mt-5">
  416. <div class="col-sm-4">
  417. <button type="button" onclick="recargar()" class="btn btn-outline-secondary btn-lg btn-block font-weight-bold btnRecargar"><i class="ing-regresar ml-2 text-danger mr-2"></i> Recargar</button>
  418. </div>
  419. </div>
  420. </div>
  421. </div>
  422. <!-- ---------- -->
  423. <!-- ---------- -->
  424. <div id="internet" class="sub-bloque row d-none">
  425. <div class="col-sm-7">
  426. <h3 class="indivisa-title subtitle mb-5 text-big">Sin servicio</h3>
  427. <p class="text-secondary sin-servicio">Por el momento la conexión a internet está fallando, por favor inténtelo más tarde.</p>
  428. <div class="text-center">
  429. <div class="spinner-grow text-primary" role="status">
  430. <span class="sr-only">Loading...</span>
  431. </div>
  432. <em>Conectando</em>
  433. </div>
  434. </div>
  435. <div class="col-sm-5 text-center d-none d-sm-block">
  436. <img src="imagenes/nored.png" alt="sin red" class="img-fluid">
  437. </div>
  438. </div>
  439. <!-- ---------- -->
  440. <p id="last-error" class="text-white">-</p>
  441. <?php } ?>
  442. </div>
  443. </div>
  444. </div>
  445. </div>
  446. <div id="mensaje" class="modal fade" data-backdrop="static" data-keyboard="false">
  447. <div class="modal-dialog modal-dialog-centered modal-lg">
  448. <div class="modal-content">
  449. <div class="modal-body text-center">
  450. <!--h1 class="modal-title"><i class="fas fa-check-circle fa-3x text-success"></i></h1 ASISTENCIA-->
  451. <!--h1 class="modal-title"><i class="fas fa-exclamation-triangle fa-3x text-warning"></i></h1 -->
  452. <h2 class="modal-title text-danger mb-4" id="mensaje_error"><i class="far fa-times-circle fa-lg"></i> <span></span></h2>
  453. <div id="aviso-texto"></div>
  454. <div id="resultado">
  455. <h2 class="modal-title text-primary mb-4" id="mensaje_ok"><span></span></h2>
  456. <table class="table border border-info" style="width:100%;">
  457. <tbody id="table-result">
  458. <tr class="materia-row font-weight-bold">
  459. <td class="mat-desc"></td>
  460. <td class="mat-fecha"></td>
  461. <td class="mat-salon"></td>
  462. <td class="mat-icon">
  463. <span class="retardo text-warning"><span class="fas fa-clock fa-lg"></span> Retardo</span>
  464. <span class="asistencia text-success"><span class=" fas fa-check fa-lg"></span> Asistencia</span>
  465. </td>
  466. </tr>
  467. </tbody>
  468. </table>
  469. </div>
  470. <h3 class="my-3" id="resultado"></h3>
  471. <!--<button type="button" id="dismissModal" class="btn btn-primary" data-dismiss="modal"><i class="fas fa-check mr-2"></i>OK</button>-->
  472. </div>
  473. </div>
  474. </div>
  475. </div>
  476. <script>
  477. var d, h, m, s, animate;
  478. var started_at = new Date().getTime();
  479. var server_time = <?php echo time(); ?>;
  480. var ultimosMax = 6;
  481. </script>
  482. <script src="./js/jquery.min.js"></script>
  483. <script src="./js/bootstrap/popper.min.js"></script>
  484. <script src="./js/bootstrap/bootstrap.min.js"></script>
  485. <script type="text/javascript" src="checador.js"></script>
  486. <script>
  487. $(document).ready(function(){
  488. init();
  489. });
  490. function recargar(){
  491. window.location.reload();
  492. $("#btnChecar").attr("disabled", true);
  493. $("#btnRecargar").attr("disabled", true);
  494. }
  495. </script>
  496. </body>
  497. </html>