diff --git a/assets/css/highContrast.css b/assets/css/highContrast.css index ec692ed..d1a8290 100644 --- a/assets/css/highContrast.css +++ b/assets/css/highContrast.css @@ -313,7 +313,7 @@ text-transform: uppercase; font-weight: bold; font-size: 90%; - color: #00020f; + color: #d3ebff; } .code label{ color: #d3ebff; @@ -553,8 +553,8 @@ width: 100%; height: 30px; border: 1px solid #dadada; - background-color: #dadada; - color: #00020f; + background-color: #00020f; + color: #dadada; padding: 5px; margin-top: 5px; font-size: 12px; diff --git a/assets/js/cambiarCSS.js b/assets/js/cambiarCSS.js index af20494..404ca62 100644 --- a/assets/js/cambiarCSS.js +++ b/assets/js/cambiarCSS.js @@ -1,12 +1,3 @@ function cambiarCSS(nuevo){ - let highContrast; - - if(highContrast === true){ - highContrast = false; - } else { - highContrast = true; - } - - //window.location.href += "?highContrast=" + highContrast; - document.getElementById('estilo').setAttribute('href', nuevo); + document.getElementById('estilo').setAttribute('href', nuevo); } \ No newline at end of file diff --git a/assets/php/common/user_dao.php b/assets/php/common/user_dao.php index 483a76a..1fe199d 100644 --- a/assets/php/common/user_dao.php +++ b/assets/php/common/user_dao.php @@ -81,12 +81,24 @@ //Returns a query to get the user's data. public function userData($id){ + $id = $this->mysqli->real_escape_string($id); + $sql = sprintf( "SELECT * FROM users WHERE id = '%d'", $id ); $resul = mysqli_query($this->mysqli, $sql) or die ('Error into query database'); return $resul; } + //Search a user by name. + public function selectUserName($username){ + $username = $this->mysqli->real_escape_string($username); + + $sql = sprintf( "SELECT * FROM users WHERE name = '%s'", $username ); + $resul = mysqli_query($this->mysqli, $sql); + + return $resul; + } + //Change username by id. public function changeUserName($id, $username){ $id = $this->mysqli->real_escape_string($id); diff --git a/assets/php/template.php b/assets/php/template.php index 6e2d009..2cbbd67 100644 --- a/assets/php/template.php +++ b/assets/php/template.php @@ -458,14 +458,12 @@ function print_footer(){ $prefix = $this->prefix; - if (isset($_GET["highContrast"]) && $_GET["highContrast"] === true) { - $css = "{$prefix}assets/css/main.css"; - $nameCSS = "Contraste Normal"; - } else { - $css = "{$prefix}assets/css/highContrast.css"; - $nameCSS = "Alto Contraste"; - } - + /* TODO */ + $css = "{$prefix}assets/css/highContrast.css"; + $nameCSS = "Alto Contraste"; + //$css = "{$prefix}assets/css/main.css"; + //$nameCSS = "Contraste Normal"; + echo"