Seccion de xestion.

This commit is contained in:
Laegnur 2022-10-06 13:14:42 +02:00
parent 76cbb9e824
commit c4f68108e7
18 changed files with 1545 additions and 20 deletions

File diff suppressed because one or more lines are too long

View file

@ -111,7 +111,7 @@ $config->installed = 1646741669;
* Installer: HTTP Hosts Whitelist * Installer: HTTP Hosts Whitelist
* *
*/ */
$config->httpHosts = array('php.artabro.localhost'); $config->httpHosts = array('praiadeseselle.com');
/** /**

View file

@ -6,6 +6,9 @@
. ' ' . $configuracion['sitio_descripcion']; ?>.</p> . ' ' . $configuracion['sitio_descripcion']; ?>.</p>
<p><?php echo _x('All rights reserved', 'copyright');?></p> <p><?php echo _x('All rights reserved', 'copyright');?></p>
<p><?php echo _x('Designed and Developed by', 'developer');?> <a target="_blank" href="https://artabro.org">Codigo Artabro</a></p> <p><?php echo _x('Designed and Developed by', 'developer');?> <a target="_blank" href="https://artabro.org">Codigo Artabro</a></p>
<?php if(user()->isGuest()): ?>
<p><a href='/es/gestion/acceder'><i class='icon-user'></i> <?php echo _x('Access the Management Panel', 'Access the Management Panel'); ?></a></p>
<?php endif; ?>
</div> </div>
</footer> </footer>
<script src="<?php echo $config->urls->templates?>js/swiper.js"></script> <script src="<?php echo $config->urls->templates?>js/swiper.js"></script>

View file

@ -1,4 +1,10 @@
<?php namespace ProcessWire;?><!DOCTYPE html> <?php namespace ProcessWire;
if($input->get->logout == true)
{
$session->logout();
$session->redirect($inicio->url);
}
?><!DOCTYPE html>
<html lang="<?php echo _x('en', 'HTML language code'); ?>"> <html lang="<?php echo _x('en', 'HTML language code'); ?>">
<head> <head>
<title><?php echo $titulo; ?></title> <title><?php echo $titulo; ?></title>
@ -89,6 +95,10 @@ foreach($languages as $idioma)
</li> </li>
<?php } ?> <?php } ?>
</ul> </ul>
<?php if($user->isLoggedin()): ?>
<a href="/?logout=true"><i class='icon-user'></i> Log Out</a>
<a href='/es/gestion'><i class='icon-settings'></i> Panel de Gestion</a>
<?php endif; ?>
<?php echo $menu; ?> <?php echo $menu; ?>
</nav> </nav>
</div> </div>

View file

@ -0,0 +1,14 @@
<?php namespace ProcessWire; ?>
<footer id="pe">
<h2 class="visually-hidden"><?php echo _x('Footer', 'Page footer');?></h2>
<div class="contedor">
<p>&copy;2022 <?php echo $configuracion['sitio_nome']
. ' ' . $configuracion['sitio_descripcion']; ?>.</p>
<p><?php echo _x('All rights reserved', 'copyright');?></p>
<p><?php echo _x('Designed and Developed by', 'developer');?> <a target="_blank" href="https://artabro.org">Codigo Artabro</a></p>
</div>
</footer>
<script src="<?php echo $config->urls->templates?>js/swiper.js"></script>
<script src="<?php echo $config->urls->templates?>js/main.js"></script>
</body>
</html>

View file

@ -0,0 +1,49 @@
<?php namespace ProcessWire;?><!DOCTYPE html>
<html lang="<?php echo _x('en', 'HTML language code'); ?>">
<head>
<title><?php echo $titulo; ?></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" sizes="32x32" href="<?php echo $config->urls->templates; ?>images/favicon-32x32.png">
<link rel="shortcut icon" href="<?php echo $config->urls->templates; ?>images/favicon.ico">
<link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates; ?>css/reset.css" />
<link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates; ?>css/fonts.css" />
<link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates; ?>css/swiper.css" />
<link title="Praia de Seselle" rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>css/style.css" />
<style>
:root
{
font-size: 16px;
--cor_60: <?php echo $configuracion['cor_fondo'] ?>;
--cor_30: <?php echo $configuracion['cor_principal'] ?>;
--cor_10: <?php echo $configuracion['cor_secundario'] ?>;
}
</style>
</head>
<body>
<a href="#contido" class="visually-hidden element-focusable bypass-to-main"><?php echo _x('Skip to content', 'bypass'); ?></a>
<header id="cabeceira">
<div class="contedor">
<div id="logo">
<picture>
<source srcset="<?php echo $config->urls->templates?>images/logo-praia-seselle-150x116.jpg" media="(max-width: 767px)">
<source srcset="<?php echo $config->urls->templates?>images/logo-praia-seselle-230x179.jpg" media="(min-width: 768px)">
<img src="<?php echo $config->urls->templates?>images/logo-praia-seselle.svg" alt="<?php echo _x('Logo of Praia de Seselle Tourist Apartments', 'Site logo'); ?>">
</picture>
<h1 class="visually-hidden"><?php echo $configuracion['sitio_nome']; ?> <?php echo $configuracion['sitio_descripcion']; ?></h1>
</div>
<label class="visually-hidden" for="interruptor"><?php echo _x('Open/Close menu', 'Menu Switch'); ?></label><input type="checkbox" name="interruptor" id="interruptor">
<div class="interruptor">
<span class="linna linna1"></span>
<span class="linna linna2"></span>
<span class="linna linna3"></span>
</div>
<nav id="menu">
<h2 class="visually-hidden"><?php echo _x('Menu', 'Navigation menu');?></h2>
<a href="/es" class="site_title"> <span>Volver</span></a>
<a href="/?logout=true">Log Out</a>
<?php echo $menu; ?>
</nav>
</div>
</header>

View file

@ -0,0 +1,11 @@
<?php namespace ProcessWire;
include('./_xes-head.php');
?>
<main id="contido">
<?php
echo $contido;
?>
</main>
<?php
include('./_xes-foot.php');

View file

@ -2,7 +2,7 @@
* @FONTS * @FONTS
* ============================================================================= * =============================================================================
* *
* fonts.css v0.1.10 | GNU GPL License | * fonts.css v0.1.11 | GNU GPL License |
* *
*/ */
@ -90,13 +90,13 @@
@font-face @font-face
{ {
font-family: 'icomoon'; font-family: 'icomoon';
src: url('../fonts/icomoon_Regular.eot?nvq8gi'); /* 1 */ src: url('../fonts/icomoon_Regular.eot?k4m5mh'); /* 1 */
src: url('../fonts/icomoon_Regular.eot?nvq8gi#iefix') format('embedded-opentype'), /* 2 */ src: url('../fonts/icomoon_Regular.eot?k4m5mh#iefix') format('embedded-opentype'), /* 2 */
url('../fonts/icomoon_Regular.woff2?nvq8gi') format('woff2'), /* 3 */ url('../fonts/icomoon_Regular.woff2?k4m5mh') format('woff2'), /* 3 */
url('../fonts/icomoon_Regular.woff?nvq8gi') format('woff'), /* 4 */ url('../fonts/icomoon_Regular.woff?k4m5mh') format('woff'), /* 4 */
url('../fonts/icomoon_Regular.otf?nvq8gi') format('opentype'), /* 5 */ url('../fonts/icomoon_Regular.otf?k4m5mh') format('opentype'), /* 5 */
url('../fonts/icomoon_Regular.ttf?nvq8gi') format('truetype'), /* 5 */ url('../fonts/icomoon_Regular.ttf?k4m5mh') format('truetype'), /* 5 */
url('../fonts/icomoon_Regular.svg?nvq8gi#icomoon') format('svg'); /* 6 */ url('../fonts/icomoon_Regular.svg?k4m5mh#icomoon') format('svg'); /* 6 */
font-display: block; font-display: block;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
@ -187,4 +187,9 @@
.icon-search:before .icon-search:before
{ {
content: "\e90d"; content: "\e90d";
}
.icon-settings:before
{
content: "\e90e";
} }

View file

@ -2,7 +2,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<metadata> <metadata>
Created by FontForge 20201107 at Fri Sep 30 10:22:43 2022 Created by FontForge 20201107 at Thu Oct 6 11:00:07 2022
By Unknown By Unknown
</metadata> </metadata>
<defs> <defs>
@ -15,7 +15,7 @@ Created by FontForge 20201107 at Fri Sep 30 10:22:43 2022
panose-1="0 0 0 0 0 0 0 0 0 0" panose-1="0 0 0 0 0 0 0 0 0 0"
ascent="960" ascent="960"
descent="-64" descent="-64"
bbox="43 -43 1024 901" bbox="0 -85 1024 939"
underline-thickness="0" underline-thickness="0"
underline-position="0" underline-position="0"
unicode-range="U+0001-FFFD" unicode-range="U+0001-FFFD"
@ -76,5 +76,20 @@ d="M236 847q-4 3 -10 4.5t-13 1.5q-17 0 -29.5 -12.5t-12.5 -29.5v-768q0 -6 1.5 -12
<glyph glyph-name="uniE90D" unicode="&#xe90d;" <glyph glyph-name="uniE90D" unicode="&#xe90d;"
d="M684 262l-2 -2l-2 -2l-2 -2l-2 -2q-40 -39 -93 -61t-114 -22q-62 0 -116 23.5t-95 63.5q-40 41 -63.5 95t-23.5 116t23.5 116.5t63.5 95.5q41 40 95 63.5t116 23.5t116.5 -23.5t95.5 -63.5q40 -41 63.5 -95.5t23.5 -116.5q0 -60 -22.5 -113.5t-61.5 -93.5v0zM926 73 d="M684 262l-2 -2l-2 -2l-2 -2l-2 -2q-40 -39 -93 -61t-114 -22q-62 0 -116 23.5t-95 63.5q-40 41 -63.5 95t-23.5 116t23.5 116.5t63.5 95.5q41 40 95 63.5t116 23.5t116.5 -23.5t95.5 -63.5q40 -41 63.5 -95.5t23.5 -116.5q0 -60 -22.5 -113.5t-61.5 -93.5v0zM926 73
l-157 157q40 49 62 110t22 129q0 80 -30 150t-82 122t-122 82t-150 30q-79 0 -149 -30t-122 -82t-82.5 -122t-30.5 -150q0 -79 30.5 -149t82.5 -122t122 -82.5t149 -30.5q68 0 129.5 22.5t110.5 61.5l157 -156q12 -13 30 -13t30 13q13 12 13 29.5t-13 30.5v0z" /> l-157 157q40 49 62 110t22 129q0 80 -30 150t-82 122t-122 82t-150 30q-79 0 -149 -30t-122 -82t-82.5 -122t-30.5 -150q0 -79 30.5 -149t82.5 -122t122 -82.5t149 -30.5q68 0 129.5 22.5t110.5 61.5l157 -156q12 -13 30 -13t30 13q13 12 13 29.5t-13 30.5v0z" />
<glyph glyph-name="uniE90E" unicode="&#xe90e;"
d="M683 427q0 35 -13.5 66t-36.5 54t-54.5 36.5t-66.5 13.5t-66.5 -13.5t-54.5 -36.5t-36.5 -54t-13.5 -66q0 -36 13.5 -67t36.5 -54t54.5 -36.5t66.5 -13.5t66.5 13.5t54.5 36.5t36.5 54t13.5 67zM597 427q0 -18 -6.5 -33.5t-18.5 -27.5q-11 -11 -26.5 -18t-33.5 -7
t-33.5 7t-26.5 18q-12 12 -18.5 27.5t-6.5 33.5q0 17 6.5 32.5t18.5 27.5q11 12 26.5 18.5t33.5 6.5t33.5 -6.5t26.5 -18.5q12 -12 18.5 -27.5t6.5 -32.5zM867 281q1 4 3 6.5t5 4.5q4 3 8 5t9 2h4q26 0 49.5 10t40.5 27q18 18 28 41t10 50q0 26 -10 49.5t-28 40.5
q-17 17 -40.5 27.5t-49.5 10.5h-7q-3 0 -6.5 0.5t-6.5 2.5q-4 2 -7 5.5t-5 7.5q0 1 -0.5 2t-0.5 2q0 2 -0.5 3.5t-1.5 3.5q1 11 3 16t5 8l2 2q19 19 28.5 42.5t9.5 48.5q0 24 -9.5 47.5t-28.5 42.5t-42.5 28.5t-48.5 9.5q-24 0 -47.5 -9.5t-42.5 -28.5l-2 -2l-6 -4t-6 -3
q-5 -1 -9.5 -1t-9.5 3q-3 1 -6 3t-5 5q-3 3 -4.5 7.5t-1.5 9.5v4q0 26 -10 49.5t-28 40.5q-17 17 -40.5 27.5t-49.5 10.5t-49.5 -10t-40.5 -28q-18 -17 -28 -40.5t-10 -49.5v-7q0 -4 -1 -7l-2 -6q-2 -4 -5.5 -7.5t-8.5 -5.5h-1h-2q-2 -1 -4 -1.5t-4 -0.5q-10 1 -15 2.5
t-8 4.5l-3 3q-18 19 -42 28t-48 9q-25 0 -48.5 -9t-42.5 -28q-18 -19 -27.5 -42.5t-9.5 -48.5q0 -24 9.5 -48t27.5 -42l2 -2q3 -3 5 -6t3 -7t0.5 -9t-2.5 -9v-1.5t-1 -0.5q-1 -4 -3 -7t-5 -5q-3 -3 -7.5 -5t-8.5 -2h-4q-26 0 -49.5 -10t-40.5 -27q-18 -18 -28 -41t-10 -50
q0 -26 10 -49.5t28 -40.5q17 -18 40.5 -28t49.5 -10h7q3 0 6.5 -0.5t6.5 -2.5q4 -2 7.5 -5.5t5.5 -8.5q0 -1 0.5 -3t1.5 -4q-1 -11 -3 -15.5t-5 -7.5l-2 -3q-19 -19 -28.5 -42.5t-9.5 -47.5q0 -25 9.5 -48.5t28.5 -42.5t42.5 -28t48.5 -9q24 0 47.5 9t42.5 28l2 2q3 3 6 4.5
t6 2.5q5 2 9.5 1.5t9.5 -2.5l0.5 -0.5t1.5 -0.5q4 -1 6.5 -3t5.5 -5q3 -4 4.5 -8t1.5 -8v-4q0 -27 10.5 -50.5t27.5 -40.5t40.5 -27t49.5 -10q27 0 50.5 10t40.5 27q17 18 27 41t10 50v6q0 4 1 7.5t3 6.5q2 4 5.5 7t7.5 5q2 1 4 1.5t4 0.5q10 0 15 -2t8 -5l3 -3
q18 -18 42 -27.5t48 -9.5q25 0 48.5 9.5t42.5 28.5q18 18 27.5 42t9.5 48q0 25 -9.5 48.5t-28.5 42.5l-2 2q-2 2 -4 5.5t-3 6.5q-1 4 -0.5 9t2.5 9v0zM785 542q0 6 -1 9.5t-2 6.5v-3v-3v-3q1 -2 1.5 -3.5t1.5 -3.5v-3.5v-0.5q8 -19 21.5 -33t30.5 -23q12 -6 25 -9.5t26 -3.5
h8q9 0 16.5 -3t13.5 -9t9.5 -13.5t3.5 -16.5t-3.5 -17t-9.5 -13q-6 -6 -13.5 -9.5t-16.5 -3.5h-4q-20 0 -38.5 -7t-32.5 -19q-11 -8 -19 -19t-13 -23q-9 -19 -10 -38.5t4 -37.5q4 -14 11 -26t17 -23l3 -3q6 -6 9.5 -14t3.5 -16t-3.5 -16t-9.5 -14t-14 -9.5t-16 -3.5t-16 3.5
t-14 9.5l-3 2q-15 15 -32.5 23t-36.5 10q-14 1 -28 -1.5t-28 -8.5q-18 -7 -32 -20.5t-23 -30.5q-6 -12 -9.5 -25t-3.5 -27v-7q0 -9 -3.5 -17t-8.5 -14q-6 -5 -14 -8.5t-17 -3.5q-8 0 -16 3.5t-14 9.5q-6 5 -9 13t-3 17v4q-1 21 -8 39t-20 33q-9 10 -20.5 18t-24.5 13
q-18 8 -37.5 9t-37.5 -4q-13 -3 -25.5 -10t-22.5 -17l-3 -3q-7 -7 -14.5 -10t-16.5 -3q-8 0 -15.5 3t-14.5 9q-6 7 -9 14.5t-3 16.5q0 8 3 16t9 14l3 2q14 15 22 33t10 37q1 14 -1.5 28t-7.5 27q-8 19 -21.5 33t-30.5 23q-12 6 -25 9t-26 4h-8q-9 0 -16.5 3t-13.5 9
t-9.5 13.5t-3.5 16.5t3.5 17t9.5 13q6 6 13.5 9.5t16.5 3.5h4q21 0 39.5 7.5t32.5 19.5q11 9 19 20.5t13 25.5q8 18 9 37t-4 37q-4 14 -11 26.5t-17 22.5l-3 3q-6 6 -9.5 14t-3.5 16t3 16t10 14q6 7 14 10t16 3t16 -3t14 -9l3 -3q15 -15 32.5 -23t36.5 -9q12 -1 24 0.5
t23 5.5q3 0 6 1l6 2h-2h-2l-10.5 -1.5t-5.5 -2.5h3q1 0 2.5 0.5t2.5 0.5q2 0 4 1l4 2h3.5h0.5q18 8 32.5 21.5t22.5 29.5q7 12 10 25t3 27v8q0 8 3.5 16t9.5 14t13.5 9t16.5 3t16.5 -3t13.5 -9t9.5 -14t3.5 -16v-4q0 -21 6.5 -39t18.5 -33q9 -10 19.5 -18t23.5 -14
q18 -8 37.5 -9t38.5 4q13 4 25.5 11t22.5 17l3 3q7 6 14.5 9t15.5 3q9 0 16.5 -3t14.5 -9q6 -6 9 -14t3 -16q0 -9 -3 -16.5t-9 -13.5l-3 -3q-14 -15 -22 -33t-10 -37q-1 -12 0.5 -23.5t5.5 -23.5q0 -3 1 -5.5t2 -5.5v2v2v0z" />
</font> </font>
</defs></svg> </defs></svg>

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -5,21 +5,21 @@ $contido = '';
$mantemento = $inicio->mantemento; $mantemento = $inicio->mantemento;
$contido .= ' ' . renderMigasPan($page) . "\n"; $contido .= renderMigasPan($page) . "\n";
$contido .= ' <article id="inicio">' . "\n"; $contido .= '<article id="inicio">' . "\n";
$contido .= ' <div class="contedor">' . "\n"; $contido .= '<div class="contedor">' . "\n";
$contido .= ' <h2 class="visually-hidden">' . ucfirst($inicio->title) . '</h2>' . "\n"; $contido .= '<h2 class="visually-hidden">' . ucfirst($inicio->title) . '</h2>' . "\n";
if($mantemento && !$user->isLoggedin()) if($mantemento && !$user->isLoggedin())
{ {
$menu = renderMenu($inicio, 0, 'paxinas'); $menu = renderMenu($inicio, 0, 'paxinas');
$contido .= ' ' . getSeccions($inicio->mantemento_mensaxe) . "\n"; $contido .= getSeccions($inicio->mantemento_mensaxe) . "\n";
} }
else else
{ {
$menu = renderMenu($inicio->and($inicio->children), 0, 'paxinas'); $menu = renderMenu($inicio->and($inicio->children), 0, 'paxinas');
$contido .= ' ' . getSeccions($inicio->seccions) . "\n"; $contido .= getSeccions($inicio->seccions) . "\n";
} }
$contido .= ' </div>' . "\n"; $contido .= '</div>' . "\n";
$contido .= ' </article>' . "\n"; $contido .= '</article>' . "\n";

View file

@ -0,0 +1,93 @@
<?php namespace ProcessWire;
if($input->post->user && $input->post->pass)
{
$user = $sanitizer->username($input->post->user);
$pass = $input->post->pass;
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);
}
}
else
{
setcookie("w_empresa", "", time()-3600);
unset($_COOKIE['w_empresa']);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body class="login">
<div>
<a class="hiddenanchor" id="signup"></a>
<a class="hiddenanchor" id="signin"></a>
<div class="login_wrapper">
<div class="animate form login_form">
<section class="login_content">
<form action="/es/gestion/acceder/" method='post' >
<?php if ($url1 || $resEmpresa): ?>
<img src="<?php echo $resEmpresa->imagen->first()->url; ?>" class="img-responsive"><br>
<?php else: ?>
<h1>Disnav Gestión</h1>
<?php endif; ?>
<?php if($input->post->user) echo "<h2 class='error '>Usuario o contraseña incorrecta</h2>"; ?>
<div>
<input type="text" name="user" class="form-control" placeholder="Usuario">
</div>
<div>
<input type="password" name="pass" class="form-control login-password" placeholder="Contraseña">
</div>
<div>
<!-- <a class="btn btn-default submit" href="index.html">Entrar</a> -->
<input type='submit' name='submit' value='Entrar' class="btn btn-default btn-block btn-validation" />
</div>
<div class="clearfix"></div>
<div class="separator">
<div class="clearfix"></div>
<br />
<div>
<p>©2016 All Rights Reserved. Developed by <a href="http://www.procgal.es" target="_blank">Procgal</a></p>
</div>
</div>
</form>
</section>
</div>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,12 @@
<?php namespace ProcessWire;
$menu = '';
$contido = '';
$contido .= renderMigasPan($page) . "\n";
$contido .= '<article id="inicio">' . "\n";
$contido .= '<div class="contedor">' . "\n";
$contido .= '<h2 class="visually-hidden">' . ucfirst($inicio->title) . '</h2>' . "\n";
$contido .= '<h3>' . $page->title . '</h3>' . "\n";
$contido .= '</div>' . "\n";
$contido .= '</article>' . "\n";

View file

@ -0,0 +1,16 @@
<?php namespace ProcessWire;
if($input->get->logout == true)
{
$session->logout();
$session->redirect($inicio->url);
}
if($user->isLoggedin())
{
$session->redirect($pages->get('/es/gestion/panel/')->httpUrl);
}
else
{
$session->redirect($pages->get('/es/gestion/acceder/')->httpUrl);
}