123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- /*
- * Copyright (C) 2021 Echedey López Romero <elr@disroot.org>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- // Mostrar errores en pantalla
- ini_set('display_errors', '1');
- ini_set('display_startup_errors', '1');
- error_reporting(E_ALL);
- // Iniciar la reparación de salida con Tidy
- ini_set('tidy.clean_output', '1');
- // Cargar variables
- include './variables.php';
- // Cargar functiones
- include './functions.php';
- if (isset($_REQUEST['operacion'])) {
- $Operacion = $_REQUEST['operacion'];
- if ($Operacion == 'comprobar') {
- $Peticion = $_REQUEST;
- for ($Pos = 1; $Pos <= count($Preguntas); $Pos++) {
- if (isset($Peticion['respuesta_' . $Pos])) {
- $RespuestaGeneralPos = $Peticion['respuesta_' . $Pos];
- $Respuestas = $Preguntas[$Pos - 1]['opciones'];
- if (array_key_exists($RespuestaGeneralPos, $Respuestas)) {
- $RespuestasUsuario['respuesta_' . $Pos] = $RespuestaGeneralPos;
- } else {
- $RespuestasUsuario['respuesta_' . $Pos] = null;
- }
- } else {
- $RespuestasUsuario['respuesta_' . $Pos] = null;
- }
- }
- $Comprobar = true;
- }
- }
- include './vista.php';
|