Merge branch 'master' into copilot/create-database-file-connection

This commit is contained in:
2026-01-24 13:52:01 +01:00
committed by GitHub
46 changed files with 362 additions and 402 deletions

View File

@@ -1,4 +1,4 @@
<? <?php
if(isset($controller->splitted_url[1]) && $user->rankIsHigher("moderator")) { if(isset($controller->splitted_url[1]) && $user->rankIsHigher("moderator")) {
switch ($controller->splitted_url[1]) { switch ($controller->splitted_url[1]) {
@@ -283,5 +283,3 @@ function formatBytes($bytes, $locale = 'en', $precision = 2) {
return $formatted . ' ' . $units[$power]; return $formatted . ' ' . $units[$power];
} }
?>

View File

@@ -1,4 +1,4 @@
<? <?php
require_once($config['models_folder']."d.blog.php"); require_once($config['models_folder']."d.blog.php");
require_once($config['models_folder']."d.comments.php"); require_once($config['models_folder']."d.comments.php");
@@ -189,5 +189,3 @@ switch ($controller->splitted_url[1]) {
} }
break; break;
} }
?>

View File

@@ -1,4 +1,4 @@
<? <?php
function post($index) { function post($index) {
return isset($_POST[$index]) ? $_POST[$index] : ''; return isset($_POST[$index]) ? $_POST[$index] : '';
@@ -72,6 +72,3 @@ $head['js'] = "d.captcha.js";
$head['title'] = "Contact"; $head['title'] = "Contact";
include ($config['views_folder']."d.contact.html"); include ($config['views_folder']."d.contact.html");
?>

View File

@@ -1,4 +1,4 @@
<? <?php
$head['css'] = "d.index.css"; $head['css'] = "d.index.css";
@@ -18,5 +18,3 @@ else {
require_once($config['includes_folder']."poi_types.struct.php"); require_once($config['includes_folder']."poi_types.struct.php");
include ($config['views_folder']."d.map.html"); include ($config['views_folder']."d.map.html");
} }
?>

View File

@@ -274,5 +274,3 @@ switch ($controller->splitted_url[1]) {
} }
break; break;
} }
?>

View File

