Compare commits
60 Commits
aa285952b6
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bef4998a64 | ||
|
|
d4f0f62a9a | ||
|
|
632dc3c0d6 | ||
|
|
80c728ef5a | ||
|
|
2b15b50b4b | ||
| 27cd0b0d4d | |||
|
|
3159b34e70 | ||
| dd3fdd35a1 | |||
|
|
287fdf422d | ||
|
|
99936d0baa | ||
|
|
8dd9897ca4 | ||
| 477880bdae | |||
| 9ec3610e88 | |||
|
|
ce32d1b651 | ||
|
|
41625ac443 | ||
|
|
795ce6fc4e | ||
|
|
7f0143604c | ||
|
|
bb8e2d9746 | ||
| 2cec4bed5b | |||
|
|
fe29b10a4c | ||
|
|
ad529d51bc | ||
|
|
10aa54fd57 | ||
|
|
fd84530759 | ||
|
|
f617ecb350 | ||
| 0f2a906d73 | |||
|
|
1be6b7ff0c | ||
|
|
87d4889b96 | ||
| 2947f03a0b | |||
| fd8958db9f | |||
|
|
f674f82658 | ||
|
|
c84ee486f3 | ||
|
|
0ef2679808 | ||
|
|
0586a1b00d | ||
| 3886412382 | |||
|
|
dd4b945f5f | ||
|
|
fd29d07911 | ||
|
|
6051cf57d1 | ||
| d4c9d9ec5a | |||
| f2a7f863e0 | |||
|
|
e925e6424a | ||
|
|
894a107f4f | ||
|
|
89a41d52ae | ||
|
|
d2562a25df | ||
|
|
57a81bbed0 | ||
| 1e8c3c5869 | |||
|
|
419d95eb4c | ||
|
|
f744aaaed1 | ||
| cb3d786806 | |||
|
|
92555ea2bf | ||
| cc908e7c06 | |||
|
|
0a3ad91db9 | ||
|
|
3642288a5b | ||
|
|
9728aefc07 | ||
|
|
a4082524d4 | ||
|
|
2f58db6643 | ||
|
|
811d5d47f3 | ||
|
|
041e77246f | ||
|
|
3bdf66f832 | ||
|
|
ff8516665c | ||
| ba230d192f |
8
.gitignore
vendored
@@ -1,7 +1,7 @@
|
|||||||
/includes/config.php
|
/src/Core/config.php
|
||||||
/medias/*
|
/public/medias/*
|
||||||
/_maps
|
/public/_maps
|
||||||
_ressources/dump.sql
|
/public/_ressources/dump.sql
|
||||||
*.sublime-project
|
*.sublime-project
|
||||||
*.sublime-workspace
|
*.sublime-workspace
|
||||||
*.log
|
*.log
|
||||||
|
|||||||
9
.htaccess
Executable file → Normal file
@@ -1,11 +1,6 @@
|
|||||||
AddDefaultCharset UTF-8
|
|
||||||
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
|
||||||
# Everything uses the routing system
|
RewriteRule ^public(/.*)?$ - [L]
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{REQUEST_FILENAME} !-l
|
RewriteRule ^(.*)$ public/$1 [L]
|
||||||
RewriteRule . ./index.php [L]
|
|
||||||
|
|
||||||
php_value short_open_tag 1
|
|
||||||
|
|||||||
11
README.md
@@ -1 +1,12 @@
|
|||||||
[Kabano website](https://kabano.org/)
|
[Kabano website](https://kabano.org/)
|
||||||
|
|
||||||
|
## Arborescence
|
||||||
|
|
||||||
|
- `public/` : assets frontend et point d'entrée web (`index.php`, `views/`, `_ressources/`)
|
||||||
|
- `src/` : code backend commun
|
||||||
|
- `Core/` : configuration et utilitaires communs (ancien `includes/`)
|
||||||
|
- `Controllers/` : contrôleurs MVC backend (ancien `controllers/`)
|
||||||
|
- `Models/` : modèles MVC backend (ancien `models/`)
|
||||||
|
- `Thirds/` : dépendances tierces backend (ancien `third/`)
|
||||||
|
|
||||||
|
Note: configure the web server at the repository root; requests to `/` are routed to `public/` via `.htaccess`, and URLs are generated from the app root.
|
||||||
|
|||||||
14
_ressources/nginx.conf
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Déclare une variable pour extraire `$kabano_q` sans slash initial
|
||||||
|
if ($uri ~ ^/(.*)) {
|
||||||
|
set $kabano_q $1;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Gère les fichiers statiques si disponibles sous /public/
|
||||||
|
location / {
|
||||||
|
root /var/www/my_webapp__3/www/public;
|
||||||
|
|
||||||
|
# Tente de servir des fichiers physiques existants dans /public/
|
||||||
|
try_files $uri /index.php?q=$kabano_q&$args;
|
||||||
|
|
||||||
|
# Par défaut, les fichiers inexistants sont redirigés vers /index.php
|
||||||
|
}
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
ini_set('display_errors', 1);
|
|
||||||
ini_set('display_startup_errors', 1);
|
|
||||||
error_reporting(E_ALL);
|
|
||||||
locale_set_default("fr_FR");
|
|
||||||
date_default_timezone_set("UTC"); // Default tz for date manipulation is UTC. Display tz is in session.php
|
|
||||||
|
|
||||||
|
|
||||||
/*****
|
|
||||||
** Management of folder names
|
|
||||||
*****/
|
|
||||||
|
|
||||||
// It is the include folder name
|
|
||||||
$config['include_folder']=basename(__DIR__);
|
|
||||||
// This is the absolute folder to the root of the website
|
|
||||||
$config['abs_root_folder']=str_replace($config['include_folder'],"",__DIR__);
|
|
||||||
// This is the relative folder to the root of the website from the DocumentRoot (can also be called subfolder)
|
|
||||||
$config['rel_root_folder']=str_replace($_SERVER['DOCUMENT_ROOT'],"",$config['abs_root_folder']);
|
|
||||||
$config['web_root_folder']="https://kabano.test/";
|
|
||||||
if($config['rel_root_folder']=="") $config['rel_root_folder']="/";
|
|
||||||
|
|
||||||
// Here all the absolute paths to specific folders
|
|
||||||
$config['views_folder'] = $config['abs_root_folder']."views/";
|
|
||||||
$config['controllers_folder'] = $config['abs_root_folder']."controllers/";
|
|
||||||
$config['models_folder'] = $config['abs_root_folder']."models/";
|
|
||||||
$config['medias_folder'] = $config['abs_root_folder']."medias/";
|
|
||||||
$config['includes_folder'] = $config['abs_root_folder']."includes/";
|
|
||||||
$config['third_folder'] = $config['abs_root_folder']."third/";
|
|
||||||
$config['logs_folder'] = $config['abs_root_folder']."logs/";
|
|
||||||
|
|
||||||
// Here all the relative url to specific folders
|
|
||||||
$config['views_url'] = $config['rel_root_folder']."views/";
|
|
||||||
|
|
||||||
|
|
||||||
/*****
|
|
||||||
** SQL Database configuration
|
|
||||||
*****/
|
|
||||||
|
|
||||||
$config['SQL_host'] = "localhost";
|
|
||||||
$config['SQL_user'] = "kabano";
|
|
||||||
$config['SQL_pass'] = "PASSWORD";
|
|
||||||
$config['SQL_db'] = "postgres";
|
|
||||||
|
|
||||||
/*****
|
|
||||||
** Mail configuration
|
|
||||||
*****/
|
|
||||||
|
|
||||||
$config['admin_mail'] = "leo@lstronic.com";
|
|
||||||
$config['bot_mail'] = "robot@kabano.com";
|
|
||||||
|
|
||||||
?>
|
|
||||||
7
index.php
Executable file → Normal file
@@ -1,6 +1,3 @@
|
|||||||
<?
|
<?php
|
||||||
|
|
||||||
require_once('includes/config.php');
|
require __DIR__ . '/public/index.php';
|
||||||
require_once('includes/routes.php');
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
11
public/.htaccess
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
AddDefaultCharset UTF-8
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# Everything uses the routing system
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-l
|
||||||
|
RewriteRule . ./index.php [L]
|
||||||
|
|
||||||
|
php_value short_open_tag 1
|
||||||
8
public/index.php
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Point d'entrée web : charge la configuration et le routeur principal.
|
||||||
|
*/
|
||||||
|
|
||||||
|
require_once __DIR__ . '/../src/Core/config.php';
|
||||||
|
require_once __DIR__ . '/../src/Core/routes.php';
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
|
<!-- Footer -->
|
||||||
<footer>
|
<footer>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<p class="flex-element"><a target="_blank" href="https://www.facebook.com/kabano09"><i class="fab fa-facebook-square"></i></a> Léo Serre — <script>document.write("06 " + "1" + "8 6" + "2 3" + "2 ");</script>05</p>
|
<p class="flex-element"><a target="_blank" href="https://www.facebook.com/kabano09"><i class="fab fa-facebook-square"></i></a> Léo Serre — <script>document.write("06 " + "1" + "8 6" + "2 3" + "2 ");</script>05</p>
|
||||||
<div id="footernav" class="flex-element">
|
<div id="footernav" class="flex-element">
|
||||||
|
<!-- Footer links -->
|
||||||
<a href="<?=$config['rel_root_folder']?>wiki/cgv">CGV</a> —
|
<a href="<?=$config['rel_root_folder']?>wiki/cgv">CGV</a> —
|
||||||
<a href="<?=$config['rel_root_folder']?>wiki/legal">Mentions Légales</a> —
|
<a href="<?=$config['rel_root_folder']?>wiki/legal">Mentions Légales</a> —
|
||||||
<a href="<?=$config['rel_root_folder']?>contact">Contact</a>
|
<a href="<?=$config['rel_root_folder']?>contact">Contact</a>
|
||||||
@@ -1,46 +1,50 @@
|
|||||||
|
<!-- Head: metadata and assets -->
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
|
||||||
<link rel="shortcut icon" href="<?=$config['views_url']?>img/favicon.png">
|
<link rel="shortcut icon" href="<?=$config['views_url']?>img/favicon.png">
|
||||||
<? if (isset($head['css'])) {
|
<!-- Stylesheets -->
|
||||||
|
<?php if (isset($head['css'])) {
|
||||||
foreach(explode(";",$head['css']) as $css) { ?>
|
foreach(explode(";",$head['css']) as $css) { ?>
|
||||||
<link rel="stylesheet" href="<?=$config['views_url']?>css/<?=$css?>"/>
|
<link rel="stylesheet" href="<?=$config['views_url']?>css/<?=$css?>"/>
|
||||||
<? }
|
<?php }
|
||||||
}
|
}
|
||||||
else { ?>
|
else { ?>
|
||||||
<link rel="stylesheet" href="<?=$config['views_url']?>css/d.index.css"/>
|
<link rel="stylesheet" href="<?=$config['views_url']?>css/d.index.css"/>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<link rel="stylesheet" href="<?=$config['views_url']?>third/fontawesome-free-5.4.1-web/css/all.min.css"/>
|
<link rel="stylesheet" href="<?=$config['views_url']?>third/fontawesome-free-5.4.1-web/css/all.min.css"/>
|
||||||
|
|
||||||
|
<!-- Scripts -->
|
||||||
<script type="text/javascript" src="<?=$config['views_url']?>third/jquery-3.3.1.min.js"></script>
|
<script type="text/javascript" src="<?=$config['views_url']?>third/jquery-3.3.1.min.js"></script>
|
||||||
<? if (isset($head['third'])) {
|
<?php if (isset($head['third'])) {
|
||||||
foreach(explode(";",$head['third']) as $third) { ?>
|
foreach(explode(";",$head['third']) as $third) { ?>
|
||||||
<script type="text/javascript" src="<?=$config['views_url']?>third/<?=$third?>"></script>
|
<script type="text/javascript" src="<?=$config['views_url']?>third/<?=$third?>"></script>
|
||||||
<? }
|
<?php }
|
||||||
} ?>
|
} ?>
|
||||||
<script type="text/javascript" src="<?=$config['views_url']?>js/d.header.js"></script>
|
<script type="text/javascript" src="<?=$config['views_url']?>js/d.header.js"></script>
|
||||||
<? if (isset($head['js'])) {
|
<?php if (isset($head['js'])) {
|
||||||
foreach(explode(";",$head['js']) as $js) { ?>
|
foreach(explode(";",$head['js']) as $js) { ?>
|
||||||
<script type="text/javascript" src="<?=$config['views_url']?>js/<?=$js?>"></script>
|
<script type="text/javascript" src="<?=$config['views_url']?>js/<?=$js?>"></script>
|
||||||
<? }
|
<?php }
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<? if (isset($head['title'])) { ?>
|
<!-- Metadata -->
|
||||||
|
<?php if (isset($head['title'])) { ?>
|
||||||
<title><?=$head['title']?> — Kabano</title>
|
<title><?=$head['title']?> — Kabano</title>
|
||||||
<? }
|
<?php }
|
||||||
else { ?>
|
else { ?>
|
||||||
<title>Refuges de montagne et métallerie agricole</title>
|
<title>Refuges de montagne et métallerie agricole</title>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if (isset($head['description'])) { ?>
|
<?php if (isset($head['description'])) { ?>
|
||||||
<meta name="description" content="<?=$head['description']?>">
|
<meta name="description" content="<?=$head['description']?>">
|
||||||
? }
|
<?php }
|
||||||
else { ?>
|
else { ?>
|
||||||
<meta name="description" content="Entreprise de services dans la fabrication, la réparation, et l'entretien de bâtiments et machines agricoles">
|
<meta name="description" content="Entreprise de services dans la fabrication, la réparation, et l'entretien de bâtiments et machines agricoles">
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if (isset($head['keywords'])) { ?>
|
<?php if (isset($head['keywords'])) { ?>
|
||||||
<meta name="keywords" content="<?=$head['keywords']?>">
|
<meta name="keywords" content="<?=$head['keywords']?>">
|
||||||
<? }
|
<?php }
|
||||||
else { ?>
|
else { ?>
|
||||||
<meta name="keywords" content="kabano, cabanes, refuges, bivouac, montagne, randonnée, métallerie, agricole">
|
<meta name="keywords" content="kabano, cabanes, refuges, bivouac, montagne, randonnée, métallerie, agricole">
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</head>
|
</head>
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
|
<!-- Header navigation -->
|
||||||
<header>
|
<header>
|
||||||
<div id="Hcontent">
|
<div id="Hcontent">
|
||||||
<a href="<?=$config['rel_root_folder']?>" id="logo">
|
<a href="<?=$config['rel_root_folder']?>" id="logo">
|
||||||
<img alt="Kabano logo" src="<?=$config['views_url'].'img/'?>header.svg">
|
<img alt="Kabano logo" src="<?=$config['views_url'].'img/'?>header.svg">
|
||||||
</a>
|
</a>
|
||||||
<nav>
|
<nav>
|
||||||
|
<!-- Main menu -->
|
||||||
<input type="checkbox" id="togglemenu"><label for="togglemenu" class="hamburger on-bar"><i class="icon fas fa-bars"></i></label>
|
<input type="checkbox" id="togglemenu"><label for="togglemenu" class="hamburger on-bar"><i class="icon fas fa-bars"></i></label>
|
||||||
<ul id="menu">
|
<ul id="menu">
|
||||||
<li class="on-bar has-sub with-subtitle"><a class="on-bar" href="#">Restauration<br>
|
<li class="on-bar has-sub with-subtitle"><a class="on-bar" href="#">Restauration<br>
|
||||||
@@ -24,15 +26,16 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="on-bar has-sub menu-icon">
|
<li class="on-bar has-sub menu-icon">
|
||||||
<? if ($user->id == 0) { ?>
|
<?php if ($user->id == 0) { ?>
|
||||||
<a class="on-bar" href="#"><i class="icon fas fa-user"></i></a>
|
<a class="on-bar" href="#"><i class="icon fas fa-user"></i></a>
|
||||||
<? } elseif ($user->is_avatar_present == 't') { ?>
|
<?php } elseif ($user->is_avatar_present == 't') { ?>
|
||||||
<a class="on-bar" href="#"><img alt="Avatar" class="icon avatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$user->id?>_s.jpg"></a>
|
<a class="on-bar" href="#"><img alt="Avatar" class="icon avatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$user->id?>_s.jpg"></a>
|
||||||
<? } else { ?>
|
<?php } else { ?>
|
||||||
<a class="on-bar" href="#"><i class="icon fas fa-user-secret"></i></a>
|
<a class="on-bar" href="#"><i class="icon fas fa-user-secret"></i></a>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<ul>
|
<ul>
|
||||||
<? if($user->rank == 'visitor') { ?>
|
<!-- Account actions -->
|
||||||
|
<?php if($user->rank == 'visitor') { ?>
|
||||||
<li id="connectform">
|
<li id="connectform">
|
||||||
<form action="<?=$config['rel_root_folder']?>user/login" method="post">
|
<form action="<?=$config['rel_root_folder']?>user/login" method="post">
|
||||||
<input type="text" name="login" placeholder="Nom d'utilisateur">
|
<input type="text" name="login" placeholder="Nom d'utilisateur">
|
||||||
@@ -41,22 +44,21 @@
|
|||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="<?=$config['rel_root_folder']?>user/signin">S'inscrire</a></li>
|
<li><a href="<?=$config['rel_root_folder']?>user/signin">S'inscrire</a></li>
|
||||||
<? } else { ?>
|
<?php } else { ?>
|
||||||
<li><a href="<?=$config['rel_root_folder']?>user/p">Mon profil</a></li>
|
<li><a href="<?=$config['rel_root_folder']?>user/p">Mon profil</a></li>
|
||||||
<li><a href="<?=$config['rel_root_folder']?>user/member_list">Liste des membres</a></li>
|
<li><a href="<?=$config['rel_root_folder']?>user/member_list">Liste des membres</a></li>
|
||||||
<? if($user->rankIsHigher('moderator')) { ?>
|
<?php if($user->rankIsHigher('moderator')) { ?>
|
||||||
<li><a href="<?=$config['rel_root_folder']?>admin">Administration</a></li>
|
<li><a href="<?=$config['rel_root_folder']?>admin">Administration</a></li>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<li><a href="<?=$config['rel_root_folder']?>user/logout">Se déconnecter</a></li>
|
<li><a href="<?=$config['rel_root_folder']?>user/logout">Se déconnecter</a></li>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="on-bar has-sub menu-icon"><a class="on-bar" href="#"><i class="icon fas fa-question"></i></a>
|
<li class="on-bar has-sub menu-icon"><a class="on-bar" href="#"><i class="icon fas fa-question"></i></a>
|
||||||
<ul>
|
<ul>
|
||||||
<!--<li><a href="<?=$config['rel_root_folder']?>wiki/help">Aide</a></li>-->
|
<!-- Help and info -->
|
||||||
<li><a href="<?=$config['rel_root_folder']?>blog">Blog</a></li>
|
<li><a href="<?=$config['rel_root_folder']?>blog">Blog</a></li>
|
||||||
<li><a href="<?=$config['rel_root_folder']?>contact">Contact</a></li>
|
<li><a href="<?=$config['rel_root_folder']?>contact">Contact</a></li>
|
||||||
<!--<li><a href="<?=$config['rel_root_folder']?>wiki/api">API Développeurs</a></li>-->
|
|
||||||
<li><a href="<?=$config['rel_root_folder']?>wiki/about">À propos</a></li>
|
<li><a href="<?=$config['rel_root_folder']?>wiki/about">À propos</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* Feuille de style: css/d.admin.css */
|
||||||
/*********************************/
|
/*********************************/
|
||||||
/** Wiki files page **/
|
/** Wiki files page **/
|
||||||
/*********************************/
|
/*********************************/
|
||||||
@@ -42,19 +43,6 @@
|
|||||||
background: #ccc;
|
background: #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wiki_files .pagebuttons {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
#wiki_files .pagebuttons a {
|
|
||||||
background: #efefef;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
padding: 5px;
|
|
||||||
font-size: 1.5em;
|
|
||||||
}
|
|
||||||
#wiki_files .pagebuttons .previous {
|
|
||||||
margin-right: -1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#wiki_files td a {
|
#wiki_files td a {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* Feuille de style: css/d.blog.css */
|
||||||
/*********************************/
|
/*********************************/
|
||||||
/** Blog list page **/
|
/** Blog list page **/
|
||||||
/*********************************/
|
/*********************************/
|
||||||
@@ -41,18 +42,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#blog_list .pagebuttons {
|
#blog_list .pagebuttons {
|
||||||
text-align: center;
|
|
||||||
margin: 40px 0 30px 0;
|
margin: 40px 0 30px 0;
|
||||||
}
|
}
|
||||||
#blog_list .pagebuttons a {
|
|
||||||
background: #efefef;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
padding: 5px;
|
|
||||||
font-size: 1.5em;
|
|
||||||
}
|
|
||||||
#blog_list .pagebuttons .previous {
|
|
||||||
margin-right: -1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*********************************/
|
/*********************************/
|
||||||
/** Blog view article page **/
|
/** Blog view article page **/
|
||||||
@@ -269,9 +260,3 @@ form.form label {
|
|||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
form.form input[type=submit] {
|
|
||||||
width: auto;
|
|
||||||
margin: auto;
|
|
||||||
border-bottom: 2px solid blue;
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* Feuille de style: css/d.index.css */
|
||||||
* {
|
* {
|
||||||
border: 0;
|
border: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -55,6 +56,27 @@ pre {
|
|||||||
background: #eeeeff;
|
background: #eeeeff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pagebuttons {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagebuttons a {
|
||||||
|
background: #efefef;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagebuttons .previous {
|
||||||
|
margin-right: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
form.form input[type=submit] {
|
||||||
|
width: auto;
|
||||||
|
margin: auto;
|
||||||
|
border-bottom: 2px solid blue;
|
||||||
|
}
|
||||||
|
|
||||||
/* FONTS */
|
/* FONTS */
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* Feuille de style: css/d.map.css */
|
||||||
/* Custom configuration for the map page */
|
/* Custom configuration for the map page */
|
||||||
|
|
||||||
html {
|
html {
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* Feuille de style: css/d.poi.css */
|
||||||
/*********************************/
|
/*********************************/
|
||||||
/** Common **/
|
/** Common **/
|
||||||
/*********************************/
|
/*********************************/
|
||||||
@@ -673,4 +674,3 @@ form.form input[type="checkbox"]:checked + span:before {
|
|||||||
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* Feuille de style: css/d.user.css */
|
||||||
/*********************************/
|
/*********************************/
|
||||||
/** Login page **/
|
/** Login page **/
|
||||||
/*********************************/
|
/*********************************/
|
||||||
@@ -24,12 +25,6 @@ form.form input {
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.form input[type=submit] {
|
|
||||||
width: auto;
|
|
||||||
margin: auto;
|
|
||||||
border-bottom: 2px solid blue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*********************************/
|
/*********************************/
|
||||||
/** Profile page **/
|
/** Profile page **/
|
||||||
/*********************************/
|
/*********************************/
|
||||||
@@ -204,16 +199,3 @@ form.edituser #picturebuttons a {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#member_list .pagebuttons {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
#member_list .pagebuttons a {
|
|
||||||
background: #efefef;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
padding: 5px;
|
|
||||||
font-size: 1.5em;
|
|
||||||
}
|
|
||||||
#member_list .pagebuttons .previous {
|
|
||||||
margin-right: -1px;
|
|
||||||
}
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* Feuille de style: css/d.wiki.css */
|
||||||
/*********************************/
|
/*********************************/
|
||||||
/** View page **/
|
/** View page **/
|
||||||
/*********************************/
|
/*********************************/
|
||||||
@@ -32,12 +33,6 @@ form.form input {
|
|||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.form input[type=submit] {
|
|
||||||
width: auto;
|
|
||||||
margin: auto;
|
|
||||||
border-bottom: 2px solid blue;
|
|
||||||
}
|
|
||||||
|
|
||||||
#wikiContent {
|
#wikiContent {
|
||||||
margin: 50px 0;
|
margin: 50px 0;
|
||||||
}
|
}
|
||||||
@@ -1,42 +1,46 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: admin backups -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h1><?=$head['title']?></h1>
|
<h1><?=$head['title']?></h1>
|
||||||
<br>
|
<br>
|
||||||
<pre><?
|
<!-- Command output -->
|
||||||
|
<pre><?php
|
||||||
foreach($output as $line) {
|
foreach($output as $line) {
|
||||||
echo $line."<br>";
|
echo $line."<br>";
|
||||||
}
|
}
|
||||||
?></pre>
|
?></pre>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<? $i=0;
|
<!-- Download links -->
|
||||||
|
<?php $i=0;
|
||||||
foreach($backup_file as $file) {
|
foreach($backup_file as $file) {
|
||||||
if (file_exists($file ?? '')) { ?>
|
if (file_exists($file ?? '')) { ?>
|
||||||
<a href='<?=$config['rel_root_folder']?>tmp/<?=$backup_filename[$i]?>' target='_blank'><i class="fas fa-file-export"></i> Télécharger le fichier "<i><?=$backup_filename[$i]?></i>"</a><br>
|
<a href='<?=$config['rel_root_folder']?>tmp/<?=$backup_filename[$i]?>' target='_blank'><i class="fas fa-file-export"></i> Télécharger le fichier "<i><?=$backup_filename[$i]?></i>"</a><br>
|
||||||
<? } else { ?>
|
<?php } else { ?>
|
||||||
Fichier <?=$file?> non généré
|
Fichier <?=$file?> non généré
|
||||||
<? }
|
<?php }
|
||||||
$i++;
|
$i++;
|
||||||
}?>
|
}?>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
<!-- Archive list -->
|
||||||
<h4>Archives des anciennes sauvegardes</h4>
|
<h4>Archives des anciennes sauvegardes</h4>
|
||||||
<ul style="padding: 1em 0 1em 40px;">
|
<ul style="padding: 1em 0 1em 40px;">
|
||||||
<? foreach($backup_files as $file) { ?>
|
<?php foreach($backup_files as $file) { ?>
|
||||||
<li style="padding: 0 0 0.2em 0;"><?=basename($file)?> - <a href='<?=$config['rel_root_folder']?>tmp/<?=basename($file)?>' target='_blank'><i class="fas fa-download"></i> Télécharger</a> - <a href='<?=$config['rel_root_folder']?>admin/<?=$controller->splitted_url[1]?>/delete/<?=basename($file)?>'><i class="fas fa-trash"></i> Effacer</a></li>
|
<li style="padding: 0 0 0.2em 0;"><?=basename($file)?> - <a href='<?=$config['rel_root_folder']?>tmp/<?=basename($file)?>' target='_blank'><i class="fas fa-download"></i> Télécharger</a> - <a href='<?=$config['rel_root_folder']?>admin/<?=$controller->splitted_url[1]?>/delete/<?=basename($file)?>'><i class="fas fa-trash"></i> Effacer</a></li>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
25
public/views/d.admin.git-pull.html
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: admin git pull -->
|
||||||
|
<html lang="fr">
|
||||||
|
|
||||||
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h1><?=$head['title']?></h1>
|
||||||
|
<br>
|
||||||
|
<!-- Command output -->
|
||||||
|
<pre><?php
|
||||||
|
foreach($output as $line) {
|
||||||
|
echo $line."<br>";
|
||||||
|
}
|
||||||
|
?></pre>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,27 +1,31 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: admin dashboard -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<!-- Admin actions -->
|
||||||
<section>
|
<section>
|
||||||
<h1>Administration</h1>
|
<h1>Administration</h1>
|
||||||
<br>
|
<br>
|
||||||
<? if($user->rankIsHigher("administrator")) { ?>
|
<?php if($user->rankIsHigher("administrator")) { ?>
|
||||||
|
<!-- Administrator tools -->
|
||||||
<a href="<?=$config['rel_root_folder']?>admin/git-pull" class="button"><i class="fas fa-sync-alt"></i> Mettre à jour</a> <small>Met à jour le logiciel depuis le dépôt GIT.</small><br><br>
|
<a href="<?=$config['rel_root_folder']?>admin/git-pull" class="button"><i class="fas fa-sync-alt"></i> Mettre à jour</a> <small>Met à jour le logiciel depuis le dépôt GIT.</small><br><br>
|
||||||
<a href="<?=$config['rel_root_folder']?>admin/sql-backup" class="button"><i class="fas fa-file-export"></i> Sauvegarde SQL</a><a href="<?=$config['rel_root_folder']?>admin/files-backup" class="button"><i class="fas fa-file-export"></i> Archive des médias</a><small>Génère un dump SQL et une archive de fichiers téléchargeable.</small><br><br>
|
<a href="<?=$config['rel_root_folder']?>admin/sql-backup" class="button"><i class="fas fa-file-export"></i> Sauvegarde SQL</a><a href="<?=$config['rel_root_folder']?>admin/files-backup" class="button"><i class="fas fa-file-export"></i> Archive des médias</a><small>Génère un dump SQL et une archive de fichiers téléchargeable.</small><br><br>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if($user->rankIsHigher("moderator")) { ?>
|
<?php if($user->rankIsHigher("moderator")) { ?>
|
||||||
|
<!-- Moderator tools -->
|
||||||
<a href="<?=$config['rel_root_folder']?>admin/logs" class="button"><i class="fas fa-history"></i> Voir les logs</a> <small>Permet d'accéder aux 200 dernières lignes des logs bruts des actions sur la base de données.</small><br><br>
|
<a href="<?=$config['rel_root_folder']?>admin/logs" class="button"><i class="fas fa-history"></i> Voir les logs</a> <small>Permet d'accéder aux 200 dernières lignes des logs bruts des actions sur la base de données.</small><br><br>
|
||||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files" class="button"><i class="fas fa-paperclip"></i> Fichiers attachés</a><small>Gérer les fichiers attachés pour le wiki : liste, ajout, suppression...</small><br><br>
|
<a href="<?=$config['rel_root_folder']?>admin/wiki-files" class="button"><i class="fas fa-paperclip"></i> Fichiers attachés</a><small>Gérer les fichiers attachés pour le wiki : liste, ajout, suppression...</small><br><br>
|
||||||
<a href="<?=$config['rel_root_folder']?>admin/stats" class="button"><i class="fas fa-chart-line"></i> Statistiques</a><small>Analyser les logs et afficher les statistiques.</small><br><br>
|
<a href="<?=$config['rel_root_folder']?>admin/stats" class="button"><i class="fas fa-chart-line"></i> Statistiques</a><small>Analyser les logs et afficher les statistiques.</small><br><br>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,41 +1,46 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: admin logs -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<!-- Logs viewer -->
|
||||||
<section>
|
<section>
|
||||||
<h1><?=$head['title']?></h1>
|
<h1><?=$head['title']?></h1>
|
||||||
|
<!-- Log file selector -->
|
||||||
<span class="subtitle">
|
<span class="subtitle">
|
||||||
<select id="logfile">
|
<select id="logfile">
|
||||||
<? $i = 0;
|
<?php $i = 0;
|
||||||
foreach ($files_list as $row) {
|
foreach ($files_list as $row) {
|
||||||
if ($row != "." && $row != "..") { ?>
|
if ($row != "." && $row != "..") { ?>
|
||||||
<option <?=$i==$filenb?'selected':''?> value="<?=$i?>"><? echo $row; ?></option>
|
<option <?=$i==$filenb?'selected':''?> value="<?=$i?>"><?php echo $row; ?></option>
|
||||||
<? $i++;
|
<?php $i++;
|
||||||
} ?>
|
} ?>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<pre><?
|
<!-- Log content -->
|
||||||
|
<pre><?php
|
||||||
foreach($output as $line) {
|
foreach($output as $line) {
|
||||||
echo $line."<br>";
|
echo $line."<br>";
|
||||||
}
|
}
|
||||||
?></pre>
|
?></pre>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- Log file navigation -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$( "#logfile" ).change(function() {
|
$( "#logfile" ).change(function() {
|
||||||
window.location.href = "<?=$config['rel_root_folder']?>admin/logs/"+$( this ).val();
|
window.location.href = "<?=$config['rel_root_folder']?>admin/logs/"+$( this ).val();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
31
public/views/d.admin.stats.html
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: admin statistics -->
|
||||||
|
<html lang="fr">
|
||||||
|
|
||||||
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<!-- Statistics summary -->
|
||||||
|
<section>
|
||||||
|
<h1><?=$head['title']?></h1>
|
||||||
|
<br>
|
||||||
|
<!-- Command output -->
|
||||||
|
<pre><?php
|
||||||
|
print_r($output);
|
||||||
|
?></pre>
|
||||||
|
<br>
|
||||||
|
<!-- Report link -->
|
||||||
|
<?php if (file_exists($report)) { ?>
|
||||||
|
<a href='<?=$config['rel_root_folder']?>tmp/report.html' target='_blank'><i class="fas fa-chart-line"></i> Voir le rapport</a>
|
||||||
|
<?php } else { ?>
|
||||||
|
Echec de la commande
|
||||||
|
<?php } ?>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,20 +1,24 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: admin wiki files -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<!-- Files table -->
|
||||||
<section id="wiki_files">
|
<section id="wiki_files">
|
||||||
<h1><?=$head['title']?></h1>
|
<h1><?=$head['title']?></h1>
|
||||||
|
|
||||||
|
<!-- Pagination summary -->
|
||||||
<p class="subtitle">Fichiers attachés <?=$first?> à <?=$last?> sur les <?=$filenb?> présents</p>
|
<p class="subtitle">Fichiers attachés <?=$first?> à <?=$last?> sur les <?=$filenb?> présents</p>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<!-- Upload form -->
|
||||||
<form action="<?=$config['rel_root_folder']?>admin/wiki-files/upload/" method="post" enctype="multipart/form-data" id="send_file">
|
<form action="<?=$config['rel_root_folder']?>admin/wiki-files/upload/" method="post" enctype="multipart/form-data" id="send_file">
|
||||||
<div>
|
<div>
|
||||||
<label for="file">Envoyer un fichier :</label>
|
<label for="file">Envoyer un fichier :</label>
|
||||||
@@ -23,7 +27,7 @@
|
|||||||
<input type="submit" value="Envoyer">
|
<input type="submit" value="Envoyer">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<!-- File list -->
|
||||||
<table>
|
<table>
|
||||||
<tr class="first">
|
<tr class="first">
|
||||||
<th>
|
<th>
|
||||||
@@ -42,34 +46,35 @@
|
|||||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+1?>?orderby=creation_date&order=<?=$order=='ASC'?'DESC':'ASC'?>">Date de création</a>
|
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+1?>?orderby=creation_date&order=<?=$order=='ASC'?'DESC':'ASC'?>">Date de création</a>
|
||||||
<?=$orderby=='creation_date'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
<?=$orderby=='creation_date'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||||
</th>
|
</th>
|
||||||
<? if ($user->rankIsHigher("administrator")) { ?>
|
<?php if ($user->rankIsHigher("administrator")) { ?>
|
||||||
<th>Suppression</th>
|
<th>Suppression</th>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</tr>
|
</tr>
|
||||||
<? foreach (array_slice($files, $first-1, $rows_per_pages, true) as $file) { ?>
|
<?php foreach (array_slice($files, $first-1, $rows_per_pages, true) as $file) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="<?=$config['rel_root_folder']?>medias/wiki/<?=$file['name']?>"><?=$file['name']?></a>
|
<a href="<?=$config['rel_root_folder']?>medias/wiki/<?=$file['name']?>"><?=$file['name']?></a>
|
||||||
</td>
|
</td>
|
||||||
<td><i class='fas <?=getFontAwesomeIcon($file['type'])?>'></i> <?=$file['type']?></td>
|
<td><i class='fas <?=getFontAwesomeIcon($file['type'])?>'></i> <?=$file['type']?></td>
|
||||||
<td><?=formatBytes($file['size'], $user->locale)?></td>
|
<td><?=formatBytes($file['size'], $user->locale)?></td>
|
||||||
<td><? echo datefmt_format($user->date_format,date_create($file['creation_date'], new DateTimeZone("UTC"))) ?></td>
|
<td><?php echo datefmt_format($user->date_format,date_create($file['creation_date'], new DateTimeZone("UTC"))) ?></td>
|
||||||
<? if ($user->rankIsHigher("administrator")) { ?>
|
<?php if ($user->rankIsHigher("administrator")) { ?>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/delete/<?=$file['name']?>?orderby=<?=$orderby?>&order=<?=$order?>" onclick="return confirm('Es-tu sûr de vouloir supprimer ?');"><span class="external-link"><i class="fas fa-trash"></i></span></a>
|
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/delete/<?=$file['name']?>?orderby=<?=$orderby?>&order=<?=$order?>" onclick="return confirm('Es-tu sûr de vouloir supprimer ?');"><span class="external-link"><i class="fas fa-trash"></i></span></a>
|
||||||
</td>
|
</td>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</tr>
|
</tr>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</table>
|
</table>
|
||||||
|
<!-- Pagination controls -->
|
||||||
<div class="pagebuttons">
|
<div class="pagebuttons">
|
||||||
<? if ($page != 0) { ?><a class="previous" href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fas fa-chevron-left fa-fw"></i></a><? }
|
<?php if ($page != 0) { ?><a class="previous" href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fas fa-chevron-left fa-fw"></i></a><?php }
|
||||||
if (($page+1)*$rows_per_pages < $filenb) { ?><a class="next" href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+2?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fas fa-chevron-right fa-fw"></i></a><? } ?>
|
if (($page+1)*$rows_per_pages < $filenb) { ?><a class="next" href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+2?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fas fa-chevron-right fa-fw"></i></a><?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,55 +1,66 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: blog editor -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<!-- Blog edit form -->
|
||||||
<section>
|
<section>
|
||||||
<? if(isset($new) AND $new==1) { ?>
|
<?php if(isset($new) AND $new==1) { ?>
|
||||||
|
<!-- Create article -->
|
||||||
<form class="form" action="<?=$config['rel_root_folder']?>blog/new" method="post">
|
<form class="form" action="<?=$config['rel_root_folder']?>blog/new" method="post">
|
||||||
<? }
|
<?php }
|
||||||
else { ?>
|
else { ?>
|
||||||
|
<!-- Update article -->
|
||||||
<form class="form" action="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/edit" method="post">
|
<form class="form" action="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/edit" method="post">
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<h1>
|
<h1>
|
||||||
|
<!-- Locale and title -->
|
||||||
<select name="locale" id="locale">
|
<select name="locale" id="locale">
|
||||||
<? foreach($locales->objs as $locale) { ?>
|
<?php foreach($locales->objs as $locale) { ?>
|
||||||
<option <?=$blogArticle->locale==$locale->name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option>
|
<option <?=$blogArticle->locale==$locale->name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
<input type="text" value="<?=$blogArticle->name?>" name="name" id="name" placeholder="Titre">
|
<input type="text" value="<?=$blogArticle->name?>" name="name" id="name" placeholder="Titre">
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<? if(isset($error) AND $error=="permalink") { ?>
|
<?php if(isset($error) AND $error=="permalink") { ?>
|
||||||
|
<!-- Permalink error -->
|
||||||
<p style="color: red;">L'URL sélectionnée est déjà prise.</p>
|
<p style="color: red;">L'URL sélectionnée est déjà prise.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
<!-- Article content -->
|
||||||
<textarea rows="30" name="content" id="content" placeholder="Contenu de l'article"><?=$blogArticle->content?></textarea>
|
<textarea rows="30" name="content" id="content" placeholder="Contenu de l'article"><?=$blogArticle->content?></textarea>
|
||||||
|
|
||||||
<? if(isset($new) AND $new==1) { ?>
|
<?php if(isset($new) AND $new==1) { ?>
|
||||||
|
<!-- Permalink settings -->
|
||||||
<div id="permalink_container">
|
<div id="permalink_container">
|
||||||
<label id="permalink_label" for="permalink"><?=$config['web_root_folder']?>blog/</label>
|
<label id="permalink_label" for="permalink"><?=$config['web_root_folder']?>blog/</label>
|
||||||
<input type="text" name="permalink" id="permalink" placeholder="URL" required>
|
<input type="text" name="permalink" id="permalink" placeholder="URL" required>
|
||||||
</div>
|
</div>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
<!-- Article options -->
|
||||||
<label for="is_commentable">
|
<label for="is_commentable">
|
||||||
<input type="checkbox" name="is_commentable" id="is_commentable"
|
<input type="checkbox" name="is_commentable" id="is_commentable"
|
||||||
<? if($blogArticle->is_commentable == 't') { ?>
|
<?php if($blogArticle->is_commentable == 't') { ?>
|
||||||
checked
|
checked
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
/>
|
/>
|
||||||
<span>Autoriser les commentaires</span>
|
<span>Autoriser les commentaires</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
<!-- Form submission -->
|
||||||
<input name="submit" id="submit" type="submit" value="Envoyer">
|
<input name="submit" id="submit" type="submit" value="Envoyer">
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- Permalink generation -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$( "#name" ).keyup(function() {
|
$( "#name" ).keyup(function() {
|
||||||
permalink = $( "#name" ).val();
|
permalink = $( "#name" ).val();
|
||||||
@@ -69,7 +80,7 @@ $( "#name" ).change(function() {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,55 +1,60 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: blog list -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<!-- Blog listing -->
|
||||||
<section id="blog_list">
|
<section id="blog_list">
|
||||||
<h1>Blog</h1>
|
<h1>Blog</h1>
|
||||||
|
<!-- Actions and pagination -->
|
||||||
<p class="subtitle">
|
<p class="subtitle">
|
||||||
<? if ($user->rankIsHigher("moderator")) { ?>
|
<?php if ($user->rankIsHigher("moderator")) { ?>
|
||||||
<a href="<?=$config['rel_root_folder']?>blog/new"><i class="fas fa-plus"></i> Nouvel article</a> —
|
<a href="<?=$config['rel_root_folder']?>blog/new"><i class="fas fa-plus"></i> Nouvel article</a> —
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<a href="<?=$config['rel_root_folder']?>blog/rss"><i class="fas fa-rss" aria-hidden="true"></i> Flux RSS</a> —
|
<a href="<?=$config['rel_root_folder']?>blog/rss"><i class="fas fa-rss" aria-hidden="true"></i> Flux RSS</a> —
|
||||||
Articles <?=$first?> à <?=$last?> sur <?=$blogArticles->number?>
|
Articles <?=$first?> à <?=$last?> sur <?=$blogArticles->number?>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<!-- Article cards -->
|
||||||
<div id="articles_list">
|
<div id="articles_list">
|
||||||
|
|
||||||
<? foreach ($blogArticles->objs as $row) { ?>
|
<?php foreach ($blogArticles->objs as $row) { ?>
|
||||||
|
|
||||||
<article<? if($row->is_public == 'f') echo ' class="article_archive" '; ?>>
|
<article<?php if($row->is_public == 'f') echo ' class="article_archive" '; ?>>
|
||||||
<h2 class="article_title"><?=$row->name?></h2>
|
<h2 class="article_title"><?=$row->name?></h2>
|
||||||
<div class="article_content"><?=mb_substr($row->content_txt,0,200)?>...</div>
|
<div class="article_content"><?=mb_substr($row->content_txt,0,200)?>...</div>
|
||||||
<p class="article_legend">
|
<p class="article_legend">
|
||||||
<a class="article_link" href="<?=$config['rel_root_folder']?>blog/<?=$row->permalink?>">Lire la suite...</a>
|
<a class="article_link" href="<?=$config['rel_root_folder']?>blog/<?=$row->permalink?>">Lire la suite...</a>
|
||||||
<span class="article_infos">
|
<span class="article_infos">
|
||||||
<? echo datefmt_format($user->date_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?> par
|
<?php echo datefmt_format($user->date_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?> par
|
||||||
<? if ($user->rankIsHigher("registered")) { ?>
|
<?php if ($user->rankIsHigher("registered")) { ?>
|
||||||
<a href="<?=$config['rel_root_folder']?>user/p/<?=$row->author?>"><?=$row->author_name?></a>
|
<a href="<?=$config['rel_root_folder']?>user/p/<?=$row->author?>"><?=$row->author_name?></a>
|
||||||
<? }
|
<?php }
|
||||||
else { ?>
|
else { ?>
|
||||||
<?=$row->author_name?>
|
<?=$row->author_name?>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Pagination controls -->
|
||||||
<div class="pagebuttons">
|
<div class="pagebuttons">
|
||||||
<? if ($page != 0) { ?><a class="previous" href="<?=$config['rel_root_folder']?>blog/<?=$page?>"><i class="fas fa-chevron-left fa-fw"></i></a><? }
|
<?php if ($page != 0) { ?><a class="previous" href="<?=$config['rel_root_folder']?>blog/<?=$page?>"><i class="fas fa-chevron-left fa-fw"></i></a><?php }
|
||||||
if (($page+1)*$articles_per_pages < $blogArticles->number) { ?><a class="next" href="<?=$config['rel_root_folder']?>blog/<?=$page+2?>"><i class="fas fa-chevron-right fa-fw"></i></a><? } ?>
|
if (($page+1)*$articles_per_pages < $blogArticles->number) { ?><a class="next" href="<?=$config['rel_root_folder']?>blog/<?=$page+2?>"><i class="fas fa-chevron-right fa-fw"></i></a><?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<?
|
<?php /* Template: d.blog.list.rss */
|
||||||
|
|
||||||
$ts = gmdate("D, d M Y H:i:s", time() + 60) . " GMT";
|
$ts = gmdate("D, d M Y H:i:s", time() + 60) . " GMT";
|
||||||
header("Content-disposition: filename=blog.rss");
|
header("Content-disposition: filename=blog.rss");
|
||||||
@@ -26,7 +26,7 @@ echo ('<?xml version="1.0" encoding="UTF-8"?>'); ?>
|
|||||||
<width>154</width>
|
<width>154</width>
|
||||||
</image>
|
</image>
|
||||||
|
|
||||||
<? foreach ($blogArticles->objs as $row) { ?>
|
<?php foreach ($blogArticles->objs as $row) { ?>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<title><?=$row->name?></title>
|
<title><?=$row->name?></title>
|
||||||
@@ -38,7 +38,7 @@ echo ('<?xml version="1.0" encoding="UTF-8"?>'); ?>
|
|||||||
]]></description>
|
]]></description>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
</channel>
|
</channel>
|
||||||
156
public/views/d.blog.view.html
Executable file
@@ -0,0 +1,156 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: blog article -->
|
||||||
|
<html lang="fr">
|
||||||
|
|
||||||
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// Droits et état de l'article
|
||||||
|
$isArchiveOrPrivate = $blogArticle->is_archive == "t" || $blogArticle->is_public == "f";
|
||||||
|
$canViewHistory = $user->rankIsHigher('premium');
|
||||||
|
$canModerate = $user->rankIsHigher('moderator');
|
||||||
|
$canWriteComment = $user->rankIsHigher("registered");
|
||||||
|
$canOpenCommentForm = $canWriteComment && !$isArchiveOrPrivate;
|
||||||
|
$hasHistory = isset($blogHistory);
|
||||||
|
$isVisitor = $user->rank == "visitor";
|
||||||
|
$isCommentable = $blogArticle->is_commentable == "t";
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- Blog article -->
|
||||||
|
<section id="blog_article" <?=$isArchiveOrPrivate ? 'class="archive"' : ''?>>
|
||||||
|
<h1><?=$blogArticle->name?></h1>
|
||||||
|
<?php if ($canViewHistory) { ?>
|
||||||
|
<!-- History and actions -->
|
||||||
|
<span class="subtitle">
|
||||||
|
<?php if ($hasHistory) { ?>
|
||||||
|
<select id="bloghistory">
|
||||||
|
<?php $historyIndex = 0; ?>
|
||||||
|
<?php foreach ($blogHistory->objs as $row) { ?>
|
||||||
|
<?php
|
||||||
|
$isSelected = $row->version_id == $blogArticle->version_id ? 'selected' : '';
|
||||||
|
$isActive = $row->is_archive == "f" ? '• ' : '';
|
||||||
|
$formattedDate = datefmt_format(
|
||||||
|
$user->datetimeshort_format,
|
||||||
|
date_create($row->update_date, new DateTimeZone("UTC"))
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<option <?=$isSelected?> value="<?=$historyIndex?>"><?=$isActive?><?=$formattedDate?></option>
|
||||||
|
<?php $historyIndex++; ?>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
<?php }
|
||||||
|
if ($canModerate && $hasHistory) { ?>
|
||||||
|
—
|
||||||
|
<?php }
|
||||||
|
if ($canModerate) { ?>
|
||||||
|
<a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/edit"><i class="fas fa-pencil-alt"></i> Éditer l'article</a> —
|
||||||
|
<?php if ($blogArticle->is_public == 't') { ?>
|
||||||
|
<a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/delete"><i class="fas fa-trash"></i> Effacer l'article</a>
|
||||||
|
<?php } else { ?>
|
||||||
|
<a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/restore"><i class="fas fa-eye"></i> Restaurer l'article</a>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
</span>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<!-- Article content -->
|
||||||
|
<div id="blogContent">
|
||||||
|
<?=$blogArticle->content_html?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Signature -->
|
||||||
|
<p id="blogTimestamp">Article écrit par
|
||||||
|
<?php if ($user->rankIsHigher("blocked")) { ?>
|
||||||
|
<a href="<?=$config['rel_root_folder']?>user/p/<?=$blogArticle->author?>"><?=$blogArticle->author_name?></a>
|
||||||
|
<?php } else { ?>
|
||||||
|
<?=$blogArticle->author_name?>
|
||||||
|
<?php } ?>
|
||||||
|
le <?php echo datefmt_format($user->datetime_format,date_create($blogArticle->creation_date, new DateTimeZone("UTC"))) ?></p>
|
||||||
|
|
||||||
|
<!-- Comments -->
|
||||||
|
|
||||||
|
<?php if ($isCommentable) { ?>
|
||||||
|
<!-- Comment form -->
|
||||||
|
<div id="new_comment">
|
||||||
|
<form class="form" action="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/new_comment" method="post">
|
||||||
|
<div id="new_comment_label" <?=$isVisitor ? "class='sent' " : ""?>>
|
||||||
|
<?php if ($isArchiveOrPrivate) { ?>
|
||||||
|
<p>Impossible de commenter un article non publié</p>
|
||||||
|
<?php } else if ($canWriteComment) { ?>
|
||||||
|
<input name="submit" type="submit" value="Envoyer">
|
||||||
|
<p>Ajouter un nouveau commentaire</p>
|
||||||
|
<?php } else { ?>
|
||||||
|
<p>Veuillez vous connecter pour ajouter un commentaire</p>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
<div id="new_comment_form">
|
||||||
|
<textarea id="comment" name="comment" rows="5" placeholder="Votre commentaire"></textarea>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Comment list -->
|
||||||
|
<?php foreach ($blogArticles_comments->objs as $comment) { ?>
|
||||||
|
<?php $canManageComment = $canModerate || $user->id == $comment->author; ?>
|
||||||
|
|
||||||
|
<article <?php if($comment->is_archive == 't' || $comment->is_public == 'f') echo 'class="comment_archive" '; ?>>
|
||||||
|
<div class="comment_title">
|
||||||
|
<?php if ($comment->author_obj->is_avatar_present=='t') { ?>
|
||||||
|
<img alt="Avatar" class="icon avatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$comment->author_obj->id?>_s.jpg">
|
||||||
|
<?php } else { ?>
|
||||||
|
<i class="icon fas fa-user-secret"></i>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if ($user->rankIsHigher("blocked")) { ?>
|
||||||
|
<a class="username" href="<?=$config['rel_root_folder']?>user/p/<?=$comment->author_obj->id?>"><?=$comment->author_obj->name?></a>
|
||||||
|
<?php } else { ?>
|
||||||
|
<?=$comment->author_obj->name?>
|
||||||
|
<?php } ?>
|
||||||
|
le <?php echo datefmt_format($user->datetime_format,date_create($comment->update_date, new DateTimeZone("UTC"))) ?>
|
||||||
|
<?php if ($canManageComment && $comment->is_public == 't') { ?>
|
||||||
|
<span class="delete_link"><a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/delete_comment/<?=$comment->id?>"><i class="fas fa-trash"></i> Effacer le commentaire</a></span>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if ($canManageComment && $comment->is_public == 'f') { ?>
|
||||||
|
<span class="delete_link"><a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/restore_comment/<?=$comment->id?>"><i class="fas fa-eye"></i> Restaurer le commentaire</a></span>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
<div class="comment_content">
|
||||||
|
<?=$comment->comment_html?>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<?php }
|
||||||
|
} ?>
|
||||||
|
|
||||||
|
<!-- Footer spacing -->
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<div style="clear: both;"> </div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php if ($canViewHistory) { ?>
|
||||||
|
<!-- History switch -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( "#bloghistory" ).change(function() {
|
||||||
|
window.location.href = "<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/"+$( this ).val();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if ($canOpenCommentForm) { ?>
|
||||||
|
<!-- Comment form toggle -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( "#new_comment_label" ).click(function() {
|
||||||
|
$( "#new_comment_form" ).show(400);
|
||||||
|
$( "#new_comment_label input" ).show(0);
|
||||||
|
$( "#new_comment_label").addClass('sent');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,32 +1,37 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: community contributions -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
<section>
|
<section>
|
||||||
<h1>Contribuer au projet Kabano</h1>
|
<h1>Contribuer au projet Kabano</h1>
|
||||||
<p>Étant un projet collaboratif, Kabano se repose sur vos contributions pour diffuser des informations au plus proche de la réalité. En participant au projet Kabano, vous acceptez de placer vos collaborations sous <a href="<?=$config['rel_root_folder']?>wiki/licences">nos licences libres</a>.</p>
|
<p>Étant un projet collaboratif, Kabano se repose sur vos contributions pour diffuser des informations au plus proche de la réalité. En participant au projet Kabano, vous acceptez de placer vos collaborations sous <a href="<?=$config['rel_root_folder']?>wiki/licences">nos licences libres</a>.</p>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<!-- Contribution: add POI -->
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<? if($user->rankIsHigher("registered")) { ?>
|
<?php if($user->rankIsHigher("registered")) { ?>
|
||||||
<div class="title"><i class="fas fa-home"></i>
|
<div class="title"><i class="fas fa-home"></i>
|
||||||
<a href="<?=$config['rel_root_folder']?>poi/new">Ajouter un hébergement de montagne</a>
|
<a href="<?=$config['rel_root_folder']?>poi/new">Ajouter un hébergement de montagne</a>
|
||||||
</div>
|
</div>
|
||||||
<? } else { ?>
|
<?php } else { ?>
|
||||||
|
<!-- Login required -->
|
||||||
<div class="title" id="js_open_1"><i class="fas fa-home"></i>
|
<div class="title" id="js_open_1"><i class="fas fa-home"></i>
|
||||||
<p>Ajouter un hébergement de montagne</p>
|
<p>Ajouter un hébergement de montagne</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="description" id="js_openned_1">
|
<div class="description" id="js_openned_1">
|
||||||
<p>Vous devez être connecté pour pouvoir ajouter un hébergement. Ça nous permet de laisser les robots à la porte.</p>
|
<p>Vous devez être connecté pour pouvoir ajouter un hébergement. Ça nous permet de laisser les robots à la porte.</p>
|
||||||
</div>
|
</div>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Contribution: comments -->
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<div class="title" id="js_open_2"><i class="fas fa-comment"></i>
|
<div class="title" id="js_open_2"><i class="fas fa-comment"></i>
|
||||||
<p>Ajouter un commentaire sur un hébergement</p>
|
<p>Ajouter un commentaire sur un hébergement</p>
|
||||||
@@ -36,6 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Contribution: maintenance -->
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<div class="title" id="js_open_3"><i class="fas fa-wrench"></i>
|
<div class="title" id="js_open_3"><i class="fas fa-wrench"></i>
|
||||||
<p>Faire une demande de travaux</p>
|
<p>Faire une demande de travaux</p>
|
||||||
@@ -47,6 +53,7 @@
|
|||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- Description toggles -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$( "#js_open_1" ).click(function() {
|
$( "#js_open_1" ).click(function() {
|
||||||
$( "#js_openned_1" ).show(400);
|
$( "#js_openned_1" ).show(400);
|
||||||
@@ -59,7 +66,7 @@ $( "#js_open_3" ).click(function() {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,58 +1,64 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: contact -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<!-- Contact form -->
|
||||||
<section>
|
<section>
|
||||||
<h1>Me contacter</h1>
|
<h1>Me contacter</h1>
|
||||||
<form class="form" action="<?=$config['rel_root_folder']?>contact" method="post">
|
<form class="form" action="<?=$config['rel_root_folder']?>contact" method="post">
|
||||||
<? if($error=="name") { ?>
|
<!-- Error messages -->
|
||||||
|
<?php if($error=="name") { ?>
|
||||||
<p style="color: red;">Veuillez renseigner votre nom.</p>
|
<p style="color: red;">Veuillez renseigner votre nom.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if($error=="subject") { ?>
|
<?php if($error=="subject") { ?>
|
||||||
<p style="color: red;">Veuillez renseigner un sujet.</p>
|
<p style="color: red;">Veuillez renseigner un sujet.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if($error=="email") { ?>
|
<?php if($error=="email") { ?>
|
||||||
<p style="color: red;">Veuillez renseigner une adresse mail.</p>
|
<p style="color: red;">Veuillez renseigner une adresse mail.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if($error=="message") { ?>
|
<?php if($error=="message") { ?>
|
||||||
<p style="color: red;">Veuillez renseigner un message.</p>
|
<p style="color: red;">Veuillez renseigner un message.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if($error=="unknown") { ?>
|
<?php if($error=="unknown") { ?>
|
||||||
<p style="color: red;">Une erreur est survenue.</p>
|
<p style="color: red;">Une erreur est survenue.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if($error=="spam") { ?>
|
<?php if($error=="spam") { ?>
|
||||||
<p style="color: red;">Veuillez n'envoyer qu'un message et attendre la fin du compte à rebours.<br>
|
<p style="color: red;">Veuillez n'envoyer qu'un message et attendre la fin du compte à rebours.<br>
|
||||||
Avez-vous javascript activé et attendu la fin du compte à rebours ?</p>
|
Avez-vous javascript activé et attendu la fin du compte à rebours ?</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if($error=="none") { ?>
|
<?php if($error=="none") { ?>
|
||||||
<p style="color: green;">Message bien envoyé.</p>
|
<p style="color: green;">Message bien envoyé.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
|
<!-- Fields -->
|
||||||
<input type="text" name="name" id="name" placeholder="Nom" value="<?=$contact['name']?>">
|
<input type="text" name="name" id="name" placeholder="Nom" value="<?=$contact['name']?>">
|
||||||
<input type="email" name="email" id="email" placeholder="Adresse mail" value="<?=$contact['email']?>">
|
<input type="email" name="email" id="email" placeholder="Adresse mail" value="<?=$contact['email']?>">
|
||||||
<input type="text" name="subject" id="subject" placeholder="Sujet" value="<?=$contact['subject']?>">
|
<input type="text" name="subject" id="subject" placeholder="Sujet" value="<?=$contact['subject']?>">
|
||||||
<textarea name="message" id="message" rows="12" placeholder="Contenu de votre message"><?=$contact['message']?></textarea>
|
<textarea name="message" id="message" rows="12" placeholder="Contenu de votre message"><?=$contact['message']?></textarea>
|
||||||
<? if($user->rankIsHigher("registered")) { ?>
|
<!-- Anti-spam -->
|
||||||
|
<?php if($user->rankIsHigher("registered")) { ?>
|
||||||
<input type="hidden" name="captcha" value="-2">
|
<input type="hidden" name="captcha" value="-2">
|
||||||
<input type="submit" name="submit" value="Envoyer">
|
<input type="submit" name="submit" value="Envoyer">
|
||||||
<? }
|
<?php }
|
||||||
else { ?>
|
else { ?>
|
||||||
|
<!-- Required wait -->
|
||||||
<p id="captcha">
|
<p id="captcha">
|
||||||
<input type="hidden" id="captchahidden" name="captcha" value="10">
|
<input type="hidden" id="captchahidden" name="captcha" value="10">
|
||||||
<span id="captchatext">Merci d'attendre <b id="captchasec">10 s</b> avant de pouvoir me contacter.<br>
|
<span id="captchatext">Merci d'attendre <b id="captchasec">10 s</b> avant de pouvoir me contacter.<br>
|
||||||
<small>Ceci me permet de laisser les robots à la porte.</small></span>
|
<small>Ceci me permet de laisser les robots à la porte.</small></span>
|
||||||
<input disabled id="captchasubmit" style="display:none;" type="submit" name="submit" value="Envoyer">
|
<input disabled id="captchasubmit" style="display:none;" type="submit" name="submit" value="Envoyer">
|
||||||
</p>
|
</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<input type="hidden" name="ns" value="<?=$contact['ns']?>"/>
|
<input type="hidden" name="ns" value="<?=$contact['ns']?>"/>
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,12 +1,14 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: homepage -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<!-- Hero image -->
|
||||||
<aside id="indexFullW">
|
<aside id="indexFullW">
|
||||||
<div id="AScontent">
|
<div id="AScontent">
|
||||||
<div id="imglegend">
|
<div id="imglegend">
|
||||||
@@ -15,28 +17,31 @@
|
|||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<?
|
<!-- Load wiki content -->
|
||||||
|
<?php
|
||||||
require_once($config['models_folder']."d.wiki.php");
|
require_once($config['models_folder']."d.wiki.php");
|
||||||
$wikiPage = new Kabano\WikiPage();
|
$wikiPage = new Kabano\WikiPage();
|
||||||
$wikiPage->checkPermalink('index');
|
$wikiPage->checkPermalink('index');
|
||||||
$wikiPage->md2html();
|
$wikiPage->md2html();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
<section id="index">
|
<section id="index">
|
||||||
<h1><?=$wikiPage->name?></h1>
|
<h1><?=$wikiPage->name?></h1>
|
||||||
|
|
||||||
<? if($user->rankIsHigher('moderator')) { ?>
|
<?php if($user->rankIsHigher('moderator')) { ?>
|
||||||
|
<!-- Edit shortcut -->
|
||||||
<span class="subtitle">
|
<span class="subtitle">
|
||||||
<a href="<?=$config['rel_root_folder']?>wiki/index/edit"><i class="fas fa-pencil-alt"></i> Éditer la page</a>
|
<a href="<?=$config['rel_root_folder']?>wiki/index/edit"><i class="fas fa-pencil-alt"></i> Éditer la page</a>
|
||||||
</span>
|
</span>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
<?=$wikiPage->content_html?>
|
<?=$wikiPage->content_html?>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,38 +1,41 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: map view -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
<!-- <div id="advert">En cours de création<span class="dots"><span>.</span><span>.</span><span>.</span></span><br>En attendant je vous recommande <a href="https://www.refuges.info/" target="_blank">refuges.info</a></div>
|
<!-- Map -->
|
||||||
-->
|
|
||||||
<div id="mapid" style="height: 100%;"></div>
|
<div id="mapid" style="height: 100%;"></div>
|
||||||
|
|
||||||
|
<!-- Credits panel -->
|
||||||
<div id="footer-credits" style="display: none;">
|
<div id="footer-credits" style="display: none;">
|
||||||
<i class="fa fa-times close-link" aria-hidden="true"></i>
|
<i class="fa fa-times close-link" aria-hidden="true"></i>
|
||||||
<p><i id="map-credits"></i></p>
|
<p><i id="map-credits"></i></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Legend panel -->
|
||||||
<div id="footer-legend" style="display: none;">
|
<div id="footer-legend" style="display: none;">
|
||||||
<i class="fa fa-times close-link" aria-hidden="true"></i>
|
<i class="fa fa-times close-link" aria-hidden="true"></i>
|
||||||
<? foreach($poi_types as $type) { ?>
|
<?php foreach($poi_types as $type) { ?>
|
||||||
<span class="legend_item"><img src="<?=$config['views_url']?>img/<?=$type[3]?>.svg" class="poi_icon"> <?=$type[1]?></span>
|
<span class="legend_item"><img src="<?=$config['views_url']?>img/<?=$type[3]?>.svg" class="poi_icon"> <?=$type[1]?></span>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
|
<!-- Map configuration -->
|
||||||
<script>
|
<script>
|
||||||
var root = "<?=$config['rel_root_folder']?>";
|
var root = "<?=$config['rel_root_folder']?>";
|
||||||
|
|
||||||
// Icônes des POIs (déjà présentes dans ton système)
|
// POI icons
|
||||||
window.poi_icons = {
|
window.poi_icons = {
|
||||||
<? foreach($poi_types as $type) { ?>
|
<?php foreach($poi_types as $type) { ?>
|
||||||
"<?=$type[3]?>": "<?=$config['views_url']?>img/<?=$type[3]?>.svg",
|
"<?=$type[3]?>": "<?=$config['views_url']?>img/<?=$type[3]?>.svg",
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
"default": "<?=$config['views_url']?>img/default.svg"
|
"default": "<?=$config['views_url']?>img/default.svg"
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@@ -1,32 +1,39 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: point of interest editor -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<!-- Map canvas -->
|
||||||
<div id="mapid"></div>
|
<div id="mapid"></div>
|
||||||
|
|
||||||
|
<!-- POI form panel -->
|
||||||
<div id="sticky">
|
<div id="sticky">
|
||||||
<section>
|
<section>
|
||||||
<i id="slide-icon" class="fas fa-chevron-up"></i>
|
<i id="slide-icon" class="fas fa-chevron-up"></i>
|
||||||
<? if(isset($new) AND $new==1) { ?>
|
<?php if(isset($new) AND $new==1) { ?>
|
||||||
|
<!-- Create POI -->
|
||||||
<form class="form" action="<?=$config['rel_root_folder']?>poi/new" method="post">
|
<form class="form" action="<?=$config['rel_root_folder']?>poi/new" method="post">
|
||||||
<? }
|
<?php }
|
||||||
else { ?>
|
else { ?>
|
||||||
|
<!-- Update POI -->
|
||||||
<form class="form" action="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/edit" method="post">
|
<form class="form" action="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/edit" method="post">
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
|
<!-- Basic fields -->
|
||||||
<h1 class="flex_line">
|
<h1 class="flex_line">
|
||||||
<input type="text" value="<?=$poi->name?>" name="name" id="name" placeholder="Nom de l'hébergement" required>
|
<input type="text" value="<?=$poi->name?>" name="name" id="name" placeholder="Nom de l'hébergement" required>
|
||||||
<select name="locale" id="locale">
|
<select name="locale" id="locale">
|
||||||
<? foreach($locales->objs as $locale) { ?>
|
<?php foreach($locales->objs as $locale) { ?>
|
||||||
<option <?=$poi->locale==$locale->name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option>
|
<option <?=$poi->locale==$locale->name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
<!-- Location fields -->
|
||||||
<div class="flex_line">
|
<div class="flex_line">
|
||||||
<input type="number" class="noarrow" step="any" value="<?=$poi->lat?>" name="lat" id="lat" placeholder="Latitude" required>
|
<input type="number" class="noarrow" step="any" value="<?=$poi->lat?>" name="lat" id="lat" placeholder="Latitude" required>
|
||||||
<input type="number" class="noarrow" step="any" value="<?=$poi->lon?>" name="lon" id="lon" placeholder="Longitude" required>
|
<input type="number" class="noarrow" step="any" value="<?=$poi->lon?>" name="lon" id="lon" placeholder="Longitude" required>
|
||||||
@@ -34,14 +41,16 @@
|
|||||||
<div id="elevation_icon" style="display:none;" title="Calculer l'altitude"><i class="fas fa-search-location"></i></div>
|
<div id="elevation_icon" style="display:none;" title="Calculer l'altitude"><i class="fas fa-search-location"></i></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Type selector -->
|
||||||
<div class="flex_line" id="type_selector">
|
<div class="flex_line" id="type_selector">
|
||||||
<? foreach($poi_types as $type) { ?>
|
<?php foreach($poi_types as $type) { ?>
|
||||||
<input type="radio" name="poi_type" value="<?=$type[3]?>" id="<?=$type[3]?>" required
|
<input type="radio" name="poi_type" value="<?=$type[3]?>" id="<?=$type[3]?>" required
|
||||||
<?=$poi->poi_type == $type[3] ? 'checked' : ''?>>
|
<?=$poi->poi_type == $type[3] ? 'checked' : ''?>>
|
||||||
<label for="<?=$type[3]?>"><img src="<?=$config['views_url']?>img/<?=$type[3]?>.svg"><br><?=$type[0]?></label>
|
<label for="<?=$type[3]?>"><img src="<?=$config['views_url']?>img/<?=$type[3]?>.svg"><br><?=$type[0]?></label>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Dynamic form data -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<?php
|
<?php
|
||||||
$poi_params = $poi->parameters ?? new stdClass();
|
$poi_params = $poi->parameters ?? new stdClass();
|
||||||
@@ -53,10 +62,10 @@ var current_poi_type = "<?= $poi->poi_type ?>";
|
|||||||
var unsaved = false;
|
var unsaved = false;
|
||||||
|
|
||||||
// Stocke les abstracts et les squelettes de formulaire
|
// Stocke les abstracts et les squelettes de formulaire
|
||||||
<? foreach($poi_types as $type) { ?>
|
<?php foreach($poi_types as $type) { ?>
|
||||||
window["<?=$type[3]?>_abstract"] = "<?=$type[4]?>";
|
window["<?=$type[3]?>_abstract"] = "<?=$type[4]?>";
|
||||||
window["<?=$type[3]?>_jsonform"] = <?=json_encode($type[5])?>;
|
window["<?=$type[3]?>_jsonform"] = <?=json_encode($type[5])?>;
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
|
|
||||||
// 3 états : 0 = non, 1 = intermédiaire, 2 = oui
|
// 3 états : 0 = non, 1 = intermédiaire, 2 = oui
|
||||||
function update3State(id) {
|
function update3State(id) {
|
||||||
@@ -184,16 +193,20 @@ $(document).ready(function(){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<!-- Type description -->
|
||||||
<p id="abstract"></p>
|
<p id="abstract"></p>
|
||||||
|
<!-- Dynamic fields -->
|
||||||
<div id="specific_form"></div>
|
<div id="specific_form"></div>
|
||||||
|
|
||||||
<? if(isset($new) AND $new==1) { ?>
|
<?php if(isset($new) AND $new==1) { ?>
|
||||||
|
<!-- Permalink -->
|
||||||
<div id="permalink_container">
|
<div id="permalink_container">
|
||||||
<label id="permalink_label" for="permalink"><?=$config['web_root_folder']?>poi/</label>
|
<label id="permalink_label" for="permalink"><?=$config['web_root_folder']?>poi/</label>
|
||||||
<input type="text" name="permalink" id="permalink" placeholder="URL" required>
|
<input type="text" name="permalink" id="permalink" placeholder="URL" required>
|
||||||
</div>
|
</div>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
<!-- Permalink generation -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$( "#name" ).keyup(function() {
|
$( "#name" ).keyup(function() {
|
||||||
permalink = $( "#name" ).val();
|
permalink = $( "#name" ).val();
|
||||||
@@ -213,28 +226,31 @@ $( "#name" ).change(function() {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<!-- Form submission -->
|
||||||
<input name="submit" id="submit" type="submit" value="<?= isset($new) && $new == 1 ? "Ajouter l'hébergement" : "Mettre à jour l'hébergement" ?>">
|
<input name="submit" id="submit" type="submit" value="<?= isset($new) && $new == 1 ? "Ajouter l'hébergement" : "Mettre à jour l'hébergement" ?>">
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<script>
|
<!-- Map variables -->
|
||||||
<? if($poi->lat != null && $poi->lon != null) { ?>
|
<script>
|
||||||
|
<?php if($poi->lat != null && $poi->lon != null) { ?>
|
||||||
var poi_lat = <?=$poi->lat?>;
|
var poi_lat = <?=$poi->lat?>;
|
||||||
var poi_lon = <?=$poi->lon?>;
|
var poi_lon = <?=$poi->lon?>;
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
var poi_type = "<?=$poi->poi_type?>";
|
var poi_type = "<?=$poi->poi_type?>";
|
||||||
var is_new = <?= isset($new) && $new == 1 ? "true" : "false" ?>;
|
var is_new = <?= isset($new) && $new == 1 ? "true" : "false" ?>;
|
||||||
var root = "<?=$config['rel_root_folder']?>";
|
var root = "<?=$config['rel_root_folder']?>";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Scroll helper -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$( "#slide-icon" ).click(function() {
|
$( "#slide-icon" ).click(function() {
|
||||||
$( "html, body" ).animate({scrollTop: "300px"});
|
$( "html, body" ).animate({scrollTop: "300px"});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
311
public/views/d.poi.view.html
Normal file
@@ -0,0 +1,311 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: point of interest view -->
|
||||||
|
<html lang="fr">
|
||||||
|
|
||||||
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$isArchiveOrPrivate = $poi->is_archive == "t" || $poi->is_public == "f";
|
||||||
|
$canViewHistory = $user->rankIsHigher('premium');
|
||||||
|
$canModerate = $user->rankIsHigher('moderator');
|
||||||
|
$canWriteComment = $user->rankIsHigher("registered");
|
||||||
|
$canOpenCommentForm = $canWriteComment && !$isArchiveOrPrivate;
|
||||||
|
$hasHistory = isset($PoiHistory);
|
||||||
|
$isVisitor = $user->rank == "visitor";
|
||||||
|
$isCommentable = $poi->is_commentable == 't';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- Map canvas -->
|
||||||
|
<div id="mapid"></div>
|
||||||
|
|
||||||
|
<!-- POI details panel -->
|
||||||
|
<div id="sticky">
|
||||||
|
<section <?=$isArchiveOrPrivate ? 'class="archive"' : ''?>>
|
||||||
|
<i id="slide-icon" class="fas fa-chevron-up"></i>
|
||||||
|
|
||||||
|
<!-- POI header -->
|
||||||
|
<h1 class="flex_line">
|
||||||
|
<span class="poi-icon-wrapper" data-tooltip="<?=htmlspecialchars($poi_types[$poi->poi_type][4] ?? '')?>">
|
||||||
|
<img class="poi-icon"
|
||||||
|
src="<?=$config['rel_root_folder']?>views/img/<?=$poi->poi_type?>.svg"
|
||||||
|
alt="">
|
||||||
|
</span>
|
||||||
|
<span><?=$poi->name?></span>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<!-- POI card -->
|
||||||
|
<div class="poi-idcard">
|
||||||
|
|
||||||
|
<div class="poi-id-main">
|
||||||
|
<div class="poi-id-coords">
|
||||||
|
<span class="poi-id-label">📍 Coordonnées</span>
|
||||||
|
<a href="geo:<?=$poi->lat?>,<?=$poi->lon?>" class="poi-id-value">
|
||||||
|
<?=$poi->lat?>, <?=$poi->lon?>
|
||||||
|
</a>
|
||||||
|
<?php if ($poi->ele !== null && $poi->ele !== '') { ?>
|
||||||
|
<span class="poi-id-elev">⛰️ <?=$poi->ele?> m</span>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="poi-id-type">
|
||||||
|
<span class="poi-id-label">🏷️ Type</span>
|
||||||
|
<span class="poi-id-value">
|
||||||
|
<?=$poi_types[$poi->poi_type][1] ?? $poi->poi_type?>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="poi-id-dates">
|
||||||
|
<span>Créé : <?=$poi->creation_date?></span>
|
||||||
|
<span>Mis à jour : <?=$poi->update_date?></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if ($canViewHistory) { ?>
|
||||||
|
<!-- History and actions -->
|
||||||
|
<span class="subtitle">
|
||||||
|
<?php if ($hasHistory) { ?>
|
||||||
|
<select id="PoiHistory">
|
||||||
|
<?php $historyIndex = 0; ?>
|
||||||
|
<?php foreach ($PoiHistory->objs as $row) { ?>
|
||||||
|
<?php
|
||||||
|
$isSelected = $row->version_id == $poi->version_id ? 'selected' : '';
|
||||||
|
$isActive = $row->is_archive == "f" ? '• ' : '';
|
||||||
|
$formattedDate = datefmt_format(
|
||||||
|
$user->datetimeshort_format,
|
||||||
|
date_create($row->update_date, new DateTimeZone("UTC"))
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<option <?=$isSelected?> value="<?=$historyIndex?>"><?=$isActive?><?=$formattedDate?></option>
|
||||||
|
<?php $historyIndex++; ?>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
<?php }
|
||||||
|
if ($canModerate && $hasHistory) { ?>
|
||||||
|
—
|
||||||
|
<?php }
|
||||||
|
if ($canModerate) { ?>
|
||||||
|
<a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/edit"><i class="fas fa-pencil-alt"></i> Éditer le point</a> —
|
||||||
|
<?php if ($poi->is_public == 't') { ?>
|
||||||
|
<a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/delete"><i class="fas fa-trash"></i> Effacer le point</a>
|
||||||
|
<?php } else { ?>
|
||||||
|
<a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/restore"><i class="fas fa-eye"></i> Restaurer le point</a>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
</span>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$poiFields = $poi_types[$poi->poi_type][5];
|
||||||
|
$poiValues = $poi->parameters ?? [];
|
||||||
|
|
||||||
|
// Séparer les booléens des autres champs
|
||||||
|
$boolFields = [];
|
||||||
|
$otherFields = [];
|
||||||
|
|
||||||
|
foreach ($poiFields as $key => $label) {
|
||||||
|
if ($key[0] === 'b') {
|
||||||
|
$boolFields[$key] = $label;
|
||||||
|
} else {
|
||||||
|
$otherFields[$key] = $label;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="specific_form" class="view-mode">
|
||||||
|
<!-- Detail fields -->
|
||||||
|
<?php foreach ($otherFields as $key => $label): ?>
|
||||||
|
<?php
|
||||||
|
$value = $poiValues[$key] ?? null;
|
||||||
|
$type = $key[0];
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="field field-<?= $type ?>">
|
||||||
|
<label><?= $label ?></label>
|
||||||
|
|
||||||
|
<?php if ($type === 'n'): ?>
|
||||||
|
<span class="inline-value"><?= $value !== null ? $value : "<em>—</em>" ?></span>
|
||||||
|
|
||||||
|
<?php elseif ($type === 't'): ?>
|
||||||
|
<div class="field-value">
|
||||||
|
<?= $value ? nl2br(htmlspecialchars($value)) : "<em>Aucune information.</em>" ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php elseif ($type === 'l'): ?>
|
||||||
|
<span class="inline-value">
|
||||||
|
<?php if ($value): ?>
|
||||||
|
<a href="<?= htmlspecialchars($value) ?>" target="_blank"><?= $value ?></a>
|
||||||
|
<?php else: ?>
|
||||||
|
<em>—</em>
|
||||||
|
<?php endif; ?>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
<!-- Boolean grid -->
|
||||||
|
<?php if (!empty($boolFields)): ?>
|
||||||
|
<?php
|
||||||
|
$boolIcons = [
|
||||||
|
0 => "<span class='boolean-pill boolean-no'>❌</span>",
|
||||||
|
1 => "<span class='boolean-pill boolean-maybe'>❓</span>",
|
||||||
|
2 => "<span class='boolean-pill boolean-yes'>✔️</span>",
|
||||||
|
-1 => "<span class='boolean-pill boolean-unknown'>➖</span>"
|
||||||
|
];
|
||||||
|
?>
|
||||||
|
<div class="bool-grid">
|
||||||
|
|
||||||
|
<!-- Boolean labels -->
|
||||||
|
<div class="bool-row labels">
|
||||||
|
<?php foreach ($boolFields as $key => $label): ?>
|
||||||
|
<div class="bool-label"><?= $label ?></div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Boolean values -->
|
||||||
|
<div class="bool-row values">
|
||||||
|
<?php foreach ($boolFields as $key => $label): ?>
|
||||||
|
<?php
|
||||||
|
$value = $poiValues[$key] ?? 2;
|
||||||
|
$icon = $boolIcons[$value];
|
||||||
|
?>
|
||||||
|
<div class="bool-cell">
|
||||||
|
<?= $icon ?>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<?php if ($isCommentable) { ?>
|
||||||
|
<!-- Comments -->
|
||||||
|
<div id="new_comment">
|
||||||
|
<form class="form" action="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/new_comment" method="post">
|
||||||
|
<div id="new_comment_label" <?=$isVisitor ? "class='sent' " : ""?>>
|
||||||
|
<?php if ($isArchiveOrPrivate) { ?>
|
||||||
|
<p>Impossible de commenter un point non publié</p>
|
||||||
|
<?php } else if ($canWriteComment) { ?>
|
||||||
|
<input name="submit" type="submit" value="Envoyer">
|
||||||
|
<p>Ajouter un nouveau commentaire</p>
|
||||||
|
<?php } else { ?>
|
||||||
|
<p>Veuillez vous connecter pour ajouter un commentaire</p>
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
<div id="new_comment_form">
|
||||||
|
<textarea id="comment" name="comment" rows="5" placeholder="Votre commentaire"></textarea>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if (isset($poi_comments) && $poi_comments->number > 0) { ?>
|
||||||
|
<!-- Comment list -->
|
||||||
|
<div id="comments">
|
||||||
|
<?php foreach ($poi_comments->objs as $comment) { ?>
|
||||||
|
<?php $canManageComment = $canModerate || $user->id == $comment->author; ?>
|
||||||
|
<article <?php if($comment->is_archive == 't' || $comment->is_public == 'f') echo 'class="comment_archive" '; ?>>
|
||||||
|
<div class="comment_title">
|
||||||
|
|
||||||
|
<?php if ($comment->author_obj->is_avatar_present == 't') { ?>
|
||||||
|
<img alt="Avatar" class="icon avatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$comment->author_obj->id?>_s.jpg">
|
||||||
|
<?php } else { ?>
|
||||||
|
<i class="icon fas fa-user-secret"></i>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ($user->rankIsHigher("blocked")) { ?>
|
||||||
|
<a class="username" href="<?=$config['rel_root_folder']?>user/p/<?=$comment->author_obj->id?>">
|
||||||
|
<?=$comment->author_obj->name?>
|
||||||
|
</a>
|
||||||
|
<?php } else { ?>
|
||||||
|
<?=$comment->author_obj->name?>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
le <?php echo datefmt_format($user->datetime_format, date_create($comment->update_date, new DateTimeZone("UTC"))) ?>
|
||||||
|
|
||||||
|
<?php if ($canManageComment && $comment->is_public == 't') { ?>
|
||||||
|
<span class="delete_link">
|
||||||
|
<a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/delete_comment/<?=$comment->id?>">
|
||||||
|
<i class="fas fa-trash"></i> Effacer le commentaire
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ($canManageComment && $comment->is_public == 'f') { ?>
|
||||||
|
<span class="delete_link">
|
||||||
|
<a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/restore_comment/<?=$comment->id?>">
|
||||||
|
<i class="fas fa-eye"></i> Restaurer le commentaire
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="comment_content">
|
||||||
|
<?=$comment->comment_html?>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
<br></div>
|
||||||
|
<?php } else { ?>
|
||||||
|
<p>Aucun commentaire pour le moment.</p>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Map variables -->
|
||||||
|
<script>
|
||||||
|
var poi_lat = <?=$poi->lat?>;
|
||||||
|
var poi_lon = <?=$poi->lon?>;
|
||||||
|
var poi_type = "<?=$poi->poi_type?>";
|
||||||
|
var poi_mode = "view";
|
||||||
|
var root = "<?=$config['rel_root_folder']?>";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php if ($canViewHistory) { ?>
|
||||||
|
<!-- History selector -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( "#PoiHistory" ).change(function() {
|
||||||
|
window.location.href = "<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/"+$( this ).val();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ($canOpenCommentForm) { ?>
|
||||||
|
<!-- Comment form toggle -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( "#new_comment_label" ).click(function() {
|
||||||
|
$( "#new_comment_form" ).show(400);
|
||||||
|
$( "#new_comment_label input" ).show(0);
|
||||||
|
$( "#new_comment_label").addClass('sent');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<!-- Scroll helper -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( "#slide-icon" ).click(function() {
|
||||||
|
$( "html, body" ).animate({scrollTop: "300px"});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,24 +1,27 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: user login -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h1>Connexion</h1>
|
<h1>Connexion</h1>
|
||||||
|
<!-- Login form -->
|
||||||
<form class="form" action="<?=$config['rel_root_folder']?>user/login" method="post" id="login">
|
<form class="form" action="<?=$config['rel_root_folder']?>user/login" method="post" id="login">
|
||||||
<? if(isset($_GET['error']) AND $_GET['error']==1) { ?>
|
<!-- Status messages -->
|
||||||
|
<?php if(isset($_GET['error']) AND $_GET['error']==1) { ?>
|
||||||
<p style="color: red;">Erreur lors de la connexion, merci de réessayer.</p>
|
<p style="color: red;">Erreur lors de la connexion, merci de réessayer.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if(isset($_GET['status']) AND $_GET['status']=="created") { ?>
|
<?php if(isset($_GET['status']) AND $_GET['status']=="created") { ?>
|
||||||
<p style="color: #006600;">Votre compte a été créé, vous pouvez vous connecter.</p>
|
<p style="color: #006600;">Votre compte a été créé, vous pouvez vous connecter.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if(isset($_GET['status']) AND $_GET['status']=="password_sent") { ?>
|
<?php if(isset($_GET['status']) AND $_GET['status']=="password_sent") { ?>
|
||||||
<p style="color: #006600;">Un nouveau mot de passe vous a été envoyé par mail.</p>
|
<p style="color: #006600;">Un nouveau mot de passe vous a été envoyé par mail.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<input type="text" name="login" id="login" placeholder="Nom d'utilisateur">
|
<input type="text" name="login" id="login" placeholder="Nom d'utilisateur">
|
||||||
<input type="password" name="password" id="password" placeholder="Mot de passe">
|
<input type="password" name="password" id="password" placeholder="Mot de passe">
|
||||||
<input type="submit" name="submit" value="Se connecter">
|
<input type="submit" name="submit" value="Se connecter">
|
||||||
@@ -28,7 +31,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,12 +1,14 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: member list -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<!-- Member table -->
|
||||||
<section id="member_list">
|
<section id="member_list">
|
||||||
<h1>Liste des membres</h1>
|
<h1>Liste des membres</h1>
|
||||||
<p class="subtitle">Membres <?=$first?> à <?=$last?> sur les <?=$users->number?> inscrits</p>
|
<p class="subtitle">Membres <?=$first?> à <?=$last?> sur les <?=$users->number?> inscrits</p>
|
||||||
@@ -34,37 +36,37 @@
|
|||||||
<?=$orderby=='website'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
<?=$orderby=='website'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<? foreach ($users->objs as $row) { ?>
|
<?php foreach ($users->objs as $row) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<? if ($row->is_avatar_present=='t') { ?>
|
<?php if ($row->is_avatar_present=='t') { ?>
|
||||||
<img alt="Avatar" class="icon avatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$row->id?>_s.jpg">
|
<img alt="Avatar" class="icon avatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$row->id?>_s.jpg">
|
||||||
<? } else { ?>
|
<?php } else { ?>
|
||||||
<i class="icon fas fa-user-secret"></i>
|
<i class="icon fas fa-user-secret"></i>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<a class="username" href="<?=$config['rel_root_folder']?>user/p/<?=$row->id?>"><?=$row->name?></a>
|
<a class="username" href="<?=$config['rel_root_folder']?>user/p/<?=$row->id?>"><?=$row->name?></a>
|
||||||
</td>
|
</td>
|
||||||
<td><?=$row->get_rank()?></td>
|
<td><?=$row->get_rank()?></td>
|
||||||
<td><? echo datefmt_format($user->date_format,date_create($row->register_date, new DateTimeZone("UTC"))) ?></td>
|
<td><?php echo datefmt_format($user->date_format,date_create($row->register_date, new DateTimeZone("UTC"))) ?></td>
|
||||||
<td><? echo datefmt_format($user->date_format,date_create($row->visit_date, new DateTimeZone("UTC"))) ?></td>
|
<td><?php echo datefmt_format($user->date_format,date_create($row->visit_date, new DateTimeZone("UTC"))) ?></td>
|
||||||
<td>
|
<td>
|
||||||
<? if ($row->website != "") { ?>
|
<?php if ($row->website != "") { ?>
|
||||||
<a target="_blank" href="<?=$row->website?>">Site internet <span class="external-link"><i class="fas fa-external-link-alt"></i></span></a>
|
<a target="_blank" href="<?=$row->website?>">Site internet <span class="external-link"><i class="fas fa-external-link-alt"></i></span></a>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="pagebuttons">
|
<div class="pagebuttons">
|
||||||
<? if ($page != 0) { ?><a class="previous" href="<?=$config['rel_root_folder']?>user/member_list/<?=$page?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fas fa-chevron-left fa-fw"></i></a><? }
|
<?php if ($page != 0) { ?><a class="previous" href="<?=$config['rel_root_folder']?>user/member_list/<?=$page?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fas fa-chevron-left fa-fw"></i></a><?php }
|
||||||
if (($page+1)*$rows_per_pages < $users->number) { ?><a class="next" href="<?=$config['rel_root_folder']?>user/member_list/<?=$page+2?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fas fa-chevron-right fa-fw"></i></a><? } ?>
|
if (($page+1)*$rows_per_pages < $users->number) { ?><a class="next" href="<?=$config['rel_root_folder']?>user/member_list/<?=$page+2?>?orderby=<?=$orderby?>&order=<?=$order?>"><i class="fas fa-chevron-right fa-fw"></i></a><?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,24 +1,26 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: password reset -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h1>Envoi d'un mot de passe</h1>
|
<h1>Envoi d'un mot de passe</h1>
|
||||||
|
<!-- Reset form -->
|
||||||
<form class="form" action="<?=$config['rel_root_folder']?>user/password_lost" method="post" id="password_lodt">
|
<form class="form" action="<?=$config['rel_root_folder']?>user/password_lost" method="post" id="password_lodt">
|
||||||
<? if(isset($_GET['error']) AND $_GET['error']==1) { ?>
|
<?php if(isset($_GET['error']) AND $_GET['error']==1) { ?>
|
||||||
<p style="color: red;">Cette adresse mail n'existe pas.</p>
|
<p style="color: red;">Cette adresse mail n'existe pas.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<input type="email" name="email" id="email" placeholder="Adresse mail">
|
<input type="email" name="email" id="email" placeholder="Adresse mail">
|
||||||
<input type="submit" name="submit" value="Envoyer un nouveau mot de passe">
|
<input type="submit" name="submit" value="Envoyer un nouveau mot de passe">
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,25 +1,29 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: profile editor -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<!-- Profile form -->
|
||||||
<section id="profile">
|
<section id="profile">
|
||||||
<? if ($userProfile->id != 0) { ?>
|
<?php if ($userProfile->id != 0) { ?>
|
||||||
<h1><?=$userProfile->name?></h1>
|
<h1><?=$userProfile->name?></h1>
|
||||||
<article>
|
<article>
|
||||||
<? if(isset($nameError) AND $nameError==1) { ?>
|
<!-- Status messages -->
|
||||||
|
<?php if(isset($nameError) AND $nameError==1) { ?>
|
||||||
<p style="color: #660000;">Veuillez choisir un autre nom d'utilisateur.</p>
|
<p style="color: #660000;">Veuillez choisir un autre nom d'utilisateur.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if(isset($emailError) AND $emailError==1) { ?>
|
<?php if(isset($emailError) AND $emailError==1) { ?>
|
||||||
<p style="color: #660000;">Veuillez choisir un autre email.</p>
|
<p style="color: #660000;">Veuillez choisir un autre email.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if(isset($updated) AND $updated==1) { ?>
|
<?php if(isset($updated) AND $updated==1) { ?>
|
||||||
<p style="color: #006600;">Le profil a été mis à jour.</p>
|
<p style="color: #006600;">Le profil a été mis à jour.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
|
<!-- Profile fields -->
|
||||||
<form action="<?=$config['rel_root_folder']?>user/p/<?=$userProfile->id?>/edit" method="post" class="edituser" enctype="multipart/form-data">
|
<form action="<?=$config['rel_root_folder']?>user/p/<?=$userProfile->id?>/edit" method="post" class="edituser" enctype="multipart/form-data">
|
||||||
<aside class="<?=$userProfile->is_avatar_present=='t'?'':'no'?>avatar">
|
<aside class="<?=$userProfile->is_avatar_present=='t'?'':'no'?>avatar">
|
||||||
<div id="picturebuttonscontainer">
|
<div id="picturebuttonscontainer">
|
||||||
@@ -43,25 +47,25 @@
|
|||||||
<li><label for="password">Mot de passe :</label><input name="password" id="password" type="password" placeholder="Nouveau mot de passe"></li>
|
<li><label for="password">Mot de passe :</label><input name="password" id="password" type="password" placeholder="Nouveau mot de passe"></li>
|
||||||
<li><label for="locale">Langue :</label>
|
<li><label for="locale">Langue :</label>
|
||||||
<select name="locale" id="locale">
|
<select name="locale" id="locale">
|
||||||
<? foreach($locales->objs as $locale) { ?>
|
<?php foreach($locales->objs as $locale) { ?>
|
||||||
<option <?=$userProfile->get_locale()==$locale->display_name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option>
|
<option <?=$userProfile->get_locale()==$locale->display_name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</select></li>
|
</select></li>
|
||||||
<li><label for="timezone">Fuseau horaire :</label>
|
<li><label for="timezone">Fuseau horaire :</label>
|
||||||
<select name="timezone" id="timezone">
|
<select name="timezone" id="timezone">
|
||||||
<? $timezones = timezone_identifiers_list();
|
<?php $timezones = timezone_identifiers_list();
|
||||||
foreach($timezones as $timezone) { ?>
|
foreach($timezones as $timezone) { ?>
|
||||||
<option <?=$userProfile->timezone==$timezone?'selected':''?> value="<?=$timezone?>"><?=$timezone?></option>
|
<option <?=$userProfile->timezone==$timezone?'selected':''?> value="<?=$timezone?>"><?=$timezone?></option>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</select></li>
|
</select></li>
|
||||||
<? if($user->rankIsHigher("administrator")) { ?>
|
<?php if($user->rankIsHigher("administrator")) { ?>
|
||||||
<li><label for="rank">Rang : </label>
|
<li><label for="rank">Rang : </label>
|
||||||
<select name="rank" id="rank">
|
<select name="rank" id="rank">
|
||||||
<? foreach($ranks as $rank) { ?>
|
<?php foreach($ranks as $rank) { ?>
|
||||||
<option <?=$userProfile->rank==$rank[3]?'selected':''?> value="<?=$rank[3]?>"><?=$rank[1]?></option>
|
<option <?=$userProfile->rank==$rank[3]?'selected':''?> value="<?=$rank[3]?>"><?=$rank[1]?></option>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</select></li>
|
</select></li>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<li><label for="website">Site internet :</label><input name="website" id="website" type="url" value="<?=$userProfile->website?>" placeholder="https://mountain.org"></li>
|
<li><label for="website">Site internet :</label><input name="website" id="website" type="url" value="<?=$userProfile->website?>" placeholder="https://mountain.org"></li>
|
||||||
|
|
||||||
<input name="submit" id="submit" type="submit" value="Envoyer">
|
<input name="submit" id="submit" type="submit" value="Envoyer">
|
||||||
@@ -70,12 +74,12 @@
|
|||||||
<div style="clear:both;"></div>
|
<div style="clear:both;"></div>
|
||||||
</form>
|
</form>
|
||||||
</article>
|
</article>
|
||||||
<? } else { ?>
|
<?php } else { ?>
|
||||||
<p style="color:red;">Le profil demandé n'existe pas.</p>
|
<p style="color:red;">Le profil demandé n'existe pas.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,66 +1,70 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: user profile -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
<section id="profile">
|
<section id="profile">
|
||||||
<? if ($userProfile->id != 0) { ?>
|
<?php if ($userProfile->id != 0) { ?>
|
||||||
|
<!-- Profile header -->
|
||||||
<h1><?=$userProfile->name?></h1>
|
<h1><?=$userProfile->name?></h1>
|
||||||
<? if($user->rankIsHigher("moderator") || $user->id == $userProfile->id) { ?>
|
<?php if($user->rankIsHigher("moderator") || $user->id == $userProfile->id) { ?>
|
||||||
<a class="subtitle" id="editprofile" href="<?=$config['rel_root_folder']?>user/p/<?=$userProfile->id?>/edit"><i class="fas fa-pencil-alt"></i> Éditer les paramètres du compte</a>
|
<a class="subtitle" id="editprofile" href="<?=$config['rel_root_folder']?>user/p/<?=$userProfile->id?>/edit"><i class="fas fa-pencil-alt"></i> Éditer les paramètres du compte</a>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<article>
|
<article>
|
||||||
|
<!-- Profile info -->
|
||||||
<div id="profilepart">
|
<div id="profilepart">
|
||||||
<? if(isset($mailsent) AND $mailsent==1) { ?>
|
<?php if(isset($mailsent) AND $mailsent==1) { ?>
|
||||||
<p style="color: #006600;">Le message a bien été envoyé.</p>
|
<p style="color: #006600;">Le message a bien été envoyé.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<aside class="<?=$userProfile->is_avatar_present=='t'?'':'no'?>avatar">
|
<aside class="<?=$userProfile->is_avatar_present=='t'?'':'no'?>avatar">
|
||||||
<img alt="Avatar" id="profileavatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$userProfile->id?>_p.jpg" alt="Profile picture">
|
<img alt="Avatar" id="profileavatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$userProfile->id?>_p.jpg" alt="Profile picture">
|
||||||
<i id="profilenoavatar" class="fas fa-user-secret"></i>
|
<i id="profilenoavatar" class="fas fa-user-secret"></i>
|
||||||
</aside>
|
</aside>
|
||||||
<div id="description">
|
<div id="description">
|
||||||
<p>Langue : <?=$userProfile->get_locale()?></p>
|
<p>Langue : <?=$userProfile->get_locale()?></p>
|
||||||
<p>Inscrit le <? echo datefmt_format($user->datetime_format,date_create($userProfile->register_date, new DateTimeZone("UTC"))) ?></p>
|
<p>Inscrit le <?php echo datefmt_format($user->datetime_format,date_create($userProfile->register_date, new DateTimeZone("UTC"))) ?></p>
|
||||||
<p>Dernière connexion le <? echo datefmt_format($user->datetime_format,date_create($userProfile->visit_date, new DateTimeZone("UTC"))) ?></p>
|
<p>Dernière connexion le <?php echo datefmt_format($user->datetime_format,date_create($userProfile->visit_date, new DateTimeZone("UTC"))) ?></p>
|
||||||
<p><?=$userProfile->get_rank()?></p>
|
<p><?=$userProfile->get_rank()?></p>
|
||||||
<p>
|
<p>
|
||||||
<? if ($userProfile->website != "") { ?>
|
<?php if ($userProfile->website != "") { ?>
|
||||||
<a target="_blank" href="<?=$userProfile->website?>">Site internet <span class="external-link"><i class="fas fa-external-link-alt"></i></span></a>
|
<a target="_blank" href="<?=$userProfile->website?>">Site internet <span class="external-link"><i class="fas fa-external-link-alt"></i></span></a>
|
||||||
<? }
|
<?php }
|
||||||
if ($userProfile->website != "" AND $userProfile->id != $user->id) { ?>
|
if ($userProfile->website != "" AND $userProfile->id != $user->id) { ?>
|
||||||
—
|
—
|
||||||
<? }
|
<?php }
|
||||||
if ($userProfile->id != $user->id) { ?>
|
if ($userProfile->id != $user->id) { ?>
|
||||||
<a href="#" onclick="$('#profilepart').hide(0, function(){$('#contact').show('fast');});">Contacter par mail</a>
|
<a href="#" onclick="$('#profilepart').hide(0, function(){$('#contact').show('fast');});">Contacter par mail</a>
|
||||||
<? }
|
<?php }
|
||||||
if ($user->rankIsHigher("premium") AND ($userProfile->website != "" OR $userProfile->id != $user->id)) { ?>
|
if ($user->rankIsHigher("premium") AND ($userProfile->website != "" OR $userProfile->id != $user->id)) { ?>
|
||||||
—
|
—
|
||||||
<? }
|
<?php }
|
||||||
if ($user->rankIsHigher("premium")) { ?>
|
if ($user->rankIsHigher("premium")) { ?>
|
||||||
<a href="mailto:<?=$userProfile->email?>"><?=$userProfile->email?></a>
|
<a href="mailto:<?=$userProfile->email?>"><?=$userProfile->email?></a>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div style="clear:both;"></div>
|
<div style="clear:both;"></div>
|
||||||
</div>
|
</div>
|
||||||
<? if ($userProfile->id != $user->id) { ?>
|
<?php if ($userProfile->id != $user->id) { ?>
|
||||||
|
<!-- Contact form -->
|
||||||
<form style="display:none;" class="form" id="contact" action="<?=$config['rel_root_folder']?>user/p/<?=$userProfile->id?>" method="post" >
|
<form style="display:none;" class="form" id="contact" action="<?=$config['rel_root_folder']?>user/p/<?=$userProfile->id?>" method="post" >
|
||||||
<textarea rows="12" name="message" id="message" placeholder="Votre message"></textarea>
|
<textarea rows="12" name="message" id="message" placeholder="Votre message"></textarea>
|
||||||
<p><i>Votre adresse email sera transmise à votre destinataire.</i></p>
|
<p><i>Votre adresse email sera transmise à votre destinataire.</i></p>
|
||||||
<input type="submit" name="submit" value="Envoyer">
|
<input type="submit" name="submit" value="Envoyer">
|
||||||
</form>
|
</form>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</article>
|
</article>
|
||||||
<? } else { ?>
|
<?php } else { ?>
|
||||||
<p style="color:red;">Le profil demandé n'existe pas.</p>
|
<p style="color:red;">Le profil demandé n'existe pas.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,28 +1,31 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: user signin -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h1>Inscription</h1>
|
<h1>Inscription</h1>
|
||||||
|
<!-- Signup form -->
|
||||||
<form class="form" action="<?=$config['rel_root_folder']?>user/signin" method="post" id="signin">
|
<form class="form" action="<?=$config['rel_root_folder']?>user/signin" method="post" id="signin">
|
||||||
<? if(isset($_GET['error']) AND $_GET['error']=="name") { ?>
|
<!-- Status messages -->
|
||||||
|
<?php if(isset($_GET['error']) AND $_GET['error']=="name") { ?>
|
||||||
<p style="color: red;">Veuillez choisir un autre nom d'utilisateur.</p>
|
<p style="color: red;">Veuillez choisir un autre nom d'utilisateur.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if(isset($_GET['error']) AND $_GET['error']=="email") { ?>
|
<?php if(isset($_GET['error']) AND $_GET['error']=="email") { ?>
|
||||||
<p style="color: red;">Cette adresse mail est déjà prise.</p>
|
<p style="color: red;">Cette adresse mail est déjà prise.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if(isset($_GET['error']) AND $_GET['error']=="empty") { ?>
|
<?php if(isset($_GET['error']) AND $_GET['error']=="empty") { ?>
|
||||||
<p style="color: red;">Merci de remplir tous les champs, il n'y en a que trois.</p>
|
<p style="color: red;">Merci de remplir tous les champs, il n'y en a que trois.</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<? if(isset($_GET['error']) AND $_GET['error']=="captcha") { ?>
|
<?php if(isset($_GET['error']) AND $_GET['error']=="captcha") { ?>
|
||||||
<p style="color: red;">Nous n'avons pas pu vérifier que vous êtes un humain.<br>
|
<p style="color: red;">Nous n'avons pas pu vérifier que vous êtes un humain.<br>
|
||||||
Avez-vous javascript activé et attendu la fin du compte à rebours ?</p>
|
Avez-vous javascript activé et attendu la fin du compte à rebours ?</p>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
<input type="text" name="login" id="login" placeholder="Nom d'utilisateur">
|
<input type="text" name="login" id="login" placeholder="Nom d'utilisateur">
|
||||||
<input type="password" name="password" id="password" placeholder="Mot de passe">
|
<input type="password" name="password" id="password" placeholder="Mot de passe">
|
||||||
<input type="email" name="email" id="email" placeholder="Adresse mail">
|
<input type="email" name="email" id="email" placeholder="Adresse mail">
|
||||||
@@ -35,7 +38,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,19 +1,21 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: wiki editor -->
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
|
|
||||||
<? include('blocks/d.head.html'); ?>
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<? include('blocks/d.nav.html'); ?>
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<!-- Wiki form -->
|
||||||
<section>
|
<section>
|
||||||
<form class="form" action="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/edit" method="post">
|
<form class="form" action="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/edit" method="post">
|
||||||
<h1>
|
<h1>
|
||||||
<select name="locale" id="locale">
|
<select name="locale" id="locale">
|
||||||
<? foreach($locales->objs as $locale) { ?>
|
<?php foreach($locales->objs as $locale) { ?>
|
||||||
<option <?=$wikiPage->locale==$locale->name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option>
|
<option <?=$wikiPage->locale==$locale->name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option>
|
||||||
<? } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
<input type="text" value="<?=$wikiPage->name?>" name="name" id="name" placeholder="Titre">
|
<input type="text" value="<?=$wikiPage->name?>" name="name" id="name" placeholder="Titre">
|
||||||
</h1>
|
</h1>
|
||||||
@@ -24,7 +26,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<? include('blocks/d.footer.html'); ?>
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
78
public/views/d.wiki.view.html
Executable file
@@ -0,0 +1,78 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<!-- Page: wiki view -->
|
||||||
|
<html lang="fr">
|
||||||
|
|
||||||
|
<?php include('blocks/d.head.html'); ?>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php include('blocks/d.nav.html'); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$isArchiveOrPrivate = $wikiPage->is_archive == "t" || $wikiPage->is_public == "f";
|
||||||
|
$canViewHistory = $user->rankIsHigher('premium');
|
||||||
|
$canModerate = $user->rankIsHigher('moderator');
|
||||||
|
$hasHistory = isset($wikiHistory);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- Wiki content -->
|
||||||
|
<section id="wiki_page" <?=$isArchiveOrPrivate ? 'class="archive"' : ''?>>
|
||||||
|
<h1><?=$wikiPage->name?></h1>
|
||||||
|
<?php if ($canViewHistory) { ?>
|
||||||
|
<!-- History and actions -->
|
||||||
|
<span class="subtitle">
|
||||||
|
<?php if ($hasHistory) { ?>
|
||||||
|
<select id="wikihistory">
|
||||||
|
<?php $historyIndex = 0; ?>
|
||||||
|
<?php foreach ($wikiHistory->objs as $row) { ?>
|
||||||
|
<?php
|
||||||
|
$isSelected = $row->version_id == $wikiPage->version_id ? 'selected' : '';
|
||||||
|
$isActive = $row->is_archive == "f" ? '• ' : '';
|
||||||
|
$formattedDate = datefmt_format(
|
||||||
|
$user->datetimeshort_format,
|
||||||
|
date_create($row->update_date, new DateTimeZone("UTC"))
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<option <?=$isSelected?> value="<?=$historyIndex?>"><?=$isActive?><?=$formattedDate?></option>
|
||||||
|
<?php $historyIndex++; ?>
|
||||||
|
<?php } ?>
|
||||||
|
</select>
|
||||||
|
<?php }
|
||||||
|
if ($canModerate && $hasHistory) { ?>
|
||||||
|
—
|
||||||
|
<?php }
|
||||||
|
if ($canModerate) { ?>
|
||||||
|
<a href="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/edit"><i class="fas fa-pencil-alt"></i> Éditer la page</a> —
|
||||||
|
<?php if ($wikiPage->is_public=="t") { ?>
|
||||||
|
<a href="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/delete"><i class="fas fa-trash"></i> Effacer la page</a>
|
||||||
|
<?php } else { ?>
|
||||||
|
<a href="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/restore"><i class="fas fa-eye"></i> Restaurer la page</a>
|
||||||
|
<?php }?>
|
||||||
|
<?php } ?>
|
||||||
|
</span>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<!-- Page body -->
|
||||||
|
<div id="wikiContent">
|
||||||
|
<?=$wikiPage->content_html?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Timestamp -->
|
||||||
|
<p id="wikiTimestamp">Page mise à jour le <?php echo datefmt_format($user->datetime_format,date_create($wikiPage->update_date, new DateTimeZone("UTC"))) ?></p>
|
||||||
|
|
||||||
|
<div style="clear: both;"> </div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php if ($canViewHistory) { ?>
|
||||||
|
<!-- History selector -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$( "#wikihistory" ).change(function() {
|
||||||
|
window.location.href = "<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/"+$( this ).val();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php include('blocks/d.footer.html'); ?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 356 B After Width: | Height: | Size: 356 B |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
@@ -1,4 +1,5 @@
|
|||||||
|
|
||||||
|
// Gestion de l'upload et suppression d'avatar côté client.
|
||||||
$(window).ready(function() {
|
$(window).ready(function() {
|
||||||
$("#deleteavatar").click(function() {
|
$("#deleteavatar").click(function() {
|
||||||
$("aside").removeClass("avatar").addClass("noavatar");
|
$("aside").removeClass("avatar").addClass("noavatar");
|
||||||
@@ -27,6 +28,7 @@ $(window).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Prévisualisation du fichier image dans le profil.
|
||||||
function readURL(input) {
|
function readURL(input) {
|
||||||
if (input.files && input.files[0]) {
|
if (input.files && input.files[0]) {
|
||||||
var reader = new FileReader();
|
var reader = new FileReader();
|
||||||
@@ -37,4 +39,4 @@ function readURL(input) {
|
|||||||
|
|
||||||
reader.readAsDataURL(input.files[0]);
|
reader.readAsDataURL(input.files[0]);
|
||||||
}
|
}
|
||||||
}$
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
|
// Compte à rebours du captcha.
|
||||||
var time = 9;
|
var time = 9;
|
||||||
|
|
||||||
|
// Active le bouton lorsque le délai est écoulé.
|
||||||
$(window).ready(function() {
|
$(window).ready(function() {
|
||||||
var interval = setInterval(function() {
|
var interval = setInterval(function() {
|
||||||
if (time > 0) {
|
if (time > 0) {
|
||||||
@@ -19,4 +21,3 @@ $(window).ready(function() {
|
|||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
|
// Gestion des animations du header en scroll.
|
||||||
var small = 2;
|
var small = 2;
|
||||||
|
|
||||||
function reduce() {
|
function reduce() {
|
||||||
|
// Réduit la hauteur du header.
|
||||||
$( "header" ).animate({
|
$( "header" ).animate({
|
||||||
height: "45px"
|
height: "45px"
|
||||||
}, 100, function() {
|
}, 100, function() {
|
||||||
@@ -36,6 +38,7 @@ function reduce() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function enlarge() {
|
function enlarge() {
|
||||||
|
// Restaure la taille du header.
|
||||||
$( "header" ).animate({
|
$( "header" ).animate({
|
||||||
height: "65px"
|
height: "65px"
|
||||||
}, 100, function() {
|
}, 100, function() {
|
||||||
@@ -70,6 +73,7 @@ function enlarge() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Déclenche les animations selon le scroll.
|
||||||
$(window).scroll(function() {
|
$(window).scroll(function() {
|
||||||
var position = $(window).scrollTop();
|
var position = $(window).scrollTop();
|
||||||
if (position>80 && small!=1 && $('body').width() > 800) {
|
if (position>80 && small!=1 && $('body').width() > 800) {
|
||||||
@@ -82,6 +86,7 @@ $(window).scroll(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Affichage du texte du logo au survol.
|
||||||
$(window).ready(function() {
|
$(window).ready(function() {
|
||||||
$( "#logo" ).hover(
|
$( "#logo" ).hover(
|
||||||
function() {
|
function() {
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
|
// Carte principale et marqueurs de POI.
|
||||||
var mymap;
|
var mymap;
|
||||||
var markers = [];
|
var markers = [];
|
||||||
|
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
// Differents layers for the map
|
// Différentes couches pour la carte.
|
||||||
var topo_maptiler = L.tileLayer('https://api.maptiler.com/maps/topographique/{z}/{x}/{y}.png?key=Sm8M7mJ53GtYdl773rpi', {tms: false, attribution: 'Carte © <a href="https://www.maptiler.com/copyright/" target="_blank">MapTiler</a>, Données © <a href="http://www.openstreetmap.org/copyright" target="_blank">Contributeurs OpenStreetMap</a>', tileSize: 512, zoomOffset: -1, minZoom: 1});
|
var topo_maptiler = L.tileLayer('https://api.maptiler.com/maps/topographique/{z}/{x}/{y}.png?key=Sm8M7mJ53GtYdl773rpi', {tms: false, attribution: 'Carte © <a href="https://www.maptiler.com/copyright/" target="_blank">MapTiler</a>, Données © <a href="http://www.openstreetmap.org/copyright" target="_blank">Contributeurs OpenStreetMap</a>', tileSize: 512, zoomOffset: -1, minZoom: 1});
|
||||||
var ign = L.tileLayer('https://data.geopf.fr/private/wmts?&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER=GEOGRAPHICALGRIDSYSTEMS.MAPS&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&apikey=ign_scan_ws', {attribution: 'Carte & Connées © <a href="http://ign.fr/" target="_blank">IGN-F/Géoportail</a>'});
|
var ign = L.tileLayer('https://data.geopf.fr/private/wmts?&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER=GEOGRAPHICALGRIDSYSTEMS.MAPS&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&apikey=ign_scan_ws', {attribution: 'Carte & Connées © <a href="http://ign.fr/" target="_blank">IGN-F/Géoportail</a>'});
|
||||||
|
|
||||||
// Base layers
|
// Couches de base.
|
||||||
var baseLayers = {
|
var baseLayers = {
|
||||||
"OpenStreetMap": topo_maptiler,
|
"OpenStreetMap": topo_maptiler,
|
||||||
"IGN France": ign
|
"IGN France": ign
|
||||||
@@ -63,6 +64,7 @@ $( document ).ready(function() {
|
|||||||
$("#map-credits").html(e.layer.getAttribution());
|
$("#map-credits").html(e.layer.getAttribution());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Ajuste la taille des icônes selon le niveau de zoom.
|
||||||
mymap.on("zoomend", function () {
|
mymap.on("zoomend", function () {
|
||||||
var z = mymap.getZoom();
|
var z = mymap.getZoom();
|
||||||
|
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// Carte des POIs et marqueur principal.
|
||||||
var mymap;
|
var mymap;
|
||||||
var poi_layer;
|
var poi_layer;
|
||||||
|
|
||||||
@@ -5,7 +6,7 @@ $(document).ready(function() {
|
|||||||
// Mode : edit (formulaire) ou view (affichage)
|
// Mode : edit (formulaire) ou view (affichage)
|
||||||
var isEdit = (typeof poi_mode === "undefined" || poi_mode === "edit");
|
var isEdit = (typeof poi_mode === "undefined" || poi_mode === "edit");
|
||||||
|
|
||||||
// Differents layers for the map
|
// Différentes couches pour la carte.
|
||||||
var topo_maptiler = L.tileLayer(
|
var topo_maptiler = L.tileLayer(
|
||||||
'https://api.maptiler.com/maps/topographique/{z}/{x}/{y}.png?key=Sm8M7mJ53GtYdl773rpi',
|
'https://api.maptiler.com/maps/topographique/{z}/{x}/{y}.png?key=Sm8M7mJ53GtYdl773rpi',
|
||||||
{
|
{
|
||||||
@@ -22,7 +23,7 @@ $(document).ready(function() {
|
|||||||
attribution: 'Carte & Connées © <a href="http://ign.fr/" target="_blank">IGN-F/Géoportail</a>'
|
attribution: 'Carte & Connées © <a href="http://ign.fr/" target="_blank">IGN-F/Géoportail</a>'
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
// Base layers
|
// Couches de base.
|
||||||
var baseLayers = {
|
var baseLayers = {
|
||||||
"OpenStreetMap": topo_maptiler,
|
"OpenStreetMap": topo_maptiler,
|
||||||
"IGN France": ign
|
"IGN France": ign
|
||||||
@@ -80,6 +81,7 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isEdit) {
|
if (isEdit) {
|
||||||
|
// Mise à jour des coordonnées à chaque déplacement.
|
||||||
poi_layer.bindTooltip("Glissez moi au bon endroit.", {permanent: true, direction: 'auto'}).openTooltip();
|
poi_layer.bindTooltip("Glissez moi au bon endroit.", {permanent: true, direction: 'auto'}).openTooltip();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,6 +98,7 @@ $(document).ready(function() {
|
|||||||
$("#elevation_icon").show();
|
$("#elevation_icon").show();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Si l'utilisateur modifie les champs lat/lon manuellement.
|
||||||
$("#lat,#lon").change(function() { // If the user changes the lat/lon input values manualy
|
$("#lat,#lon").change(function() { // If the user changes the lat/lon input values manualy
|
||||||
if(isNaN($("#lat").val()) || isNaN($("#lon").val()) || $("#lat").val().length==0 || $("#lon").val()==null)
|
if(isNaN($("#lat").val()) || isNaN($("#lon").val()) || $("#lat").val().length==0 || $("#lon").val()==null)
|
||||||
$("#elevation_icon").hide();
|
$("#elevation_icon").hide();
|
||||||
@@ -116,6 +119,7 @@ $(document).ready(function() {
|
|||||||
poi_layer.setIcon(editPoiIcon);
|
poi_layer.setIcon(editPoiIcon);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Chargement de l'altitude via le proxy.
|
||||||
$("#elevation_icon").click(function(e) {
|
$("#elevation_icon").click(function(e) {
|
||||||
$(this).find($(".fas")).removeClass('fa-search-location').addClass('fa-spinner').addClass('fa-spin');
|
$(this).find($(".fas")).removeClass('fa-search-location').addClass('fa-spinner').addClass('fa-spin');
|
||||||
$.get(root+"poi/elevation_proxy", {location:$("#lat").val()+","+$("#lon").val()}, function(result){
|
$.get(root+"poi/elevation_proxy", {location:$("#lat").val()+","+$("#lon").val()}, function(result){
|
||||||
|
Before Width: | Height: | Size: 673 KiB After Width: | Height: | Size: 673 KiB |
|
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 708 KiB After Width: | Height: | Size: 708 KiB |
|
Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 299 B |
|
Before Width: | Height: | Size: 420 B After Width: | Height: | Size: 420 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 696 B After Width: | Height: | Size: 696 B |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |