agregada encuesta de satisfaccion y coreccion de ortografia
Browse files- app/contrasena.php +43 -5
- app/css/formulario.css +35 -0
- app/inc/footer.php +4 -4
- app/inc/nav.php +5 -5
- app/inc/welcome.php +3 -3
- app/index.php +3 -0
- app/js/contrasena.js +6 -6
- app/js/formulario.js +23 -0
app/contrasena.php
CHANGED
|
@@ -7,7 +7,7 @@
|
|
| 7 |
<p class="fs-1">👀🔒</p>
|
| 8 |
</header>
|
| 9 |
<article class="container-sm d-flex flex-column align-items-center">
|
| 10 |
-
<p class="fs-4 pt-serif-regular-italic">Pulsa el
|
| 11 |
<button id="generarContraseña" type="button" class="btn btn-success btn-lg">Generar contraseña
|
| 12 |
✍️</button>
|
| 13 |
<div class="input-group alert alert-success my-3 pb-0 ancho-password" role="alert">
|
|
@@ -18,18 +18,17 @@
|
|
| 18 |
|
| 19 |
<!-- Modal -->
|
| 20 |
<div class="modal fade" id="copiado" tabindex="-1" aria-labelledby="copiadoLabel" aria-hidden="true">
|
| 21 |
-
<div class="modal-dialog">
|
| 22 |
<div class="modal-content bg-black border-white">
|
| 23 |
<div class="modal-header">
|
| 24 |
-
<h1 class="modal-title fs-5" id="copiadoLabel"
|
| 25 |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
| 26 |
</div>
|
| 27 |
<div class="modal-body">
|
| 28 |
Su contraseña ha sido copiada al portapapeles
|
| 29 |
</div>
|
| 30 |
<div class="modal-footer">
|
| 31 |
-
<button type="button" class="btn btn-
|
| 32 |
-
<button type="button" class="btn btn-primary">Save changes</button>
|
| 33 |
</div>
|
| 34 |
</div>
|
| 35 |
</div>
|
|
@@ -37,8 +36,47 @@
|
|
| 37 |
|
| 38 |
<button id="downloadBtn" type="button" class="btn btn-warning btn-lg" disabled>Guardar en
|
| 39 |
dispositivo 💾</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
</article>
|
| 41 |
</section>
|
| 42 |
<script src="/js/contrasena.js?i=12"></script>
|
|
|
|
| 43 |
|
| 44 |
<?php include_once "./inc/footer.php" ?>
|
|
|
|
| 7 |
<p class="fs-1">👀🔒</p>
|
| 8 |
</header>
|
| 9 |
<article class="container-sm d-flex flex-column align-items-center">
|
| 10 |
+
<p class="fs-4 pt-serif-regular-italic">Pulsa el botón verde</p>
|
| 11 |
<button id="generarContraseña" type="button" class="btn btn-success btn-lg">Generar contraseña
|
| 12 |
✍️</button>
|
| 13 |
<div class="input-group alert alert-success my-3 pb-0 ancho-password" role="alert">
|
|
|
|
| 18 |
|
| 19 |
<!-- Modal -->
|
| 20 |
<div class="modal fade" id="copiado" tabindex="-1" aria-labelledby="copiadoLabel" aria-hidden="true">
|
| 21 |
+
<div class="modal-dialog modal-dialog-centered">
|
| 22 |
<div class="modal-content bg-black border-white">
|
| 23 |
<div class="modal-header">
|
| 24 |
+
<h1 class="modal-title fs-5" id="copiadoLabel">Éxito</h1>
|
| 25 |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
| 26 |
</div>
|
| 27 |
<div class="modal-body">
|
| 28 |
Su contraseña ha sido copiada al portapapeles
|
| 29 |
</div>
|
| 30 |
<div class="modal-footer">
|
| 31 |
+
<button type="button" class="btn btn-primary">Ok</button>
|
|
|
|
| 32 |
</div>
|
| 33 |
</div>
|
| 34 |
</div>
|
|
|
|
| 36 |
|
| 37 |
<button id="downloadBtn" type="button" class="btn btn-warning btn-lg" disabled>Guardar en
|
| 38 |
dispositivo 💾</button>
|
| 39 |
+
|
| 40 |
+
<link rel="stylesheet" href="./app/css/formulario.css">
|
| 41 |
+
<!-- Modal -->
|
| 42 |
+
<div class="modal fade" id="form" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
|
| 43 |
+
aria-labelledby="formLabel" aria-hidden="true">
|
| 44 |
+
<div class="modal-dialog modal-dialog-centered">
|
| 45 |
+
<div class="modal-content bg-black border-white">
|
| 46 |
+
<div class="modal-header">
|
| 47 |
+
<h1 class="text-center fs-5" id="formLabel">Encuesta de satisfacción</h1>
|
| 48 |
+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
| 49 |
+
</div>
|
| 50 |
+
<div class="modal-body">
|
| 51 |
+
<form id="formulario-satisfaccion" class="container-fluid" action="/" method="post">
|
| 52 |
+
<div>
|
| 53 |
+
<p class="m-0 p-0 ">¿Qué tan satisfecho te sientes con el servicio?</p>
|
| 54 |
+
<p class="clasificacion">
|
| 55 |
+
<input id="radio1" type="radio" name="estrellas" value="5">
|
| 56 |
+
<label for="radio1">★</label>
|
| 57 |
+
<input id="radio2" type="radio" name="estrellas" value="4"><label
|
| 58 |
+
for="radio2">★</label>
|
| 59 |
+
<input id="radio3" type="radio" name="estrellas" value="3">
|
| 60 |
+
<label for="radio3">★</label>
|
| 61 |
+
<input id="radio4" type="radio" name="estrellas" value="2">
|
| 62 |
+
<label for="radio4">★</label>
|
| 63 |
+
<input id="radio5" type="radio" name="estrellas" value="1" checked>
|
| 64 |
+
<label for="radio5">★</label>
|
| 65 |
+
</p>
|
| 66 |
+
</div>
|
| 67 |
+
</form>
|
| 68 |
+
</div>
|
| 69 |
+
<div class="modal-footer">
|
| 70 |
+
<button id="no-opinion" type="button" class="btn btn-secondary" data-bs-dismiss="modal">Sin
|
| 71 |
+
opinion</button>
|
| 72 |
+
<button id="enviar-form" class="btn btn-primary">Enviar</button>
|
| 73 |
+
</div>
|
| 74 |
+
</div>
|
| 75 |
+
</div>
|
| 76 |
+
</div>
|
| 77 |
</article>
|
| 78 |
</section>
|
| 79 |
<script src="/js/contrasena.js?i=12"></script>
|
| 80 |
+
<script src="/js/formulario.js?i=12"></script>
|
| 81 |
|
| 82 |
<?php include_once "./inc/footer.php" ?>
|
app/css/formulario.css
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
form {
|
| 2 |
+
width: 250px;
|
| 3 |
+
margin: 0 auto;
|
| 4 |
+
height: 50px;
|
| 5 |
+
}
|
| 6 |
+
|
| 7 |
+
form p {
|
| 8 |
+
text-align: center;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
form label {
|
| 12 |
+
font-size: 20px;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
input[type="radio"] {
|
| 16 |
+
display: none;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
label {
|
| 20 |
+
color: grey;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
.clasificacion {
|
| 24 |
+
direction: rtl;
|
| 25 |
+
unicode-bidi: bidi-override;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
label:hover,
|
| 29 |
+
label:hover~label {
|
| 30 |
+
color: orange;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
input[type="radio"]:checked~label {
|
| 34 |
+
color: orange;
|
| 35 |
+
}
|
app/inc/footer.php
CHANGED
|
@@ -3,13 +3,13 @@
|
|
| 3 |
<footer class="container-lg card text-center bg-black text-white">
|
| 4 |
<hr>
|
| 5 |
<div class="card-header fw-bold">
|
| 6 |
-
Instituto
|
| 7 |
</div>
|
| 8 |
<hr>
|
| 9 |
<div class="card-body">
|
| 10 |
-
<h5 class="card-title">
|
| 11 |
-
<p class="card-text">Todos los derechos reservados para el ITSZ
|
| 12 |
-
<a href="https://zongolica.tecnm.mx/" target="_blank" class="btn btn-primary">
|
| 13 |
</div>
|
| 14 |
<hr>
|
| 15 |
<div class="card-footer fw-bold">
|
|
|
|
| 3 |
<footer class="container-lg card text-center bg-black text-white">
|
| 4 |
<hr>
|
| 5 |
<div class="card-header fw-bold">
|
| 6 |
+
Instituto Tecnológico Superior de Zongolica
|
| 7 |
</div>
|
| 8 |
<hr>
|
| 9 |
<div class="card-body">
|
| 10 |
+
<h5 class="card-title">Generador de contraseñas</h5>
|
| 11 |
+
<p class="card-text">Todos los derechos reservados para el ITSZ extensión Tezonapa</p>
|
| 12 |
+
<a href="https://zongolica.tecnm.mx/" target="_blank" class="btn btn-primary">Página del Tecnológico</a>
|
| 13 |
</div>
|
| 14 |
<hr>
|
| 15 |
<div class="card-footer fw-bold">
|
app/inc/nav.php
CHANGED
|
@@ -1,16 +1,16 @@
|
|
| 1 |
<nav class="container-lg navbar-expand-lg navbar bg-dark border-bottom border-body" data-bs-theme="dark">
|
| 2 |
<div class="container-fluid">
|
| 3 |
-
<a class="navbar-brand" href="/">ITSZ</a>
|
| 4 |
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
| 5 |
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
| 6 |
<span class="navbar-toggler-icon"></span>
|
| 7 |
</button>
|
| 8 |
-
<div class="collapse navbar-collapse" id="navbarNav">
|
| 9 |
-
<ul class="navbar-nav">
|
| 10 |
-
<li class="nav-item">
|
| 11 |
<a class="nav-link active" aria-current="page" href="/">INICIO</a>
|
| 12 |
</li>
|
| 13 |
-
<li class="nav-item">
|
| 14 |
<a class="nav-link" href="/contrasena.php">GENERAR CONTRASEÑA</a>
|
| 15 |
</li>
|
| 16 |
</ul>
|
|
|
|
| 1 |
<nav class="container-lg navbar-expand-lg navbar bg-dark border-bottom border-body" data-bs-theme="dark">
|
| 2 |
<div class="container-fluid">
|
| 3 |
+
<a class="navbar-brand fs-1 pt-serif-bold p-2" style="letter-spacing: 3px;" href="/">ITSZ</a>
|
| 4 |
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
| 5 |
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
| 6 |
<span class="navbar-toggler-icon"></span>
|
| 7 |
</button>
|
| 8 |
+
<div class="collapse navbar-collapse fs-5" style="letter-spacing: 2px;" id="navbarNav">
|
| 9 |
+
<ul class="navbar-nav gap-3">
|
| 10 |
+
<li class="nav-item border">
|
| 11 |
<a class="nav-link active" aria-current="page" href="/">INICIO</a>
|
| 12 |
</li>
|
| 13 |
+
<li class="nav-item border">
|
| 14 |
<a class="nav-link" href="/contrasena.php">GENERAR CONTRASEÑA</a>
|
| 15 |
</li>
|
| 16 |
</ul>
|
app/inc/welcome.php
CHANGED
|
@@ -2,9 +2,9 @@
|
|
| 2 |
<section class="container-fluid d-flex justify-content-center">
|
| 3 |
<p class="text-center pt-serif-bold m-0" style="max-width: 350px;letter-spacing: normal;">
|
| 4 |
Hola alumno del ITSZ <br>
|
| 5 |
-
de la
|
| 6 |
-
<span class="fs-1">👋</span><br
|
| 7 |
-
<i style="letter-spacing: 3px;">"Esta es una
|
| 8 |
estudiantil de la escuela"</i>
|
| 9 |
</p>
|
| 10 |
</section>
|
|
|
|
| 2 |
<section class="container-fluid d-flex justify-content-center">
|
| 3 |
<p class="text-center pt-serif-bold m-0" style="max-width: 350px;letter-spacing: normal;">
|
| 4 |
Hola alumno del ITSZ <br>
|
| 5 |
+
de la extensión de Tezonapa <br>
|
| 6 |
+
<span class="fs-1">👋</span><br>
|
| 7 |
+
<i style="letter-spacing: 3px;">"Esta es una página para generar contraseñas destinada al personal educativo y
|
| 8 |
estudiantil de la escuela"</i>
|
| 9 |
</p>
|
| 10 |
</section>
|
app/index.php
CHANGED
|
@@ -2,6 +2,9 @@
|
|
| 2 |
<?php include_once "./inc/welcome.php" ?>
|
| 3 |
|
| 4 |
<section class="container-sm">
|
|
|
|
|
|
|
|
|
|
| 5 |
<iframe
|
| 6 |
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d4497.20846191439!2d-96.69804321280105!3d18.588168447314914!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x85c466d3cdf128d7%3A0xae1a2e7e88ee9fe4!2sInstituto%20Tecnol%C3%B3gico%20Superior%20de%20Zongolica%20Extensi%C3%B3n%20Tezonapa!5e0!3m2!1ses!2smx!4v1727721554751!5m2!1ses!2smx"
|
| 7 |
class="tamano-mapa p-0 m-0" allowfullscreen="" loading="lazy"
|
|
|
|
| 2 |
<?php include_once "./inc/welcome.php" ?>
|
| 3 |
|
| 4 |
<section class="container-sm">
|
| 5 |
+
<header>
|
| 6 |
+
<h2>Mapa del Tecnologico Tezonapa</h2>
|
| 7 |
+
</header>
|
| 8 |
<iframe
|
| 9 |
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d4497.20846191439!2d-96.69804321280105!3d18.588168447314914!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x85c466d3cdf128d7%3A0xae1a2e7e88ee9fe4!2sInstituto%20Tecnol%C3%B3gico%20Superior%20de%20Zongolica%20Extensi%C3%B3n%20Tezonapa!5e0!3m2!1ses!2smx!4v1727721554751!5m2!1ses!2smx"
|
| 10 |
class="tamano-mapa p-0 m-0" allowfullscreen="" loading="lazy"
|
app/js/contrasena.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
| 1 |
let contrasnaUsuario = "";
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
document
|
| 4 |
.getElementById("generarContraseña")
|
| 5 |
.addEventListener("click", getPassword);
|
|
@@ -44,10 +48,8 @@ function autoCreate(plength) {
|
|
| 44 |
function downloadPassword() {
|
| 45 |
let fecha = getTimeNow();
|
| 46 |
|
| 47 |
-
// El contenido del archivo
|
| 48 |
const contenido = `Creado a: ${fecha}\nContraseña: ${contrasnaUsuario}`;
|
| 49 |
|
| 50 |
-
// Crear un blob con el contenido
|
| 51 |
const archivo = new Blob([contenido], { type: "text/plain" });
|
| 52 |
|
| 53 |
// Crear un enlace temporal para la descarga
|
|
@@ -55,18 +57,16 @@ function downloadPassword() {
|
|
| 55 |
enlace.href = URL.createObjectURL(archivo);
|
| 56 |
enlace.download = "password.txt";
|
| 57 |
|
| 58 |
-
// Simular un clic para iniciar la descarga
|
| 59 |
enlace.click();
|
| 60 |
|
| 61 |
-
// Liberar la URL del objeto
|
| 62 |
URL.revokeObjectURL(enlace.href);
|
|
|
|
|
|
|
| 63 |
}
|
| 64 |
|
| 65 |
function copiarPorta() {
|
| 66 |
-
// Obtener el texto del párrafo
|
| 67 |
const texto = document.getElementById("showPassword").innerText;
|
| 68 |
|
| 69 |
-
// Usar la API de portapapeles para copiar el texto
|
| 70 |
navigator.clipboard
|
| 71 |
.writeText(texto)
|
| 72 |
.then(function () {})
|
|
|
|
| 1 |
let contrasnaUsuario = "";
|
| 2 |
|
| 3 |
+
const buttonDonwland = new CustomEvent("button-donwland", {
|
| 4 |
+
detail: { message: "Evento boton de descarga" },
|
| 5 |
+
});
|
| 6 |
+
|
| 7 |
document
|
| 8 |
.getElementById("generarContraseña")
|
| 9 |
.addEventListener("click", getPassword);
|
|
|
|
| 48 |
function downloadPassword() {
|
| 49 |
let fecha = getTimeNow();
|
| 50 |
|
|
|
|
| 51 |
const contenido = `Creado a: ${fecha}\nContraseña: ${contrasnaUsuario}`;
|
| 52 |
|
|
|
|
| 53 |
const archivo = new Blob([contenido], { type: "text/plain" });
|
| 54 |
|
| 55 |
// Crear un enlace temporal para la descarga
|
|
|
|
| 57 |
enlace.href = URL.createObjectURL(archivo);
|
| 58 |
enlace.download = "password.txt";
|
| 59 |
|
|
|
|
| 60 |
enlace.click();
|
| 61 |
|
|
|
|
| 62 |
URL.revokeObjectURL(enlace.href);
|
| 63 |
+
|
| 64 |
+
document.getElementById("downloadBtn").dispatchEvent(buttonDonwland);
|
| 65 |
}
|
| 66 |
|
| 67 |
function copiarPorta() {
|
|
|
|
| 68 |
const texto = document.getElementById("showPassword").innerText;
|
| 69 |
|
|
|
|
| 70 |
navigator.clipboard
|
| 71 |
.writeText(texto)
|
| 72 |
.then(function () {})
|
app/js/formulario.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document
|
| 2 |
+
.getElementById("downloadBtn")
|
| 3 |
+
.addEventListener("button-donwland", showModalForm);
|
| 4 |
+
|
| 5 |
+
document
|
| 6 |
+
.getElementById("enviar-form")
|
| 7 |
+
.addEventListener("click", enviarFormulario);
|
| 8 |
+
|
| 9 |
+
document.getElementById("no-opinion").addEventListener("click", noOpinion);
|
| 10 |
+
|
| 11 |
+
function enviarFormulario() {
|
| 12 |
+
console.log("Aaaaaaaaaaaaa");
|
| 13 |
+
document.getElementById("formulario-satisfaccion").submit();
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
function noOpinion() {
|
| 17 |
+
window.location.replace("/");
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
function showModalForm() {
|
| 21 |
+
const form = new bootstrap.Modal(document.getElementById("form"));
|
| 22 |
+
form.show();
|
| 23 |
+
}
|