@@ -1,4 +1,4 @@
<? <?php
require_once($config['models_folder']."d.users.php"); require_once($config['models_folder']."d.users.php");
@@ -223,5 +223,3 @@ if(isset($controller->splitted_url[1])) {
else { else {
$notfound = 1; $notfound = 1;
} }
?>

View File

@@ -1,4 +1,4 @@
<? <?php
require_once($config['models_folder']."d.wiki.php"); require_once($config['models_folder']."d.wiki.php");
@@ -77,5 +77,3 @@ else if(isset($controller->splitted_url[1]) && $wikiPage->checkPermalink($contro
else { else {
$notfound = 1; $notfound = 1;
} }
?>

View File

@@ -48,5 +48,3 @@ $config['SQL_db'] = "postgres";
$config['admin_mail'] = "leo@lstronic.com"; $config['admin_mail'] = "leo@lstronic.com";
$config['bot_mail'] = "robot@kabano.com"; $config['bot_mail'] = "robot@kabano.com";
?>

View File

@@ -1,4 +1,4 @@
<? <?php
function generate_image_thumbnail($source_image_path, $thumbnail_image_path, $width, $height) function generate_image_thumbnail($source_image_path, $thumbnail_image_path, $width, $height)
{ {
@@ -38,5 +38,3 @@ function generate_image_thumbnail($source_image_path, $thumbnail_image_path, $wi
imagedestroy($thumbnail_gd_image); imagedestroy($thumbnail_gd_image);
return true; return true;
} }
?>

View File

@@ -89,5 +89,3 @@ $poi_types = array(
) )
); );
?>

View File

@@ -1,4 +1,4 @@
<? <?php
/***** /*****
** This file contains the routing from any request to the correct view and controller ** This file contains the routing from any request to the correct view and controller
@@ -70,5 +70,3 @@ if($notfound) {
$head['title'] = $wikiPage->name; $head['title'] = $wikiPage->name;
include ($config['views_folder']."d.wiki.view.html"); include ($config['views_folder']."d.wiki.view.html");
} }
?>

View File

@@ -1,4 +1,4 @@
<? <?php
require_once($config['models_folder']."d.users.php"); require_once($config['models_folder']."d.users.php");
@@ -33,6 +33,3 @@ if (PHP_VERSION_ID < 80000) {
} }
$user->datetime_format = new IntlDateFormatter($config['locale'], IntlDateFormatter::LONG, IntlDateFormatter::SHORT, $config['timezone']); $user->datetime_format = new IntlDateFormatter($config['locale'], IntlDateFormatter::LONG, IntlDateFormatter::SHORT, $config['timezone']);
$user->datetimeshort_format = new IntlDateFormatter($config['locale'], IntlDateFormatter::SHORT, IntlDateFormatter::SHORT, $config['timezone']); $user->datetimeshort_format = new IntlDateFormatter($config['locale'], IntlDateFormatter::SHORT, IntlDateFormatter::SHORT, $config['timezone']);
?>

View File

@@ -1,6 +1,4 @@
<? <?php
require_once('includes/config.php'); require_once __DIR__ . '/includes/config.php';
require_once('includes/routes.php'); require_once __DIR__ . '/includes/routes.php';
?>

View File

@@ -1,4 +1,4 @@
<? <?php
namespace Kabano; namespace Kabano;
@@ -363,5 +363,3 @@ class BlogArticles
} }
} }
} }
?>

View File

@@ -200,5 +200,3 @@ class Comments
} }
} }
} }
?>

View File

@@ -94,5 +94,3 @@ class Locales
} }
} }
} }
?>

View File

@@ -1,4 +1,4 @@
<? <?php
namespace Kabano; namespace Kabano;
@@ -447,5 +447,3 @@ class Pois
} }
} }
} }
?>

View File

@@ -1,4 +1,4 @@
<? <?php
namespace Kabano; namespace Kabano;
@@ -442,5 +442,3 @@ class Users
} }
} }
} }
?>

View File

@@ -1,4 +1,4 @@
<? <?php
namespace Kabano; namespace Kabano;
@@ -296,5 +296,3 @@ class WikiPages
} }
} }
} }
?>

View File

@@ -456,7 +456,7 @@ class Markdown implements MarkdownInterface {
[ ]* [ ]*
(?=\n{2,}|\Z) # followed by a blank line or end of document (?=\n{2,}|\Z) # followed by a blank line or end of document
| # PHP and ASP-style processor instructions (<? and <%) | # PHP and ASP-style processor instructions (<?php and <%)
[ ]{0,'.$less_than_tab.'} [ ]{0,'.$less_than_tab.'}
(?s: (?s:

View File

@@ -2,45 +2,45 @@
<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'])) { <?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"/>
<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'])) { ?> <?php if (isset($head['title'])) { ?>
<title><?=$head['title']?> &mdash; Kabano</title> <title><?=$head['title']?> &mdash; 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>

View File

@@ -24,15 +24,15 @@
</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') { ?> <?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,14 +41,14 @@
</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>

View File

@@ -1,42 +1,42 @@
<!DOCTYPE html> <!DOCTYPE html>
<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><? <pre><?php
foreach($output as $line) { foreach($output as $line) {
echo $line."<br>"; echo $line."<br>";
} }
?></pre> ?></pre>
<br> <br>
<? $i=0; <?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>
<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>

View File

@@ -1,23 +1,23 @@
<!DOCTYPE html> <!DOCTYPE html>
<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><? <pre><?php
foreach($output as $line) { foreach($output as $line) {
echo $line."<br>"; echo $line."<br>";
} }
?></pre> ?></pre>
</section> </section>
<? include('blocks/d.footer.html'); ?> <?php include('blocks/d.footer.html'); ?>
</body> </body>
</html> </html>

View File

@@ -1,27 +1,27 @@
<!DOCTYPE html> <!DOCTYPE html>
<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>Administration</h1> <h1>Administration</h1>
<br> <br>
<? if($user->rankIsHigher("administrator")) { ?> <?php if($user->rankIsHigher("administrator")) { ?>
<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")) { ?>
<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>

View File

@@ -1,28 +1,28 @@
<!DOCTYPE html> <!DOCTYPE html>
<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>
<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><? <pre><?php
foreach($output as $line) { foreach($output as $line) {
echo $line."<br>"; echo $line."<br>";
} }
@@ -35,7 +35,7 @@ $( "#logfile" ).change(function() {
}); });
</script> </script>
<? include('blocks/d.footer.html'); ?> <?php include('blocks/d.footer.html'); ?>
</body> </body>
</html> </html>

View File

@@ -1,27 +1,27 @@
<!DOCTYPE html> <!DOCTYPE html>
<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><? <pre><?php
print_r($output); print_r($output);
?></pre> ?></pre>
<br> <br>
<? if (file_exists($report)) { ?> <?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> <a href='<?=$config['rel_root_folder']?>tmp/report.html' target='_blank'><i class="fas fa-chart-line"></i> Voir le rapport</a>
<? } else { ?> <?php } else { ?>
Echec de la commande Echec de la commande
<? } ?> <?php } ?>
</section> </section>
<? include('blocks/d.footer.html'); ?> <?php include('blocks/d.footer.html'); ?>
</body> </body>
</html> </html>

View File

@@ -1,11 +1,11 @@
<!DOCTYPE html> <!DOCTYPE html>
<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="wiki_files"> <section id="wiki_files">
<h1><?=$head['title']?></h1> <h1><?=$head['title']?></h1>
@@ -42,34 +42,34 @@
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+1?>?orderby=creation_date&amp;order=<?=$order=='ASC'?'DESC':'ASC'?>">Date de création</a> <a href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+1?>?orderby=creation_date&amp;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?>&amp;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?>&amp;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>
<div class="pagebuttons"> <div class="pagebuttons">
<? if ($page != 0) { ?><a class="previous" href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page?>?orderby=<?=$orderby?>&amp;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?>&amp;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?>&amp;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?>&amp;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>

View File

@@ -1,47 +1,47 @@
<!DOCTYPE html> <!DOCTYPE html>
<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>
<? if(isset($new) AND $new==1) { ?> <?php if(isset($new) AND $new==1) { ?>
<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 { ?>
<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>
<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") { ?>
<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 } ?>
<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) { ?>
<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 } ?>
<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>
@@ -69,7 +69,7 @@ $( "#name" ).change(function() {
}); });
</script> </script>
<? include('blocks/d.footer.html'); ?> <?php include('blocks/d.footer.html'); ?>
</body> </body>
</html> </html>

View File

@@ -1,55 +1,55 @@
<!DOCTYPE html> <!DOCTYPE html>
<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="blog_list"> <section id="blog_list">
<h1>Blog</h1> <h1>Blog</h1>
<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> &mdash; <a href="<?=$config['rel_root_folder']?>blog/new"><i class="fas fa-plus"></i> Nouvel article</a> &mdash;
<? } ?> <?php } ?>
<a href="<?=$config['rel_root_folder']?>blog/rss"><i class="fas fa-rss" aria-hidden="true"></i> Flux RSS</a> &mdash; <a href="<?=$config['rel_root_folder']?>blog/rss"><i class="fas fa-rss" aria-hidden="true"></i> Flux RSS</a> &mdash;
Articles <?=$first?> à <?=$last?> sur <?=$blogArticles->number?> Articles <?=$first?> à <?=$last?> sur <?=$blogArticles->number?>
</p> </p>
<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>
<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>

View File

@@ -1,4 +1,4 @@
<? <?php
$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>

View File

@@ -1,66 +1,66 @@
<!DOCTYPE html> <!DOCTYPE html>
<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="blog_article" <?=$blogArticle->is_archive=="t"||$blogArticle->is_public=="f"?'class="archive"':''?>> <section id="blog_article" <?=$blogArticle->is_archive=="t"||$blogArticle->is_public=="f"?'class="archive"':''?>>
<h1><?=$blogArticle->name?></h1> <h1><?=$blogArticle->name?></h1>
<? if($user->rankIsHigher('premium')) { ?> <?php if($user->rankIsHigher('premium')) { ?>
<span class="subtitle"> <span class="subtitle">
<? if(isset($blogHistory)) { ?> <?php if(isset($blogHistory)) { ?>
<select id="bloghistory"> <select id="bloghistory">
<? $i = 0; <?php $i = 0;
foreach ($blogHistory->objs as $row) { ?> foreach ($blogHistory->objs as $row) { ?>
<option <?=$row->version_id==$blogArticle->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'&bull; ':''?><? echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option> <option <?=$row->version_id==$blogArticle->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'&bull; ':''?><?php echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option>
<? $i++; <?php $i++;
} ?> } ?>
</select> </select>
<? } <?php }
if ($user->rankIsHigher('moderator') && isset($blogHistory)) { ?> if ($user->rankIsHigher('moderator') && isset($blogHistory)) { ?>
&mdash; &mdash;
<? } <?php }
if ($user->rankIsHigher("moderator")) { ?> if ($user->rankIsHigher("moderator")) { ?>
<a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/edit"><i class="fas fa-pencil-alt"></i> Éditer l'article</a> &mdash; <a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/edit"><i class="fas fa-pencil-alt"></i> Éditer l'article</a> &mdash;
<? if ($blogArticle->is_public == 't') { ?> <?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> <a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/delete"><i class="fas fa-trash"></i> Effacer l'article</a>
<? } else { ?> <?php } else { ?>
<a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/restore"><i class="fas fa-eye"></i> Restaurer l'article</a> <a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/restore"><i class="fas fa-eye"></i> Restaurer l'article</a>
<? } ?> <?php } ?>
<? } ?> <?php } ?>
</span> </span>
<? } ?> <?php } ?>
<div id="blogContent"> <div id="blogContent">
<?=$blogArticle->content_html?> <?=$blogArticle->content_html?>
</div> </div>
<p id="blogTimestamp">Article écrit par <p id="blogTimestamp">Article écrit par
<? if ($user->rankIsHigher("blocked")) { ?> <?php if ($user->rankIsHigher("blocked")) { ?>
<a href="<?=$config['rel_root_folder']?>user/p/<?=$blogArticle->author?>"><?=$blogArticle->author_name?></a> <a href="<?=$config['rel_root_folder']?>user/p/<?=$blogArticle->author?>"><?=$blogArticle->author_name?></a>
<? } <?php }
else { ?> else { ?>
<?=$blogArticle->author_name?> <?=$blogArticle->author_name?>
<? } ?> <?php } ?>
le <? echo datefmt_format($user->datetime_format,date_create($blogArticle->creation_date, new DateTimeZone("UTC"))) ?></p> le <?php echo datefmt_format($user->datetime_format,date_create($blogArticle->creation_date, new DateTimeZone("UTC"))) ?></p>
<!-- COMMENTS --> <!-- COMMENTS -->
<? if ($blogArticle->is_commentable == "t") { ?> <?php if ($blogArticle->is_commentable == "t") { ?>
<div id="new_comment"> <div id="new_comment">
<form class="form" action="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/new_comment" method="post"> <form class="form" action="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/new_comment" method="post">
<div id="new_comment_label" <?=$user->rank=="visitor"?"class='sent' ":""?>> <div id="new_comment_label" <?=$user->rank=="visitor"?"class='sent' ":""?>>
<? if ($blogArticle->is_archive == "t" || $blogArticle->is_public == "f") { ?> <?php if ($blogArticle->is_archive == "t" || $blogArticle->is_public == "f") { ?>
<p>Impossible de commenter un article non publié</p> <p>Impossible de commenter un article non publié</p>
<? } else if ($user->rankIsHigher("registered")) { ?> <?php } else if ($user->rankIsHigher("registered")) { ?>
<input name="submit" type="submit" value="Envoyer"> <input name="submit" type="submit" value="Envoyer">
<p>Ajouter un nouveau commentaire</p> <p>Ajouter un nouveau commentaire</p>
<? } else { ?> <?php } else { ?>
<p>Veuillez vous connecter pour ajouter un commentaire</p> <p>Veuillez vous connecter pour ajouter un commentaire</p>
<? } ?> <?php } ?>
</div> </div>
<div id="new_comment_form"> <div id="new_comment_form">
<textarea id="comment" name="comment" rows="5" placeholder="Votre commentaire"></textarea> <textarea id="comment" name="comment" rows="5" placeholder="Votre commentaire"></textarea>
@@ -68,35 +68,35 @@
</form> </form>
</div> </div>
<? if($blogArticle->is_commentable == 't') { <?php if($blogArticle->is_commentable == 't') {
foreach ($blogArticles_comments->objs as $comment) { ?> foreach ($blogArticles_comments->objs as $comment) { ?>
<article <? if($comment->is_archive == 't' || $comment->is_public == 'f') echo 'class="comment_archive" '; ?>> <article <?php if($comment->is_archive == 't' || $comment->is_public == 'f') echo 'class="comment_archive" '; ?>>
<div class="comment_title"> <div class="comment_title">
<? if ($comment->author_obj->is_avatar_present=='t') { ?> <?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"> <img alt="Avatar" class="icon avatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$comment->author_obj->id?>_s.jpg">
<? } else { ?> <?php } else { ?>
<i class="icon fas fa-user-secret"></i> <i class="icon fas fa-user-secret"></i>
<? } ?> <?php } ?>
<? if ($user->rankIsHigher("blocked")) { ?> <?php if ($user->rankIsHigher("blocked")) { ?>
<a class="username" href="<?=$config['rel_root_folder']?>user/p/<?=$comment->author_obj->id?>"><?=$comment->author_obj->name?></a> <a class="username" href="<?=$config['rel_root_folder']?>user/p/<?=$comment->author_obj->id?>"><?=$comment->author_obj->name?></a>
<? } else { ?> <?php } else { ?>
<?=$comment->author_obj->name?> <?=$comment->author_obj->name?>
<? } ?> <?php } ?>
le <? echo datefmt_format($user->datetime_format,date_create($comment->update_date, new DateTimeZone("UTC"))) ?> le <?php echo datefmt_format($user->datetime_format,date_create($comment->update_date, new DateTimeZone("UTC"))) ?>
<? if (($user->rankIsHigher("moderator") || $user->id == $comment->author) && $comment->is_public == 't') { ?> <?php if (($user->rankIsHigher("moderator") || $user->id == $comment->author) && $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> <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 } ?>
<? if (($user->rankIsHigher("moderator") || $user->id == $comment->author) && $comment->is_public == 'f') { ?> <?php if (($user->rankIsHigher("moderator") || $user->id == $comment->author) && $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> <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>
<div class="comment_content"> <div class="comment_content">
<?=$comment->comment_html?> <?=$comment->comment_html?>
</div> </div>
</article> </article>
<? } <?php }
} }
} ?> } ?>
@@ -105,14 +105,14 @@
<div style="clear: both;"> </div> <div style="clear: both;"> </div>
</section> </section>
<? if($user->rankIsHigher("premium")) { ?> <?php if($user->rankIsHigher("premium")) { ?>
<script type="text/javascript"> <script type="text/javascript">
$( "#bloghistory" ).change(function() { $( "#bloghistory" ).change(function() {
window.location.href = "<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/"+$( this ).val(); window.location.href = "<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/"+$( this ).val();
}); });
</script> </script>
<? } ?> <?php } ?>
<? if($user->rankIsHigher("registered") && $blogArticle->is_archive == "f" && $blogArticle->is_public == "t") { ?> <?php if($user->rankIsHigher("registered") && $blogArticle->is_archive == "f" && $blogArticle->is_public == "t") { ?>
<script type="text/javascript"> <script type="text/javascript">
$( "#new_comment_label" ).click(function() { $( "#new_comment_label" ).click(function() {
$( "#new_comment_form" ).show(400); $( "#new_comment_form" ).show(400);
@@ -120,9 +120,9 @@ $( "#new_comment_label" ).click(function() {
$( "#new_comment_label").addClass('sent'); $( "#new_comment_label").addClass('sent');
}); });
</script> </script>
<? } ?> <?php } ?>
<? include('blocks/d.footer.html'); ?> <?php include('blocks/d.footer.html'); ?>
</body> </body>
</html> </html>

View File

@@ -1,11 +1,11 @@
<!DOCTYPE html> <!DOCTYPE html>
<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>Contribuer au projet Kabano</h1> <h1>Contribuer au projet Kabano</h1>
@@ -13,18 +13,18 @@
<br> <br>
<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 { ?>
<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. &Ccedil;a nous permet de laisser les robots à la porte.</p> <p>Vous devez être connecté pour pouvoir ajouter un hébergement. &Ccedil;a nous permet de laisser les robots à la porte.</p>
</div> </div>
<? } ?> <?php } ?>
</div> </div>
<div class="action"> <div class="action">
@@ -59,7 +59,7 @@ $( "#js_open_3" ).click(function() {
}); });
</script> </script>
<? include('blocks/d.footer.html'); ?> <?php include('blocks/d.footer.html'); ?>
</body> </body>
</html> </html>

View File

@@ -1,45 +1,45 @@
<!DOCTYPE html> <!DOCTYPE html>
<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>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") { ?> <?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 } ?>
<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")) { ?> <?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 { ?>
<p id="captcha"> <p id="captcha">
<input type="hidden" id="captchahidden" name="captcha" value="10"> <input type="hidden" id="captchahidden" name="captcha" value="10">
@@ -47,12 +47,12 @@
<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>

View File

@@ -1,11 +1,11 @@
<!DOCTYPE html> <!DOCTYPE html>
<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'); ?>
<aside id="indexFullW"> <aside id="indexFullW">
<div id="AScontent"> <div id="AScontent">
@@ -15,7 +15,7 @@
</div> </div>
</aside> </aside>
<? <?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');
@@ -25,18 +25,18 @@
<section id="index"> <section id="index">
<h1><?=$wikiPage->name?></h1> <h1><?=$wikiPage->name?></h1>
<? if($user->rankIsHigher('moderator')) { ?> <?php if($user->rankIsHigher('moderator')) { ?>
<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>

View File

@@ -1,11 +1,11 @@
<!DOCTYPE html> <!DOCTYPE html>
<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> <!-- <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>
--> -->
@@ -18,21 +18,21 @@
<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'); ?>
<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) // Icônes des POIs (déjà présentes dans ton système)
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>

View File

@@ -1,29 +1,29 @@
<!DOCTYPE html> <!DOCTYPE html>
<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="mapid"></div> <div id="mapid"></div>
<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) { ?>
<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 { ?>
<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 } ?>
<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>
@@ -35,11 +35,11 @@
</div> </div>
<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>
<script type="text/javascript"> <script type="text/javascript">
@@ -53,10 +53,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) {
@@ -187,12 +187,12 @@ $(document).ready(function(){
<p id="abstract"></p> <p id="abstract"></p>
<div id="specific_form"></div> <div id="specific_form"></div>
<? if(isset($new) AND $new==1) { ?> <?php if(isset($new) AND $new==1) { ?>
<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 } ?>
<script type="text/javascript"> <script type="text/javascript">
$( "#name" ).keyup(function() { $( "#name" ).keyup(function() {
@@ -218,10 +218,10 @@ $( "#name" ).change(function() {
</section> </section>
<script> <script>
<? if($poi->lat != null && $poi->lon != null) { ?> <?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']?>";
@@ -234,7 +234,7 @@ $( "#slide-icon" ).click(function() {
}); });
</script> </script>
<? include('blocks/d.footer.html'); ?> <?php include('blocks/d.footer.html'); ?>
</div> </div>
</body> </body>
</html> </html>

View File

@@ -1,11 +1,11 @@
<!DOCTYPE html> <!DOCTYPE html>
<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="mapid"></div> <div id="mapid"></div>
@@ -50,30 +50,30 @@
</div> </div>
<? if($user->rankIsHigher('premium')) { ?> <?php if($user->rankIsHigher('premium')) { ?>
<span class="subtitle"> <span class="subtitle">
<? if(isset($PoiHistory)) { ?> <?php if(isset($PoiHistory)) { ?>
<select id="PoiHistory"> <select id="PoiHistory">
<? $i = 0; <?php $i = 0;
foreach ($PoiHistory->objs as $row) { ?> foreach ($PoiHistory->objs as $row) { ?>
<option <?=$row->version_id==$poi->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'&bull; ':''?><? echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option> <option <?=$row->version_id==$poi->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'&bull; ':''?><?php echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option>
<? $i++; <?php $i++;
} ?> } ?>
</select> </select>
<? } <?php }
if ($user->rankIsHigher('moderator') && isset($PoiHistory)) { ?> if ($user->rankIsHigher('moderator') && isset($PoiHistory)) { ?>
&mdash; &mdash;
<? } <?php }
if ($user->rankIsHigher("moderator")) { ?> if ($user->rankIsHigher("moderator")) { ?>
<a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/edit"><i class="fas fa-pencil-alt"></i> Éditer le point</a> &mdash; <a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/edit"><i class="fas fa-pencil-alt"></i> Éditer le point</a> &mdash;
<? if ($poi->is_public == 't') { ?> <?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> <a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/delete"><i class="fas fa-trash"></i> Effacer le point</a>
<? } else { ?> <?php } else { ?>
<a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/restore"><i class="fas fa-eye"></i> Restaurer le point</a> <a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/restore"><i class="fas fa-eye"></i> Restaurer le point</a>
<? } ?> <?php } ?>
<? } ?> <?php } ?>
</span> </span>
<? } ?> <?php } ?>
<br> <br>
<br> <br>
@@ -165,18 +165,18 @@
</div> </div>
<? if ($poi->is_commentable == 't') { ?> <?php if ($poi->is_commentable == 't') { ?>
<div id="new_comment"> <div id="new_comment">
<form class="form" action="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/new_comment" method="post"> <form class="form" action="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/new_comment" method="post">
<div id="new_comment_label" <?=$user->rank=="visitor"?"class='sent' ":""?>> <div id="new_comment_label" <?=$user->rank=="visitor"?"class='sent' ":""?>>
<? if ($poi->is_archive == "t" || $poi->is_public == "f") { ?> <?php if ($poi->is_archive == "t" || $poi->is_public == "f") { ?>
<p>Impossible de commenter un point non publié</p> <p>Impossible de commenter un point non publié</p>
<? } else if ($user->rankIsHigher("registered")) { ?> <?php } else if ($user->rankIsHigher("registered")) { ?>
<input name="submit" type="submit" value="Envoyer"> <input name="submit" type="submit" value="Envoyer">
<p>Ajouter un nouveau commentaire</p> <p>Ajouter un nouveau commentaire</p>
<? } else { ?> <?php } else { ?>
<p>Veuillez vous connecter pour ajouter un commentaire</p> <p>Veuillez vous connecter pour ajouter un commentaire</p>
<? } ?> <?php } ?>
</div> </div>
<div id="new_comment_form"> <div id="new_comment_form">
<textarea id="comment" name="comment" rows="5" placeholder="Votre commentaire"></textarea> <textarea id="comment" name="comment" rows="5" placeholder="Votre commentaire"></textarea>
@@ -184,43 +184,43 @@
</form> </form>
</div> </div>
<? if (isset($poi_comments) && $poi_comments->number > 0) { ?> <?php if (isset($poi_comments) && $poi_comments->number > 0) { ?>
<div id="comments"> <div id="comments">
<? foreach ($poi_comments->objs as $comment) { ?> <?php foreach ($poi_comments->objs as $comment) { ?>
<article <? if($comment->is_archive == 't' || $comment->is_public == 'f') echo 'class="comment_archive" '; ?>> <article <?php if($comment->is_archive == 't' || $comment->is_public == 'f') echo 'class="comment_archive" '; ?>>
<div class="comment_title"> <div class="comment_title">
<? if ($comment->author_obj->is_avatar_present == 't') { ?> <?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"> <img alt="Avatar" class="icon avatar" src="<?=$config['rel_root_folder']?>medias/avatars/<?=$comment->author_obj->id?>_s.jpg">
<? } else { ?> <?php } else { ?>
<i class="icon fas fa-user-secret"></i> <i class="icon fas fa-user-secret"></i>
<? } ?> <?php } ?>
<? if ($user->rankIsHigher("blocked")) { ?> <?php if ($user->rankIsHigher("blocked")) { ?>
<a class="username" href="<?=$config['rel_root_folder']?>user/p/<?=$comment->author_obj->id?>"> <a class="username" href="<?=$config['rel_root_folder']?>user/p/<?=$comment->author_obj->id?>">
<?=$comment->author_obj->name?> <?=$comment->author_obj->name?>
</a> </a>
<? } else { ?> <?php } else { ?>
<?=$comment->author_obj->name?> <?=$comment->author_obj->name?>
<? } ?> <?php } ?>
le <? echo datefmt_format($user->datetime_format, date_create($comment->update_date, new DateTimeZone("UTC"))) ?> le <?php echo datefmt_format($user->datetime_format, date_create($comment->update_date, new DateTimeZone("UTC"))) ?>
<? if (($user->rankIsHigher("moderator") || $user->id == $comment->author) && $comment->is_public == 't') { ?> <?php if (($user->rankIsHigher("moderator") || $user->id == $comment->author) && $comment->is_public == 't') { ?>
<span class="delete_link"> <span class="delete_link">
<a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/delete_comment/<?=$comment->id?>"> <a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/delete_comment/<?=$comment->id?>">
<i class="fas fa-trash"></i> Effacer le commentaire <i class="fas fa-trash"></i> Effacer le commentaire
</a> </a>
</span> </span>
<? } ?> <?php } ?>
<? if (($user->rankIsHigher("moderator") || $user->id == $comment->author) && $comment->is_public == 'f') { ?> <?php if (($user->rankIsHigher("moderator") || $user->id == $comment->author) && $comment->is_public == 'f') { ?>
<span class="delete_link"> <span class="delete_link">
<a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/restore_comment/<?=$comment->id?>"> <a href="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/restore_comment/<?=$comment->id?>">
<i class="fas fa-eye"></i> Restaurer le commentaire <i class="fas fa-eye"></i> Restaurer le commentaire
</a> </a>
</span> </span>
<? } ?> <?php } ?>
</div> </div>
@@ -229,16 +229,16 @@
</div> </div>
</article> </article>
<? } ?> <?php } ?>
<br></div> <br></div>
<? } else { ?> <?php } else { ?>
<p>Aucun commentaire pour le moment.</p> <p>Aucun commentaire pour le moment.</p>
<? } ?> <?php } ?>
<? } ?> <?php } ?>
</section> </section>
<? include('blocks/d.footer.html'); ?> <?php include('blocks/d.footer.html'); ?>
</div> </div>
<script> <script>
@@ -249,15 +249,15 @@
var root = "<?=$config['rel_root_folder']?>"; var root = "<?=$config['rel_root_folder']?>";
</script> </script>
<? if($user->rankIsHigher("premium")) { ?> <?php if($user->rankIsHigher("premium")) { ?>
<script type="text/javascript"> <script type="text/javascript">
$( "#PoiHistory" ).change(function() { $( "#PoiHistory" ).change(function() {
window.location.href = "<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/"+$( this ).val(); window.location.href = "<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/"+$( this ).val();
}); });
</script> </script>
<? } ?> <?php } ?>
<? if($user->rankIsHigher("registered") && $poi->is_archive == "f" && $poi->is_public == "t") { ?> <?php if($user->rankIsHigher("registered") && $poi->is_archive == "f" && $poi->is_public == "t") { ?>
<script type="text/javascript"> <script type="text/javascript">
$( "#new_comment_label" ).click(function() { $( "#new_comment_label" ).click(function() {
$( "#new_comment_form" ).show(400); $( "#new_comment_form" ).show(400);
@@ -265,7 +265,7 @@ $( "#new_comment_label" ).click(function() {
$( "#new_comment_label").addClass('sent'); $( "#new_comment_label").addClass('sent');
}); });
</script> </script>
<? } ?> <?php } ?>
<script type="text/javascript"> <script type="text/javascript">
$( "#slide-icon" ).click(function() { $( "#slide-icon" ).click(function() {

View File

@@ -1,24 +1,24 @@
<!DOCTYPE html> <!DOCTYPE html>
<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>
<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) { ?> <?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 +28,7 @@
</form> </form>
</section> </section>
<? include('blocks/d.footer.html'); ?> <?php include('blocks/d.footer.html'); ?>
</body> </body>
</html> </html>

View File

@@ -1,11 +1,11 @@
<!DOCTYPE html> <!DOCTYPE html>
<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="member_list"> <section id="member_list">
<h1>Liste des membres</h1> <h1>Liste des membres</h1>
@@ -34,37 +34,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?>&amp;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?>&amp;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?>&amp;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?>&amp;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>

View File

@@ -1,24 +1,24 @@
<!DOCTYPE html> <!DOCTYPE html>
<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>
<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>

View File

@@ -1,25 +1,25 @@
<!DOCTYPE html> <!DOCTYPE html>
<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) { ?>
<h1><?=$userProfile->name?></h1> <h1><?=$userProfile->name?></h1>
<article> <article>
<? if(isset($nameError) AND $nameError==1) { ?> <?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 } ?>
<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 +43,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 +70,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>

View File

@@ -1,66 +1,66 @@
<!DOCTYPE html> <!DOCTYPE html>
<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) { ?>
<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>
<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) { ?>
&mdash; &mdash;
<? } <?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)) { ?>
&mdash; &mdash;
<? } <?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) { ?>
<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>

View File

@@ -1,28 +1,28 @@
<!DOCTYPE html> <!DOCTYPE html>
<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>
<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") { ?> <?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 +35,7 @@
</form> </form>
</section> </section>
<? include('blocks/d.footer.html'); ?> <?php include('blocks/d.footer.html'); ?>
</body> </body>
</html> </html>

View File

@@ -1,19 +1,19 @@
<!DOCTYPE html> <!DOCTYPE html>
<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>
<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 +24,7 @@
</form> </form>
</section> </section>
<? include('blocks/d.footer.html'); ?> <?php include('blocks/d.footer.html'); ?>
</body> </body>
</html> </html>

View File

@@ -1,57 +1,57 @@
<!DOCTYPE html> <!DOCTYPE html>
<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="wiki_page" <?=$wikiPage->is_archive=="t"||$wikiPage->is_public=="f"?'class="archive"':''?>> <section id="wiki_page" <?=$wikiPage->is_archive=="t"||$wikiPage->is_public=="f"?'class="archive"':''?>>
<h1><?=$wikiPage->name?></h1> <h1><?=$wikiPage->name?></h1>
<? if($user->rankIsHigher('premium')) { ?> <?php if($user->rankIsHigher('premium')) { ?>
<span class="subtitle"> <span class="subtitle">
<? if(isset($wikiHistory)) { ?> <?php if(isset($wikiHistory)) { ?>
<select id="wikihistory"> <select id="wikihistory">
<? $i = 0; <?php $i = 0;
foreach ($wikiHistory->objs as $row) { ?> foreach ($wikiHistory->objs as $row) { ?>
<option <?=$row->version_id==$wikiPage->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'&bull; ':''?><? echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option> <option <?=$row->version_id==$wikiPage->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'&bull; ':''?><?php echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option>
<? $i++; <?php $i++;
} ?> } ?>
</select> </select>
<? } <?php }
if ($user->rankIsHigher('moderator') && isset($wikiHistory)) { ?> if ($user->rankIsHigher('moderator') && isset($wikiHistory)) { ?>
&mdash; &mdash;
<? } <?php }
if ($user->rankIsHigher('moderator')) { ?> if ($user->rankIsHigher('moderator')) { ?>
<a href="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/edit"><i class="fas fa-pencil-alt"></i> Éditer la page</a> &mdash; <a href="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/edit"><i class="fas fa-pencil-alt"></i> Éditer la page</a> &mdash;
<? if ($wikiPage->is_public=="t") { ?> <?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> <a href="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/delete"><i class="fas fa-trash"></i> Effacer la page</a>
<? } else { ?> <?php } else { ?>
<a href="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/restore"><i class="fas fa-eye"></i> Restaurer la page</a> <a href="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/restore"><i class="fas fa-eye"></i> Restaurer la page</a>
<? }?> <?php }?>
<? } ?> <?php } ?>
</span> </span>
<? } ?> <?php } ?>
<div id="wikiContent"> <div id="wikiContent">
<?=$wikiPage->content_html?> <?=$wikiPage->content_html?>
</div> </div>
<p id="wikiTimestamp">Page mise à jour le <? echo datefmt_format($user->datetime_format,date_create($wikiPage->update_date, new DateTimeZone("UTC"))) ?></p> <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> <div style="clear: both;"> </div>
</section> </section>
<? if($user->rankIsHigher('premium')) { ?> <?php if($user->rankIsHigher('premium')) { ?>
<script type="text/javascript"> <script type="text/javascript">
$( "#wikihistory" ).change(function() { $( "#wikihistory" ).change(function() {
window.location.href = "<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/"+$( this ).val(); window.location.href = "<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/"+$( this ).val();
}); });
</script> </script>
<? } ?> <?php } ?>
<? include('blocks/d.footer.html'); ?> <?php include('blocks/d.footer.html'); ?>
</body> </body>
</html> </html>