J. admin.html

1<!DOCTYPE html>
2<html lang="es">
3
4<head>
5
6 <meta charset="UTF-8">
7 <meta name="viewport" content="width=device-width">
8
9 <title>Solo Administradores</title>
10
11 <script type="module" src="lib/js/consumeJson.js"></script>
12 <script type="module" src="lib/js/muestraError.js"></script>
13 <script type="module" src="./js/ROL_ID_ADMINISTRADOR.js"></script>
14 <script type="module" src="./js/protege.js"></script>
15 <script type="module" src="./js/custom/mi-nav.js"></script>
16
17</head>
18
19<body
20 onload="protege('srv/sesion-actual.php', [ROL_ID_ADMINISTRADOR], 'index.html')
21 .then(sesion => {
22 nav.sesion = sesion
23 main.hidden = false
24 })
25 .catch(muestraError)">
26
27 <mi-nav id="nav"></mi-nav>
28
29 <main id="main" hidden>
30
31 <h1>Solo Administradores</h1>
32
33 <p>Hola.</p>
34
35 <p>
36 <button type="button" onclick="consumeJson('srv/saludo-cliente.php')
37 .then(saludo => alert(saludo.body))
38 .catch(muestraError)">
39 Ejecuta servicio
40 </button>
41 </p>
42
43 </main>
44
45</body>
46
47</html>
skip_previous skip_next