diff --git a/site/templates/css/fonts.css b/site/templates/css/fonts.css index 7855837..32e2e60 100644 --- a/site/templates/css/fonts.css +++ b/site/templates/css/fonts.css @@ -2,7 +2,7 @@ * @FONTS * ============================================================================= * - * fonts.css v0.1.12 | GNU GPL License | + * fonts.css v0.1.13 | GNU GPL License | * */ @@ -90,13 +90,13 @@ @font-face { font-family: 'icomoon'; - src: url('../fonts/icomoon_Regular.eot?jfx2ev'); /* 1 */ - src: url('../fonts/icomoon_Regular.eot?jfx2ev#iefix') format('embedded-opentype'), /* 2 */ - url('../fonts/icomoon_Regular.woff2?jfx2ev') format('woff2'), /* 3 */ - url('../fonts/icomoon_Regular.woff?jfx2ev') format('woff'), /* 4 */ - url('../fonts/icomoon_Regular.otf?jfx2ev') format('opentype'), /* 5 */ - url('../fonts/icomoon_Regular.ttf?jfx2ev') format('truetype'), /* 5 */ - url('../fonts/icomoon_Regular.svg?jfx2ev#icomoon') format('svg'); /* 6 */ + src: url('../fonts/icomoon_Regular.eot?srs48a'); /* 1 */ + src: url('../fonts/icomoon_Regular.eot?srs48a#iefix') format('embedded-opentype'), /* 2 */ + url('../fonts/icomoon_Regular.woff2?srs48a') format('woff2'), /* 3 */ + url('../fonts/icomoon_Regular.woff?srs48a') format('woff'), /* 4 */ + url('../fonts/icomoon_Regular.otf?srs48a') format('opentype'), /* 5 */ + url('../fonts/icomoon_Regular.ttf?srs48a') format('truetype'), /* 5 */ + url('../fonts/icomoon_Regular.svg?srs48a#icomoon') format('svg'); /* 6 */ font-display: block; font-style: normal; font-weight: normal; @@ -107,94 +107,109 @@ * */ - [class^="icon-"], - [class*=" icon-"] - { - font-family: 'icomoon' !important; - font-variant: normal; - font-style: normal; - line-height: 1; - text-transform: none; - - speak: never; - } - - .icon-chevrons-right:before - { - content: "\e900"; - } - - .icon-edit:before - { - content: "\e901"; - } - - .icon-document-file-txt:before - { - content: "\e902"; - } - - .icon-corner-right-down:before - { - content: "\e903"; - } - - .icon-folder:before - { - content: "\e904"; - } - - .icon-tag:before - { - content: "\e905"; - } - - .icon-book-open:before - { - content: "\e906"; - } - - .icon-book:before - { - content: "\e907"; - } - - .icon-arrow-right:before - { - content: "\e908"; - } - - .icon-user:before - { - content: "\e909"; - } - - .icon-skip-back:before - { - content: "\e90a"; - } - - .icon-skip-forward:before - { - content: "\e90b"; - } - - .icon-play:before - { - content: "\e90c"; - } - - .icon-search:before - { - content: "\e90d"; - } +[class^="icon-"], +[class*=" icon-"] +{ + font-family: 'icomoon' !important; + font-variant: normal; + font-style: normal; + line-height: 1; + text-transform: none; - .icon-settings:before - { + speak: never; +} + +.icon-chevrons-right:before +{ + content: "\e900"; +} + +.icon-edit:before +{ + content: "\e901"; +} + +.icon-document-file-txt:before +{ + content: "\e902"; +} + +.icon-corner-right-down:before +{ + content: "\e903"; +} + +.icon-folder:before +{ + content: "\e904"; +} + +.icon-tag:before +{ + content: "\e905"; +} + +.icon-book-open:before +{ + content: "\e906"; +} + +.icon-book:before +{ + content: "\e907"; +} + +.icon-arrow-right:before +{ + content: "\e908"; +} + +.icon-user:before +{ + content: "\e909"; +} + +.icon-skip-back:before +{ + content: "\e90a"; +} + +.icon-skip-forward:before +{ + content: "\e90b"; +} + +.icon-play:before +{ + content: "\e90c"; +} + +.icon-search:before +{ + content: "\e90d"; +} + +.icon-settings:before +{ content: "\e90e"; - } +} - .icon-home:before - { +.icon-home:before +{ content: "\e90f"; - } \ No newline at end of file +} + +.icon-alert-circle:before +{ + content: "\e910"; +} + +.icon-check-circle:before +{ + content: "\e911"; +} + +.icon-x-circle:before +{ + content: "\e912"; +} \ No newline at end of file diff --git a/site/templates/css/style.css b/site/templates/css/style.css index f087a6c..91361b9 100644 --- a/site/templates/css/style.css +++ b/site/templates/css/style.css @@ -507,6 +507,81 @@ figure.enlace figcaption a text-transform: uppercase; } +form#inicio-sesion +{ + display: flex; + flex-direction: column; + + width: 80%; + + margin: 0 auto; + + padding: 10px; + + border: 1px solid rgb(var(--cor_10)); + border-radius: 0.625rem; + + text-align: center; +} + +form#inicio-sesion div#notificacions +{ + margin-bottom: 10px; + + border: 1px solid; + border-radius: 0.625rem; +} + +form#inicio-sesion div#notificacions.erro +{ + color: #D8000C; + + background-color: #FFBABA; +} + +form#inicio-sesion div#notificacions.alerta +{ + color: #9f6000; + + background-color: #feefb3; +} + +form#inicio-sesion div#notificacions.exito +{ + color: #4f8a10; + + background-color: #dff2bf; +} + +form#inicio-sesion div#notificacions.info +{ + color: #00529b; + + background-color: #bde5f8; +} + +form#inicio-sesion div#notificacions h3 +{ + margin: 0; + + padding: 10px; + + color: inherit; +} + +form#inicio-sesion div.elemento +{ + display: flex; + flex-direction: row; + + margin-bottom: 10px; +} + +form#inicio-sesion div.elemento > * +{ + width: 50%; +} + .contedor { width: 90%; @@ -657,6 +732,11 @@ figure.enlace figcaption a height: 200px; } + form#inicio-sesion + { + width: 50%; + } + div.celda.esquerda { flex-direction: row; diff --git a/site/templates/fonts/icomoon_Regular.eot b/site/templates/fonts/icomoon_Regular.eot index b2df40c..31dcad7 100644 Binary files a/site/templates/fonts/icomoon_Regular.eot and b/site/templates/fonts/icomoon_Regular.eot differ diff --git a/site/templates/fonts/icomoon_Regular.otf b/site/templates/fonts/icomoon_Regular.otf index c240838..8aec99a 100644 Binary files a/site/templates/fonts/icomoon_Regular.otf and b/site/templates/fonts/icomoon_Regular.otf differ diff --git a/site/templates/fonts/icomoon_Regular.svg b/site/templates/fonts/icomoon_Regular.svg index 13e2999..8204c9c 100644 --- a/site/templates/fonts/icomoon_Regular.svg +++ b/site/templates/fonts/icomoon_Regular.svg @@ -2,7 +2,7 @@ -Created by FontForge 20201107 at Sun Oct 23 17:16:18 2022 +Created by FontForge 20201107 at Sun Oct 23 17:42:08 2022 By Unknown @@ -94,5 +94,20 @@ q18 -8 37.5 -9t38.5 4q13 4 25.5 11t22.5 17l3 3q7 6 14.5 9t15.5 3q9 0 16.5 -3t14. + + + diff --git a/site/templates/fonts/icomoon_Regular.ttf b/site/templates/fonts/icomoon_Regular.ttf index 59fb5c6..095ca83 100644 Binary files a/site/templates/fonts/icomoon_Regular.ttf and b/site/templates/fonts/icomoon_Regular.ttf differ diff --git a/site/templates/fonts/icomoon_Regular.woff b/site/templates/fonts/icomoon_Regular.woff index 40e7e34..d91bb1d 100644 Binary files a/site/templates/fonts/icomoon_Regular.woff and b/site/templates/fonts/icomoon_Regular.woff differ diff --git a/site/templates/fonts/icomoon_Regular.woff2 b/site/templates/fonts/icomoon_Regular.woff2 index 1ea6230..e37c4fc 100644 Binary files a/site/templates/fonts/icomoon_Regular.woff2 and b/site/templates/fonts/icomoon_Regular.woff2 differ diff --git a/site/templates/js/main.js b/site/templates/js/main.js index e69de29..af039e0 100644 --- a/site/templates/js/main.js +++ b/site/templates/js/main.js @@ -0,0 +1,30 @@ +function getToken(event) +{ + event.preventDefault(); + + grecaptcha.ready(function() + { + grecaptcha.execute('6LexXqYiAAAAACwDpMGIg1OMnAXVJU0VmbEMQUD8', { action: 'submit' }).then(function(token) + { + var form = document.getElementById("inicio-sesion"); + + + var boton_token = document.createElement('input'); + boton_token.type = 'hidden'; + boton_token.name = 'token'; + boton_token.id = 'token'; + boton_token.value = token; + + var boton_action = document.createElement('input'); + boton_action.type = 'hidden'; + boton_action.name = 'action'; + boton_action.id = 'action'; + boton_action.value = 'submit'; + + form.appendChild(boton_token); + form.appendChild(boton_action); + + form.submit(); + });; + }); +} \ No newline at end of file diff --git a/site/templates/xes-acceder.php b/site/templates/xes-acceder.php index f54005a..6411805 100644 --- a/site/templates/xes-acceder.php +++ b/site/templates/xes-acceder.php @@ -1,93 +1,111 @@ post->user && $input->post->pass) -{ - $user = $sanitizer->username($input->post->user); - $pass = $input->post->pass; +define("RECAPTCHA_V3_SECRET_KEY", '6LexXqYiAAAAAOoFqs4kfWd7zW6stVRK0aViyiQo'); +if($input->post->usuario && $input->post->contrasinal) +{ + $user = $sanitizer->username($input->post->usuario); + $pass = $input->post->contrasinal; +} + +$token = $input->post->token; +$action = $input->post->action; + +$ch = curl_init(); +curl_setopt($ch, CURLOPT_URL,"https://www.google.com/recaptcha/api/siteverify"); +curl_setopt($ch, CURLOPT_POST, 1); +curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('secret' => RECAPTCHA_V3_SECRET_KEY, 'response' => $token))); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); +$response = curl_exec($ch); +curl_close($ch); +$arrResponse = json_decode($response, true); + +if($arrResponse["success"] == '1' && $arrResponse["action"] == $action && $arrResponse["score"] >= 0.5) +{ if($session->login($user, $pass)) { $session->redirect($page->parent->httpUrl); } -} - -$url1 = $sanitizer->name($input->urlSegment1); -$resEmpresa = null; -$q = "template=empresa, name={$url1}, limit=1"; - -if($url1) -{ - if($pages->count($q)) - { - $resEmpresa = $pages->find($q)->first(); - setcookie("w_empresa", $resEmpresa->name , time()+4000000, "/gestion/"); - } else { - $session->redirect($page->parent->httpUrl); - setcookie("w_empresa", "", time()-3600); + $mensaxe_tipo = "erro"; + $mensaxe = _x('Wrong username or password', 'Wrong username or password'); } } else { - setcookie("w_empresa", "", time()-3600); - unset($_COOKIE['w_empresa']); + $mensaxe_tipo = "alerta"; + $mensaxe = _x('Wrong reCaptcha', 'Wrong reCaptcha'); } -?> - - - - - - Document - - -
- - -
- -
-
- + + +
+
+
+

+post->usuario): ?> +
+

+
+ +
+ + +
+
+ + +
+ +
+
+
+ + + + \ No newline at end of file diff --git a/site/templates/xes-panel.php b/site/templates/xes-panel.php index e23d84f..5f9579b 100644 --- a/site/templates/xes-panel.php +++ b/site/templates/xes-panel.php @@ -3,10 +3,12 @@ $menu = ''; $contido = ''; +$gestion = $pages->get('/gestion'); + +$menu = renderMenu($gestion->children, 0, 'paxinas'); $contido .= renderMigasPan($page) . "\n"; -$contido .= '
' . "\n"; +$contido .= '
' . "\n"; $contido .= '
' . "\n"; -$contido .= '

' . ucfirst($inicio->title) . '

' . "\n"; -$contido .= '

' . $page->title . '

' . "\n"; +$contido .= '

' . ucfirst($page->title) . '

' . "\n"; $contido .= '
' . "\n"; $contido .= '
' . "\n"; \ No newline at end of file