-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
159 lines (120 loc) · 4.06 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<?php
include_once 'DB/Atajo.php';
include_once 'DB/AtajoDB.php';
$atajoDB = new AtajoDB();
$atajo = new Atajo();
$atajos = $atajoDB->listar();
// session_start();
// if (!(isset($_SESSION['usu']) && $_SESSION['usu'])) {
// header('Location: login.php');
// }
?>
<!DOCTYPE HTML>
<!--
Phantom by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title>Accesos a Registros Clínicos</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="assets/css/main.css" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
</head>
<body class="is-preload">
<!-- Wrapper -->
<div id="wrapper">
<!-- Header -->
<header id="header">
<div class="inner">
<!-- Logo -->
<a href="#" class="logo" title="Refrescar página web">
<span class="symbol"><img src="images/logo.png" alt="" style="object-fit: cover;" /></span>
<span class="title">Accesos a Registros Clínicos </span><span class="lugar"> Clínica Alemana Osorno</span>
</a>
</div>
</header>
<!-- Main -->
<div id="main">
<div class="inner">
<header>
<h2>Búsqueda de programas</h2>
<input class="" id="myInput" type="text" placeholder="Buscar...">
</header>
<section id="shortcuts">
<div class="button small fit" id="btnAll">Todo</div>
<div class="button small fit">Ficha</div>
<div class="button small fit">Examenes</div>
<div class="button small fit">Residencia Médica</div>
</section>
<section class="tiles" id="myDIV">
<?php foreach($atajos as $a): ?>
<article class="style6">
<span class="image">
<img src="images/<?= ($a->rutaImagen != '' ? $a->rutaImagen : 'logo.png') ?>" alt="" />
</span>
<a target="_blank" href="<?= $a->rutaAtajo?>">
<h2><?= $a->nombre?></h2>
<div class="content">
<p><?= $a->descripcion ?></p>
</div>
</a>
</article>
<?php endforeach; ?>
</section>
</div>
</div>
<!-- Footer -->
<?php include_once 'footer.php'?>
</div>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/browser.min.js"></script>
<script src="assets/js/breakpoints.min.js"></script>
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>
</body>
<script>
$(document).ready(function () {
var hayError = getParameterByName("error");
if(hayError == 1){
alert("El programa no está instalado en su ordenador");
}
$("#myInput").on("keyup focus", function () {
var value = $(this).val().toLowerCase();
$("article a").filter(function () {
$(this).parent().toggle($(this).text().toLowerCase().indexOf(value) > -1)
});
console.log(value);
});
$("#shortcuts > .button").on("click", function () {
var value = $(this).text().toLowerCase();
$("#myInput").val(value);
$("article a").filter(function () {
$(this).parent().toggle($(this).text().toLowerCase().indexOf(value) > -1)
});
});
$("#btnAll").on("click", function () {
$("#myInput").focus();
$("#myInput").val("");
var value = "";
$("article a").filter(function () {
$(this).parent().toggle($(this).text().toLowerCase().indexOf(value) > -1)
});
});
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
window.history.pushState("", "", '/Accesos/index.php');
});
</script>
</html>