From 805dffd5ba15a65ff3d67fb86ac04cdf443293d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fernando=20M=C3=A9ndez?=
<45081533+FerMdez@users.noreply.github.com>
Date: Mon, 10 May 2021 22:22:32 +0200
Subject: [PATCH] Add files via upload
---
assets/css/highContrast.css | 607 ++++++++++++++++++++++
assets/css/main.css | 10 +
assets/js/cambiarCSS.js | 5 +
assets/php/aplication.php | 16 +-
assets/php/config.php | 5 +
assets/php/template.php | 20 +-
panel_user/includes/formChangeName.php | 2 +-
panel_user/includes/formDeleteAccount.php | 3 +
8 files changed, 663 insertions(+), 5 deletions(-)
create mode 100644 assets/css/highContrast.css
create mode 100644 assets/js/cambiarCSS.js
create mode 100644 panel_user/includes/formDeleteAccount.php
diff --git a/assets/css/highContrast.css b/assets/css/highContrast.css
new file mode 100644
index 0000000..c87da73
--- /dev/null
+++ b/assets/css/highContrast.css
@@ -0,0 +1,607 @@
+/* Basic */
+* {
+ box-sizing: border-box;
+ margin: 0px;
+ }
+
+ /* Headers */
+ h1, h2, h3, h4 {
+ color: #363636;
+ text-transform: uppercase;
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ vertical-align: baseline;
+ text-align: center;
+ }
+
+ h2 {
+ font-size: 95%;
+ }
+
+ h3 {
+ font-size: 85%;
+ }
+
+ h4 {
+ font-size: 75%;
+ }
+
+ /* Buttons */
+ button, .button.large {
+ display: inline-block;
+ margin: 10px;
+ width: 150px;
+ height: 30px;
+ padding: 5px 10px;
+ background-color :#1f2c3d;
+ border: 1px solid #dadada;
+ text-align: center;
+ color :#dadada;
+ font-weight: bold;
+ position: relative;
+ }
+ .button.large {
+ width: 95%;
+ }
+ button:hover, .button:hover {
+ cursor: pointer;
+ background-color:#dadada;
+ color:#1f2c3d;
+ border-color: #1f2c3d;
+ }
+
+ /* Header */
+ .header {
+ background-color: #1f2c3d;
+ color: #dadada;
+ padding: 15px;
+ text-align: left;
+ font-size: 18px;
+ }
+ .header img {
+ width: 13px;
+ }
+ /* Header Menu */
+ .menu {
+ margin-top: 10px;
+ text-align: right;
+ font-size: 15px;
+ }
+ .menu nav a{
+ text-decoration: none;
+ color: inherit;
+ font-size: 15px;
+ }
+ .menu nav li{
+ display: inline-block;
+ width: 150px;
+ height: 30px;
+ padding: 5px 10px;
+ background-color :#1f2c3d;
+ border: 1px solid #dadada;
+ text-align: center;
+ color :#dadada;
+ position: relative;
+ }
+ .menu nav li:hover{
+ background-color:#dadada;
+ color:#1f2c3d;
+ border-color: #1f2c3d;
+ }
+ .menu nav li>ul{
+ display: none;
+ }
+ .menu nav li:hover>ul{
+ display: block;
+ position: absolute;
+ top: 29px;
+ right: -1px;
+ }
+ /* Sub Header */
+ .header.sub {
+ margin-bottom: 20px;
+ padding: 5px;
+ display: flex;
+ flex-direction: row;
+ text-align: center;
+ justify-content: center;
+ font-size: 20px;
+ }
+ .header.sub .menu {
+ margin-top: 0px;
+ text-align: center;
+ font-size: 15px;
+ }
+ /* Responsive layout */
+ @media (max-width: 850px) {
+ .header.sub .menu nav li:hover>ul{
+ display: block;
+ position: relative;
+ top: 5px;
+ left: -51px;
+ }
+ }
+
+
+ /* Paragraphs */
+ p {
+ padding: 0;
+ border: 0;
+ }
+
+ a {
+ color: #dadada;
+ text-decoration: none;
+ }
+ a:hover{
+ color:rgb(138, 150, 32);
+ }
+
+ /* Body */
+ body {
+ font-family: Arial, Helvetica, sans-serif;
+ background-color: #00020f;
+ color: #000000
+ }
+
+ /* Table */
+ table {
+ border-collapse: collapse;
+ border-spacing: 0;
+ margin: 0 0 2em 0;
+ width: 100%;
+ text-align: left;
+ font-size: 15px;
+ }
+ table a{
+ color: #1f2c3d;
+ }
+ table tbody tr {
+ border: solid 1px #1f2c3d;
+ border-left: 0;
+ border-right: 0;
+ }
+ table tbody tr:nth-child(2n + 1) {
+ background-color: rgba(144, 144, 144, 0.25);
+ }
+ table td {
+ padding: 0.75em 0.75em;
+ }
+ table th {
+ color: #1f2c3d;
+ font-size: 0.9em;
+ font-weight: 600;
+ padding: 0 0.85em 0.85em 0.85em;
+ }
+ table thead, table tfoot {
+ border-bottom: solid 2px #1f2c3d;
+ }
+ table.alt {
+ border-collapse: separate;
+ }
+ table.alt tbody tr td {
+ border: solid 1px #1f2c3d;
+ border-left-width: 0;
+ border-top-width: 0;
+ }
+
+ table.alt tbody tr td:first-child {
+ border-left-width: 1px;
+ }
+
+ table.alt tbody tr:first-child td {
+ border-top-width: 1px;
+ }
+
+ table.alt thead, table.alt tfoot {
+ border-top: 0;
+ }
+
+
+ /* Main */
+ main {
+ padding: 30px;
+ text-align: center;
+ font-size: 35px;
+ }
+ main h1, h2, h3, h4 {
+ color: #dadada;
+ }
+ main img {
+ width: 40%;
+ }
+
+ /* Create three unequal columns that floats next to each other */
+ .column {
+ float: left;
+ padding: 10px;
+ }
+
+ /* Left and right column */
+ .column.side {
+ width: 33.33%;
+ }
+
+ /* Middle column */
+ .column.middle {
+ width: 33.33%;
+ }
+
+ .column.middle .image img, .column.side .image img{
+ border-radius: 4px;
+ border: 0;
+ position: relative;
+ border-radius: 4px;
+ display: block;
+ margin: 0 0 3rem 0;
+ width: 100%;
+ }
+
+ /* Left column */
+ .column.left {
+ width: 50%;
+ }
+
+ /* Right column */
+ .column.right {
+ float: right;
+ width: 50%;
+ }
+
+ /* Clear floats after the columns */
+ .row:after {
+ content: "";
+ display: table;
+ clear: both;
+ }
+
+ /* Responsive layout: makes the three columns stack on top of each other instead of next to each other */
+ @media (max-width: 1000px) {
+ .column.side, .column.middle, .column.left, .column.right{
+ width: 100%;
+ }
+ }
+
+ /* Zoom */
+ .zoom {
+ transition: transform .2s;
+ }
+ .zoom:hover {
+ transform: scale(1.05);
+ }
+
+ /* Code & Blockquote */
+ .code {
+ background: #1f2c3d;
+ border-radius: 3px;
+ font-size: 0.9em;
+ margin: 10px;
+ display: block;
+ line-height: 1.75em;
+ padding: 1em 1.5em;
+ overflow-x: auto;
+ overflow-y: auto;
+ }
+ .code h1, .code h2{
+ color: #dadada;
+ }
+ .code h3, .code h4 {
+ color: #00020f;
+ }
+ .code p {
+ color: #dadada;
+ }
+ .code a {
+ text-decoration: underline;
+ }
+ .code ul, .code ol {
+ color: #dadada;
+ }
+ .code img{
+ /* width: 80px; height: 80px; */
+ width: 25%;
+ }
+ .code fieldset{
+ margin: 1px;
+ border-color: #dadada;
+ border-style: groove;
+ }
+ .code fieldset legend {
+ text-transform: uppercase;
+ font-weight: bold;
+ font-size: 90%;
+ color: #00020f;
+ }
+ .code.details{
+ height: 750px;
+ }
+ .code.plan {
+ height: 1150px;
+ }
+ .code.info{
+ text-align: center;
+ height: 250px;
+ }
+ .code.showtimes{
+ height: 600px;
+ }
+
+
+ /* BlockQuotes */
+ .blockquote {
+ border-left: solid 4px #dadada;
+ margin: 0 0 2em 0;
+ margin-top: 10px;
+ padding: 0.5em 0 0.5em 2em;
+ }
+ .blockquote.bio {
+ height: 250px;
+ }
+
+ /* Sketches */
+ .sketches {
+ text-align: center;
+ display: block;
+ line-height: 1.25em;
+ padding: 1em 1em;
+ overflow-x: auto;
+ background: #1f2c3d;
+ border-radius: 3px;
+ height: 680px;
+ }
+ .sketches h1, .sketches h2, .sketches h3, .sketches h4, .sketches p {
+ color: #dadada;
+ }
+ .sketches img {
+ width: 550px;
+ height: 550px;
+ }
+ .sketches .description {
+ color: #00020f;
+ }
+ /* Responsive layout */
+ @media (max-width: 1500px) {
+ .column.side .sketches, .column.middle .sketches {
+ width: 100%;
+ height: 500px;
+ }
+ .column.side .sketches img, .column.middle .sketches img {
+ width: 100%;
+ height: 75%;
+ }
+ }
+ @media (max-width: 1150px) {
+ .sketches img {
+ width: 100%;
+ height: 75%;
+ }
+ }
+
+ /* Text Box */
+ .textbox {
+ color: #00020f;
+ padding: 15px 15px 10px 15px;
+ margin: 10px 0 10px;
+ overflow: hidden;
+ border-radius: 25px 0px 25px 0px;
+ border: 2px solid #00020f;
+ }
+ .textbox h1, .textbox h2, .textbox h3 {
+ color: #00020f;
+ text-align: left;
+ }
+
+ /* Galery */
+ .galery {
+ box-sizing: border-box;
+ }
+ .galery .columna {
+ margin-top: 10px;
+ float: left;
+ width: 50%;
+ padding-right: 10px;
+ }
+ .galery .fila::after {
+ content: "";
+ clear: both;
+ display: table;
+ }
+ .galery .image img {
+ width: 100%;
+ }
+ .galery .image.main img {
+ width: 100%;
+ }
+
+
+ /* Percentage bar */
+ .bar {
+ height: 15px;
+ line-height: 15px;
+ font-size: 13px;
+ font-weight: bold;
+ width: 100%;
+ color: #dadada;
+ background-color: #00020f;
+ text-align: right;
+ }
+ .bar.seventyfive {
+ width: 75%;
+ }
+ .bar.fifty {
+ width: 50%;
+ }
+ .bar.twentyfive {
+ width: 25%;
+ }
+
+ /* Timeline Image */
+ .timeline h2 {
+ padding-top: 50px;
+ }
+ .timeline img{
+ width: 100%;
+ text-align: center;
+ padding-bottom: 50px;
+ padding-left: 15px;
+ padding-right: 15px;
+ }
+
+ /* Sidebars */
+ .sidebar.left {
+ padding: 5px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ float: left;
+ width: 300px;
+ height: 370PX;
+ color: #00020f;
+ background-color: #1f2c3d;
+ }
+ .sidebar.left a {
+ color: #00020f;
+ font-weight: bold;
+ text-decoration: none;
+ }
+ .sidebar.left a:hover {
+ color: #00020f;
+ text-decoration: underline;
+ }
+ /* Responsibe sidebar */
+ @media (max-width: 1000px) {
+ .sidebar.left {
+ width: 100%;
+ height: 100%;
+ }
+ }
+
+
+ /* Form */
+ form {
+ margin: auto;
+ width: 65%;
+ }
+
+ form h1, h2, h3, h4 {
+ color: #dadada;
+ }
+
+ label {
+ text-align: center;
+ font-weight: bold;
+ }
+
+ input, textarea {
+ width: 100%;
+ height: 27px;
+ border: 1px solid #000000;
+ padding: 10px;
+ margin-top: 5px;
+ font-size: 15px;
+ }
+
+ textarea {
+ width: 100%;
+ height: 150px;
+ }
+
+ legend {
+ color: #dadada;
+ }
+
+ #radio, #checkbox {
+ width: auto;
+ height: 15px;
+ cursor: pointer;
+ }
+
+ .verify {
+ font-size: 11px;
+ }
+ .verify a {
+ color: #1f2c3d;
+ }
+ .verify a:hover {
+ color: rgb(138, 150, 32);
+ }
+
+ #submit {
+ width: 100%;
+ height: 35px;
+ border: 1px solid #dadada;
+ padding: 5px;
+ margin-top: 5px;
+ font-size: 15px;
+ font-weight: bold;
+ box-shadow: 2px 2px #1f2c3d;
+ filter: brightness(105%);
+ cursor: pointer;
+ }
+ #submit:hover {
+ background-color: #1f2c3d;
+ }
+
+ #reset {
+ width: 100%;
+ height: 30px;
+ border: 1px solid #dadada;
+ background-color: #dadada;
+ color: #00020f;
+ padding: 5px;
+ margin-top: 5px;
+ font-size: 12px;
+ font-weight: bold;
+ box-shadow: 2px 2px #1f2c3d;
+ cursor: pointer;
+ }
+ #reset:hover {
+ border:#000000;
+ background-color: #791515;
+ }
+ .file{
+ margin-top: 10px;
+ }
+ .file input{
+ height: 110%;
+ }
+
+ /* Preformatted Text */
+ pre {
+ font-weight: bold;
+ }
+
+ fieldset pre {
+ color: red;
+ }
+
+ /* Footer */
+ footer {
+ text-align: left;
+ background-color: #1f2c3d;
+ color: #dadada;
+ padding: 20px;
+ margin-top: 100px;
+ width: 100%;
+ height: 80px;
+ }
+ .footer {
+ text-align: right;
+ }
+ footer button {
+ display: inline-block;
+ margin: 1px;
+ width: 115px;
+ height: 25px;
+ padding: 0px 0px;
+ text-align: center;
+ font-weight: bold;
+ position: relative;
+ }
+ @media (max-width: 500px) {
+ footer {
+ width: 100%;
+ height: 100%;
+ }
+ }
\ No newline at end of file
diff --git a/assets/css/main.css b/assets/css/main.css
index 69cd243..a634bd7 100644
--- a/assets/css/main.css
+++ b/assets/css/main.css
@@ -585,6 +585,16 @@ footer {
.footer {
text-align: right;
}
+footer button {
+ display: inline-block;
+ margin: 1px;
+ width: 115px;
+ height: 25px;
+ padding: 0px 0px;
+ text-align: center;
+ font-weight: bold;
+ position: relative;
+}
@media (max-width: 500px) {
footer {
width: 100%;
diff --git a/assets/js/cambiarCSS.js b/assets/js/cambiarCSS.js
new file mode 100644
index 0000000..caab91e
--- /dev/null
+++ b/assets/js/cambiarCSS.js
@@ -0,0 +1,5 @@
+function cambiarCSS(nuevo){
+ //let css = true;
+ //window.location.href = window.location.href + "?css=" + css;
+ document.getElementById('estilo').setAttribute('href', nuevo);
+}
\ No newline at end of file
diff --git a/assets/php/aplication.php b/assets/php/aplication.php
index 017b0b5..63b7697 100644
--- a/assets/php/aplication.php
+++ b/assets/php/aplication.php
@@ -71,10 +71,24 @@ class Aplicacion {
public function init($bdDatosConexion) {
if ( ! $this->inicializada ) {
$this->bdDatosConexion = $bdDatosConexion;
- //session_start();
+ if ( $this->is_session_started() === FALSE ) session_start();
$this->inicializada = true;
}
}
+
+ /**
+ * Inicia la sesión, si esta no se había iniciado.
+ */
+ protected function is_session_started(){
+ if ( php_sapi_name() !== 'cli' ) {
+ if ( version_compare(phpversion(), '5.4.0', '>=') ) {
+ return session_status() === PHP_SESSION_ACTIVE ? TRUE : FALSE;
+ } else {
+ return session_id() === '' ? FALSE : TRUE;
+ }
+ }
+ return FALSE;
+ }
/**
* Cierre de la aplicación.
diff --git a/assets/php/config.php b/assets/php/config.php
index 2d8ef8e..894cc59 100644
--- a/assets/php/config.php
+++ b/assets/php/config.php
@@ -44,4 +44,9 @@
* @see http://php.net/manual/en/language.types.callable.php
*/
register_shutdown_function(array($app, 'shutdown'));
+
+ //Depuración (BORRAR):
+ ini_set('display_errors', 1);
+ ini_set('display_startup_errors', 1);
+ error_reporting(E_ALL);
?>
diff --git a/assets/php/template.php b/assets/php/template.php
index 5e1761b..736e447 100644
--- a/assets/php/template.php
+++ b/assets/php/template.php
@@ -456,17 +456,31 @@
//Print generic Footer:
function print_footer(){
- //$page = $this->page;
$prefix = $this->prefix;
+ /*
+ if (isset($_GET["css"]) && $_GET["css"] === true) {
+ $css = "{$prefix}assets/css/main.css";
+ $nameCSS = "Contraste Normal";
+ } else {
+ $css = "{$prefix}assets/css/highContrast.css";
+ $nameCSS = "Alto Contraste";
+ }
+ */
+ $css = "{$prefix}assets/css/highContrast.css";
+ $nameCSS = "Alto Contraste";
+
+ echo"
+
- echo"