Replace PHP short tags
Co-authored-by: LeOSW42 <673670+LeOSW42@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
if(isset($controller->splitted_url[1]) && $user->rankIsHigher("moderator")) {
|
||||
switch ($controller->splitted_url[1]) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
require_once($config['models_folder']."d.blog.php");
|
||||
require_once($config['models_folder']."d.comments.php");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
function post($index) {
|
||||
return isset($_POST[$index]) ? $_POST[$index] : '';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
$head['css'] = "d.index.css";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
require_once($config['models_folder']."d.users.php");
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
require_once($config['models_folder']."d.wiki.php");
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
function generate_image_thumbnail($source_image_path, $thumbnail_image_path, $width, $height)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
/*****
|
||||
** This file contains the routing from any request to the correct view and controller
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
require_once($config['models_folder']."d.users.php");
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
namespace Kabano;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
namespace Kabano;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
namespace Kabano;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
namespace Kabano;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
namespace Kabano;
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@ class Markdown implements MarkdownInterface {
|
||||
[ ]*
|
||||
(?=\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.'}
|
||||
(?s:
|
||||
|
||||
@@ -2,45 +2,45 @@
|
||||
<meta charset="utf-8">
|
||||
<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">
|
||||
<? if (isset($head['css'])) {
|
||||
<?php if (isset($head['css'])) {
|
||||
foreach(explode(";",$head['css']) as $css) { ?>
|
||||
<link rel="stylesheet" href="<?=$config['views_url']?>css/<?=$css?>"/>
|
||||
<? }
|
||||
<?php }
|
||||
}
|
||||
else { ?>
|
||||
<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"/>
|
||||
|
||||
<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) { ?>
|
||||
<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>
|
||||
<? if (isset($head['js'])) {
|
||||
<?php if (isset($head['js'])) {
|
||||
foreach(explode(";",$head['js']) as $js) { ?>
|
||||
<script type="text/javascript" src="<?=$config['views_url']?>js/<?=$js?>"></script>
|
||||
<? }
|
||||
<?php }
|
||||
} ?>
|
||||
|
||||
<? if (isset($head['title'])) { ?>
|
||||
<?php if (isset($head['title'])) { ?>
|
||||
<title><?=$head['title']?> — Kabano</title>
|
||||
<? }
|
||||
<?php }
|
||||
else { ?>
|
||||
<title>Refuges de montagne et métallerie agricole</title>
|
||||
<? } ?>
|
||||
<? if (isset($head['description'])) { ?>
|
||||
<?php } ?>
|
||||
<?php if (isset($head['description'])) { ?>
|
||||
<meta name="description" content="<?=$head['description']?>">
|
||||
? }
|
||||
<?php }
|
||||
else { ?>
|
||||
<meta name="description" content="Entreprise de services dans la fabrication, la réparation, et l'entretien de bâtiments et machines agricoles">
|
||||
<? } ?>
|
||||
<? if (isset($head['keywords'])) { ?>
|
||||
<?php } ?>
|
||||
<?php if (isset($head['keywords'])) { ?>
|
||||
<meta name="keywords" content="<?=$head['keywords']?>">
|
||||
<? }
|
||||
<?php }
|
||||
else { ?>
|
||||
<meta name="keywords" content="kabano, cabanes, refuges, bivouac, montagne, randonnée, métallerie, agricole">
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</head>
|
||||
@@ -24,15 +24,15 @@
|
||||
</ul>
|
||||
</li>
|
||||
<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>
|
||||
<? } 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>
|
||||
<? } else { ?>
|
||||
<?php } else { ?>
|
||||
<a class="on-bar" href="#"><i class="icon fas fa-user-secret"></i></a>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
<ul>
|
||||
<? if($user->rank == 'visitor') { ?>
|
||||
<?php if($user->rank == 'visitor') { ?>
|
||||
<li id="connectform">
|
||||
<form action="<?=$config['rel_root_folder']?>user/login" method="post">
|
||||
<input type="text" name="login" placeholder="Nom d'utilisateur">
|
||||
@@ -41,14 +41,14 @@
|
||||
</form>
|
||||
</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/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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
<li><a href="<?=$config['rel_root_folder']?>user/logout">Se déconnecter</a></li>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="on-bar has-sub menu-icon"><a class="on-bar" href="#"><i class="icon fas fa-question"></i></a>
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1><?=$head['title']?></h1>
|
||||
<br>
|
||||
<pre><?
|
||||
<pre><?php
|
||||
foreach($output as $line) {
|
||||
echo $line."<br>";
|
||||
}
|
||||
?></pre>
|
||||
<br>
|
||||
|
||||
<? $i=0;
|
||||
<?php $i=0;
|
||||
foreach($backup_file as $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>
|
||||
<? } else { ?>
|
||||
<?php } else { ?>
|
||||
Fichier <?=$file?> non généré
|
||||
<? }
|
||||
<?php }
|
||||
$i++;
|
||||
}?>
|
||||
|
||||
<br>
|
||||
<h4>Archives des anciennes sauvegardes</h4>
|
||||
<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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,23 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1><?=$head['title']?></h1>
|
||||
<br>
|
||||
<pre><?
|
||||
<pre><?php
|
||||
foreach($output as $line) {
|
||||
echo $line."<br>";
|
||||
}
|
||||
?></pre>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,27 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Administration</h1>
|
||||
<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/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>
|
||||
<? } ?>
|
||||
<? if($user->rankIsHigher("moderator")) { ?>
|
||||
<?php } ?>
|
||||
<?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/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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,28 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1><?=$head['title']?></h1>
|
||||
<span class="subtitle">
|
||||
<select id="logfile">
|
||||
<? $i = 0;
|
||||
<?php $i = 0;
|
||||
foreach ($files_list as $row) {
|
||||
if ($row != "." && $row != "..") { ?>
|
||||
<option <?=$i==$filenb?'selected':''?> value="<?=$i?>"><? echo $row; ?></option>
|
||||
<? $i++;
|
||||
<option <?=$i==$filenb?'selected':''?> value="<?=$i?>"><?php echo $row; ?></option>
|
||||
<?php $i++;
|
||||
} ?>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</span>
|
||||
<br>
|
||||
<br>
|
||||
<pre><?
|
||||
<pre><?php
|
||||
foreach($output as $line) {
|
||||
echo $line."<br>";
|
||||
}
|
||||
@@ -35,7 +35,7 @@ $( "#logfile" ).change(function() {
|
||||
});
|
||||
</script>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,27 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1><?=$head['title']?></h1>
|
||||
<br>
|
||||
<pre><?
|
||||
<pre><?php
|
||||
print_r($output);
|
||||
?></pre>
|
||||
<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>
|
||||
<? } else { ?>
|
||||
<?php } else { ?>
|
||||
Echec de la commande
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,11 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section id="wiki_files">
|
||||
<h1><?=$head['title']?></h1>
|
||||
@@ -42,34 +42,34 @@
|
||||
<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>':''?>
|
||||
</th>
|
||||
<? if ($user->rankIsHigher("administrator")) { ?>
|
||||
<?php if ($user->rankIsHigher("administrator")) { ?>
|
||||
<th>Suppression</th>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</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>
|
||||
<td>
|
||||
<a href="<?=$config['rel_root_folder']?>medias/wiki/<?=$file['name']?>"><?=$file['name']?></a>
|
||||
</td>
|
||||
<td><i class='fas <?=getFontAwesomeIcon($file['type'])?>'></i> <?=$file['type']?></td>
|
||||
<td><?=formatBytes($file['size'], $user->locale)?></td>
|
||||
<td><? echo datefmt_format($user->date_format,date_create($file['creation_date'], new DateTimeZone("UTC"))) ?></td>
|
||||
<? if ($user->rankIsHigher("administrator")) { ?>
|
||||
<td><?php echo datefmt_format($user->date_format,date_create($file['creation_date'], new DateTimeZone("UTC"))) ?></td>
|
||||
<?php if ($user->rankIsHigher("administrator")) { ?>
|
||||
<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>
|
||||
</td>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<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><? }
|
||||
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 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><?php } ?>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,47 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<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">
|
||||
<? }
|
||||
<?php }
|
||||
else { ?>
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/edit" method="post">
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
|
||||
<h1>
|
||||
<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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<input type="text" value="<?=$blogArticle->name?>" name="name" id="name" placeholder="Titre">
|
||||
</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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
|
||||
<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">
|
||||
<label id="permalink_label" for="permalink"><?=$config['web_root_folder']?>blog/</label>
|
||||
<input type="text" name="permalink" id="permalink" placeholder="URL" required>
|
||||
</div>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
|
||||
<label for="is_commentable">
|
||||
<input type="checkbox" name="is_commentable" id="is_commentable"
|
||||
<? if($blogArticle->is_commentable == 't') { ?>
|
||||
<?php if($blogArticle->is_commentable == 't') { ?>
|
||||
checked
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
/>
|
||||
<span>Autoriser les commentaires</span>
|
||||
</label>
|
||||
@@ -69,7 +69,7 @@ $( "#name" ).change(function() {
|
||||
});
|
||||
</script>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,55 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section id="blog_list">
|
||||
<h1>Blog</h1>
|
||||
<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> —
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
<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?>
|
||||
</p>
|
||||
|
||||
<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>
|
||||
<div class="article_content"><?=mb_substr($row->content_txt,0,200)?>...</div>
|
||||
<p class="article_legend">
|
||||
<a class="article_link" href="<?=$config['rel_root_folder']?>blog/<?=$row->permalink?>">Lire la suite...</a>
|
||||
<span class="article_infos">
|
||||
<? echo datefmt_format($user->date_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?> par
|
||||
<? if ($user->rankIsHigher("registered")) { ?>
|
||||
<?php echo datefmt_format($user->date_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?> par
|
||||
<?php if ($user->rankIsHigher("registered")) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>user/p/<?=$row->author?>"><?=$row->author_name?></a>
|
||||
<? }
|
||||
<?php }
|
||||
else { ?>
|
||||
<?=$row->author_name?>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</span>
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<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><? }
|
||||
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 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><?php } ?>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,4 +1,4 @@
|
||||
<?
|
||||
<?php
|
||||
|
||||
$ts = gmdate("D, d M Y H:i:s", time() + 60) . " GMT";
|
||||
header("Content-disposition: filename=blog.rss");
|
||||
@@ -26,7 +26,7 @@ echo ('<?xml version="1.0" encoding="UTF-8"?>'); ?>
|
||||
<width>154</width>
|
||||
</image>
|
||||
|
||||
<? foreach ($blogArticles->objs as $row) { ?>
|
||||
<?php foreach ($blogArticles->objs as $row) { ?>
|
||||
|
||||
<item>
|
||||
<title><?=$row->name?></title>
|
||||
@@ -38,7 +38,7 @@ echo ('<?xml version="1.0" encoding="UTF-8"?>'); ?>
|
||||
]]></description>
|
||||
</item>
|
||||
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</channel>
|
||||
|
||||
@@ -1,66 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<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"':''?>>
|
||||
<h1><?=$blogArticle->name?></h1>
|
||||
<? if($user->rankIsHigher('premium')) { ?>
|
||||
<?php if($user->rankIsHigher('premium')) { ?>
|
||||
<span class="subtitle">
|
||||
<? if(isset($blogHistory)) { ?>
|
||||
<?php if(isset($blogHistory)) { ?>
|
||||
<select id="bloghistory">
|
||||
<? $i = 0;
|
||||
<?php $i = 0;
|
||||
foreach ($blogHistory->objs as $row) { ?>
|
||||
<option <?=$row->version_id==$blogArticle->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'• ':''?><? echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option>
|
||||
<? $i++;
|
||||
<option <?=$row->version_id==$blogArticle->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'• ':''?><?php echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option>
|
||||
<?php $i++;
|
||||
} ?>
|
||||
</select>
|
||||
<? }
|
||||
<?php }
|
||||
if ($user->rankIsHigher('moderator') && isset($blogHistory)) { ?>
|
||||
—
|
||||
<? }
|
||||
<?php }
|
||||
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> —
|
||||
<? 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>
|
||||
<? } else { ?>
|
||||
<?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 } ?>
|
||||
|
||||
<div id="blogContent">
|
||||
<?=$blogArticle->content_html?>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<? }
|
||||
<?php }
|
||||
else { ?>
|
||||
<?=$blogArticle->author_name?>
|
||||
<? } ?>
|
||||
le <? echo datefmt_format($user->datetime_format,date_create($blogArticle->creation_date, new DateTimeZone("UTC"))) ?></p>
|
||||
<?php } ?>
|
||||
le <?php echo datefmt_format($user->datetime_format,date_create($blogArticle->creation_date, new DateTimeZone("UTC"))) ?></p>
|
||||
|
||||
<!-- COMMENTS -->
|
||||
|
||||
<? if ($blogArticle->is_commentable == "t") { ?>
|
||||
<?php if ($blogArticle->is_commentable == "t") { ?>
|
||||
<div id="new_comment">
|
||||
<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' ":""?>>
|
||||
<? 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>
|
||||
<? } else if ($user->rankIsHigher("registered")) { ?>
|
||||
<?php } else if ($user->rankIsHigher("registered")) { ?>
|
||||
<input name="submit" type="submit" value="Envoyer">
|
||||
<p>Ajouter un nouveau commentaire</p>
|
||||
<? } else { ?>
|
||||
<?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>
|
||||
@@ -68,35 +68,35 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<? if($blogArticle->is_commentable == 't') {
|
||||
<?php if($blogArticle->is_commentable == 't') {
|
||||
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">
|
||||
<? 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">
|
||||
<? } else { ?>
|
||||
<?php } else { ?>
|
||||
<i class="icon fas fa-user-secret"></i>
|
||||
<? } ?>
|
||||
<? if ($user->rankIsHigher("blocked")) { ?>
|
||||
<?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>
|
||||
<? } else { ?>
|
||||
<?php } else { ?>
|
||||
<?=$comment->author_obj->name?>
|
||||
<? } ?>
|
||||
le <? 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 } ?>
|
||||
le <?php echo datefmt_format($user->datetime_format,date_create($comment->update_date, new DateTimeZone("UTC"))) ?>
|
||||
<?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>
|
||||
<? } ?>
|
||||
<? if (($user->rankIsHigher("moderator") || $user->id == $comment->author) && $comment->is_public == 'f') { ?>
|
||||
<?php } ?>
|
||||
<?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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="comment_content">
|
||||
<?=$comment->comment_html?>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<? }
|
||||
<?php }
|
||||
}
|
||||
} ?>
|
||||
|
||||
@@ -105,14 +105,14 @@
|
||||
<div style="clear: both;"> </div>
|
||||
</section>
|
||||
|
||||
<? if($user->rankIsHigher("premium")) { ?>
|
||||
<?php if($user->rankIsHigher("premium")) { ?>
|
||||
<script type="text/javascript">
|
||||
$( "#bloghistory" ).change(function() {
|
||||
window.location.href = "<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/"+$( this ).val();
|
||||
});
|
||||
</script>
|
||||
<? } ?>
|
||||
<? if($user->rankIsHigher("registered") && $blogArticle->is_archive == "f" && $blogArticle->is_public == "t") { ?>
|
||||
<?php } ?>
|
||||
<?php if($user->rankIsHigher("registered") && $blogArticle->is_archive == "f" && $blogArticle->is_public == "t") { ?>
|
||||
<script type="text/javascript">
|
||||
$( "#new_comment_label" ).click(function() {
|
||||
$( "#new_comment_form" ).show(400);
|
||||
@@ -120,9 +120,9 @@ $( "#new_comment_label" ).click(function() {
|
||||
$( "#new_comment_label").addClass('sent');
|
||||
});
|
||||
</script>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,11 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Contribuer au projet Kabano</h1>
|
||||
@@ -13,18 +13,18 @@
|
||||
<br>
|
||||
|
||||
<div class="action">
|
||||
<? if($user->rankIsHigher("registered")) { ?>
|
||||
<?php if($user->rankIsHigher("registered")) { ?>
|
||||
<div class="title"><i class="fas fa-home"></i>
|
||||
<a href="<?=$config['rel_root_folder']?>poi/new">Ajouter un hébergement de montagne</a>
|
||||
</div>
|
||||
<? } else { ?>
|
||||
<?php } else { ?>
|
||||
<div class="title" id="js_open_1"><i class="fas fa-home"></i>
|
||||
<p>Ajouter un hébergement de montagne</p>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="action">
|
||||
@@ -59,7 +59,7 @@ $( "#js_open_3" ).click(function() {
|
||||
});
|
||||
</script>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Me contacter</h1>
|
||||
<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>
|
||||
<? } ?>
|
||||
<? if($error=="subject") { ?>
|
||||
<?php } ?>
|
||||
<?php if($error=="subject") { ?>
|
||||
<p style="color: red;">Veuillez renseigner un sujet.</p>
|
||||
<? } ?>
|
||||
<? if($error=="email") { ?>
|
||||
<?php } ?>
|
||||
<?php if($error=="email") { ?>
|
||||
<p style="color: red;">Veuillez renseigner une adresse mail.</p>
|
||||
<? } ?>
|
||||
<? if($error=="message") { ?>
|
||||
<?php } ?>
|
||||
<?php if($error=="message") { ?>
|
||||
<p style="color: red;">Veuillez renseigner un message.</p>
|
||||
<? } ?>
|
||||
<? if($error=="unknown") { ?>
|
||||
<?php } ?>
|
||||
<?php if($error=="unknown") { ?>
|
||||
<p style="color: red;">Une erreur est survenue.</p>
|
||||
<? } ?>
|
||||
<? if($error=="spam") { ?>
|
||||
<?php } ?>
|
||||
<?php if($error=="spam") { ?>
|
||||
<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>
|
||||
<? } ?>
|
||||
<? if($error=="none") { ?>
|
||||
<?php } ?>
|
||||
<?php if($error=="none") { ?>
|
||||
<p style="color: green;">Message bien envoyé.</p>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
<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="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>
|
||||
<? if($user->rankIsHigher("registered")) { ?>
|
||||
<?php if($user->rankIsHigher("registered")) { ?>
|
||||
<input type="hidden" name="captcha" value="-2">
|
||||
<input type="submit" name="submit" value="Envoyer">
|
||||
<? }
|
||||
<?php }
|
||||
else { ?>
|
||||
<p id="captcha">
|
||||
<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>
|
||||
<input disabled id="captchasubmit" style="display:none;" type="submit" name="submit" value="Envoyer">
|
||||
</p>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
<input type="hidden" name="ns" value="<?=$contact['ns']?>"/>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,11 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<aside id="indexFullW">
|
||||
<div id="AScontent">
|
||||
@@ -15,7 +15,7 @@
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<?
|
||||
<?php
|
||||
require_once($config['models_folder']."d.wiki.php");
|
||||
$wikiPage = new Kabano\WikiPage();
|
||||
$wikiPage->checkPermalink('index');
|
||||
@@ -25,18 +25,18 @@
|
||||
<section id="index">
|
||||
<h1><?=$wikiPage->name?></h1>
|
||||
|
||||
<? if($user->rankIsHigher('moderator')) { ?>
|
||||
<?php if($user->rankIsHigher('moderator')) { ?>
|
||||
<span class="subtitle">
|
||||
<a href="<?=$config['rel_root_folder']?>wiki/index/edit"><i class="fas fa-pencil-alt"></i> Éditer la page</a>
|
||||
</span>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
|
||||
<br><br>
|
||||
|
||||
<?=$wikiPage->content_html?>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<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>
|
||||
-->
|
||||
@@ -18,21 +18,21 @@
|
||||
|
||||
<div id="footer-legend" style="display: none;">
|
||||
<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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
<script>
|
||||
var root = "<?=$config['rel_root_folder']?>";
|
||||
|
||||
// Icônes des POIs (déjà présentes dans ton système)
|
||||
window.poi_icons = {
|
||||
<? foreach($poi_types as $type) { ?>
|
||||
<?php foreach($poi_types as $type) { ?>
|
||||
"<?=$type[3]?>": "<?=$config['views_url']?>img/<?=$type[3]?>.svg",
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
"default": "<?=$config['views_url']?>img/default.svg"
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<div id="mapid"></div>
|
||||
|
||||
<div id="sticky">
|
||||
<section>
|
||||
<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">
|
||||
<? }
|
||||
<?php }
|
||||
else { ?>
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/edit" method="post">
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
<h1 class="flex_line">
|
||||
<input type="text" value="<?=$poi->name?>" name="name" id="name" placeholder="Nom de l'hébergement" required>
|
||||
<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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</h1>
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
</div>
|
||||
|
||||
<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
|
||||
<?=$poi->poi_type == $type[3] ? 'checked' : ''?>>
|
||||
<label for="<?=$type[3]?>"><img src="<?=$config['views_url']?>img/<?=$type[3]?>.svg"><br><?=$type[0]?></label>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
@@ -53,10 +53,10 @@ var current_poi_type = "<?= $poi->poi_type ?>";
|
||||
var unsaved = false;
|
||||
|
||||
// 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]?>_jsonform"] = <?=json_encode($type[5])?>;
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
|
||||
// 3 états : 0 = non, 1 = intermédiaire, 2 = oui
|
||||
function update3State(id) {
|
||||
@@ -187,12 +187,12 @@ $(document).ready(function(){
|
||||
<p id="abstract"></p>
|
||||
<div id="specific_form"></div>
|
||||
|
||||
<? if(isset($new) AND $new==1) { ?>
|
||||
<?php if(isset($new) AND $new==1) { ?>
|
||||
<div id="permalink_container">
|
||||
<label id="permalink_label" for="permalink"><?=$config['web_root_folder']?>poi/</label>
|
||||
<input type="text" name="permalink" id="permalink" placeholder="URL" required>
|
||||
</div>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$( "#name" ).keyup(function() {
|
||||
@@ -218,10 +218,10 @@ $( "#name" ).change(function() {
|
||||
</section>
|
||||
|
||||
<script>
|
||||
<? if($poi->lat != null && $poi->lon != null) { ?>
|
||||
<?php if($poi->lat != null && $poi->lon != null) { ?>
|
||||
var poi_lat = <?=$poi->lat?>;
|
||||
var poi_lon = <?=$poi->lon?>;
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
var poi_type = "<?=$poi->poi_type?>";
|
||||
var is_new = <?= isset($new) && $new == 1 ? "true" : "false" ?>;
|
||||
var root = "<?=$config['rel_root_folder']?>";
|
||||
@@ -234,7 +234,7 @@ $( "#slide-icon" ).click(function() {
|
||||
});
|
||||
</script>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,11 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<div id="mapid"></div>
|
||||
|
||||
@@ -50,30 +50,30 @@
|
||||
|
||||
</div>
|
||||
|
||||
<? if($user->rankIsHigher('premium')) { ?>
|
||||
<?php if($user->rankIsHigher('premium')) { ?>
|
||||
<span class="subtitle">
|
||||
<? if(isset($PoiHistory)) { ?>
|
||||
<?php if(isset($PoiHistory)) { ?>
|
||||
<select id="PoiHistory">
|
||||
<? $i = 0;
|
||||
<?php $i = 0;
|
||||
foreach ($PoiHistory->objs as $row) { ?>
|
||||
<option <?=$row->version_id==$poi->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'• ':''?><? echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option>
|
||||
<? $i++;
|
||||
<option <?=$row->version_id==$poi->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'• ':''?><?php echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option>
|
||||
<?php $i++;
|
||||
} ?>
|
||||
</select>
|
||||
<? }
|
||||
<?php }
|
||||
if ($user->rankIsHigher('moderator') && isset($PoiHistory)) { ?>
|
||||
—
|
||||
<? }
|
||||
<?php }
|
||||
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> —
|
||||
<? 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>
|
||||
<? } else { ?>
|
||||
<?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>
|
||||
@@ -165,18 +165,18 @@
|
||||
</div>
|
||||
|
||||
|
||||
<? if ($poi->is_commentable == 't') { ?>
|
||||
<?php if ($poi->is_commentable == 't') { ?>
|
||||
<div id="new_comment">
|
||||
<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' ":""?>>
|
||||
<? 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>
|
||||
<? } else if ($user->rankIsHigher("registered")) { ?>
|
||||
<?php } else if ($user->rankIsHigher("registered")) { ?>
|
||||
<input name="submit" type="submit" value="Envoyer">
|
||||
<p>Ajouter un nouveau commentaire</p>
|
||||
<? } else { ?>
|
||||
<?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>
|
||||
@@ -184,43 +184,43 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<? if (isset($poi_comments) && $poi_comments->number > 0) { ?>
|
||||
<?php if (isset($poi_comments) && $poi_comments->number > 0) { ?>
|
||||
<div id="comments">
|
||||
<? foreach ($poi_comments->objs as $comment) { ?>
|
||||
<article <? if($comment->is_archive == 't' || $comment->is_public == 'f') echo 'class="comment_archive" '; ?>>
|
||||
<?php foreach ($poi_comments->objs as $comment) { ?>
|
||||
<article <?php if($comment->is_archive == 't' || $comment->is_public == 'f') echo 'class="comment_archive" '; ?>>
|
||||
<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">
|
||||
<? } else { ?>
|
||||
<?php } else { ?>
|
||||
<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>
|
||||
<? } else { ?>
|
||||
<?php } else { ?>
|
||||
<?=$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']?>poi/<?=$poi->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']?>poi/<?=$poi->permalink?>/restore_comment/<?=$comment->id?>">
|
||||
<i class="fas fa-eye"></i> Restaurer le commentaire
|
||||
</a>
|
||||
</span>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -229,16 +229,16 @@
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
<br></div>
|
||||
<? } else { ?>
|
||||
<?php } else { ?>
|
||||
<p>Aucun commentaire pour le moment.</p>
|
||||
<? } ?>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -249,15 +249,15 @@
|
||||
var root = "<?=$config['rel_root_folder']?>";
|
||||
</script>
|
||||
|
||||
<? if($user->rankIsHigher("premium")) { ?>
|
||||
<?php if($user->rankIsHigher("premium")) { ?>
|
||||
<script type="text/javascript">
|
||||
$( "#PoiHistory" ).change(function() {
|
||||
window.location.href = "<?=$config['rel_root_folder']?>poi/<?=$poi->permalink?>/"+$( this ).val();
|
||||
});
|
||||
</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">
|
||||
$( "#new_comment_label" ).click(function() {
|
||||
$( "#new_comment_form" ).show(400);
|
||||
@@ -265,7 +265,7 @@ $( "#new_comment_label" ).click(function() {
|
||||
$( "#new_comment_label").addClass('sent');
|
||||
});
|
||||
</script>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$( "#slide-icon" ).click(function() {
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Connexion</h1>
|
||||
<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>
|
||||
<? } ?>
|
||||
<? if(isset($_GET['status']) AND $_GET['status']=="created") { ?>
|
||||
<?php } ?>
|
||||
<?php if(isset($_GET['status']) AND $_GET['status']=="created") { ?>
|
||||
<p style="color: #006600;">Votre compte a été créé, vous pouvez vous connecter.</p>
|
||||
<? } ?>
|
||||
<? if(isset($_GET['status']) AND $_GET['status']=="password_sent") { ?>
|
||||
<?php } ?>
|
||||
<?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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
<input type="text" name="login" id="login" placeholder="Nom d'utilisateur">
|
||||
<input type="password" name="password" id="password" placeholder="Mot de passe">
|
||||
<input type="submit" name="submit" value="Se connecter">
|
||||
@@ -28,7 +28,7 @@
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,11 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section id="member_list">
|
||||
<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>':''?>
|
||||
</th>
|
||||
</tr>
|
||||
<? foreach ($users->objs as $row) { ?>
|
||||
<?php foreach ($users->objs as $row) { ?>
|
||||
<tr>
|
||||
<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">
|
||||
<? } else { ?>
|
||||
<?php } else { ?>
|
||||
<i class="icon fas fa-user-secret"></i>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
<a class="username" href="<?=$config['rel_root_folder']?>user/p/<?=$row->id?>"><?=$row->name?></a>
|
||||
</td>
|
||||
<td><?=$row->get_rank()?></td>
|
||||
<td><? 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->register_date, new DateTimeZone("UTC"))) ?></td>
|
||||
<td><?php echo datefmt_format($user->date_format,date_create($row->visit_date, new DateTimeZone("UTC"))) ?></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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</table>
|
||||
|
||||
<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><? }
|
||||
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 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><?php } ?>
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,24 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Envoi d'un mot de passe</h1>
|
||||
<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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
<input type="email" name="email" id="email" placeholder="Adresse mail">
|
||||
<input type="submit" name="submit" value="Envoyer un nouveau mot de passe">
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,25 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section id="profile">
|
||||
<? if ($userProfile->id != 0) { ?>
|
||||
<?php if ($userProfile->id != 0) { ?>
|
||||
<h1><?=$userProfile->name?></h1>
|
||||
<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>
|
||||
<? } ?>
|
||||
<? if(isset($emailError) AND $emailError==1) { ?>
|
||||
<?php } ?>
|
||||
<?php if(isset($emailError) AND $emailError==1) { ?>
|
||||
<p style="color: #660000;">Veuillez choisir un autre email.</p>
|
||||
<? } ?>
|
||||
<? if(isset($updated) AND $updated==1) { ?>
|
||||
<?php } ?>
|
||||
<?php if(isset($updated) AND $updated==1) { ?>
|
||||
<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">
|
||||
<aside class="<?=$userProfile->is_avatar_present=='t'?'':'no'?>avatar">
|
||||
<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="locale">Langue :</label>
|
||||
<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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</select></li>
|
||||
<li><label for="timezone">Fuseau horaire :</label>
|
||||
<select name="timezone" id="timezone">
|
||||
<? $timezones = timezone_identifiers_list();
|
||||
<?php $timezones = timezone_identifiers_list();
|
||||
foreach($timezones as $timezone) { ?>
|
||||
<option <?=$userProfile->timezone==$timezone?'selected':''?> value="<?=$timezone?>"><?=$timezone?></option>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</select></li>
|
||||
<? if($user->rankIsHigher("administrator")) { ?>
|
||||
<?php if($user->rankIsHigher("administrator")) { ?>
|
||||
<li><label for="rank">Rang : </label>
|
||||
<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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</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>
|
||||
|
||||
<input name="submit" id="submit" type="submit" value="Envoyer">
|
||||
@@ -70,12 +70,12 @@
|
||||
<div style="clear:both;"></div>
|
||||
</form>
|
||||
</article>
|
||||
<? } else { ?>
|
||||
<?php } else { ?>
|
||||
<p style="color:red;">Le profil demandé n'existe pas.</p>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,66 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section id="profile">
|
||||
<? if ($userProfile->id != 0) { ?>
|
||||
<?php if ($userProfile->id != 0) { ?>
|
||||
<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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
<article>
|
||||
<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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
<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">
|
||||
<i id="profilenoavatar" class="fas fa-user-secret"></i>
|
||||
</aside>
|
||||
<div id="description">
|
||||
<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>Dernière connexion le <? echo datefmt_format($user->datetime_format,date_create($userProfile->visit_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 <?php echo datefmt_format($user->datetime_format,date_create($userProfile->visit_date, new DateTimeZone("UTC"))) ?></p>
|
||||
<p><?=$userProfile->get_rank()?></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>
|
||||
<? }
|
||||
<?php }
|
||||
if ($userProfile->website != "" AND $userProfile->id != $user->id) { ?>
|
||||
—
|
||||
<? }
|
||||
<?php }
|
||||
if ($userProfile->id != $user->id) { ?>
|
||||
<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)) { ?>
|
||||
—
|
||||
<? }
|
||||
<?php }
|
||||
if ($user->rankIsHigher("premium")) { ?>
|
||||
<a href="mailto:<?=$userProfile->email?>"><?=$userProfile->email?></a>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</p>
|
||||
</div>
|
||||
<div style="clear:both;"></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" >
|
||||
<textarea rows="12" name="message" id="message" placeholder="Votre message"></textarea>
|
||||
<p><i>Votre adresse email sera transmise à votre destinataire.</i></p>
|
||||
<input type="submit" name="submit" value="Envoyer">
|
||||
</form>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</article>
|
||||
<? } else { ?>
|
||||
<?php } else { ?>
|
||||
<p style="color:red;">Le profil demandé n'existe pas.</p>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,28 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Inscription</h1>
|
||||
<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>
|
||||
<? } ?>
|
||||
<? if(isset($_GET['error']) AND $_GET['error']=="email") { ?>
|
||||
<?php } ?>
|
||||
<?php if(isset($_GET['error']) AND $_GET['error']=="email") { ?>
|
||||
<p style="color: red;">Cette adresse mail est déjà prise.</p>
|
||||
<? } ?>
|
||||
<? if(isset($_GET['error']) AND $_GET['error']=="empty") { ?>
|
||||
<?php } ?>
|
||||
<?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>
|
||||
<? } ?>
|
||||
<? if(isset($_GET['error']) AND $_GET['error']=="captcha") { ?>
|
||||
<?php } ?>
|
||||
<?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>
|
||||
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="password" name="password" id="password" placeholder="Mot de passe">
|
||||
<input type="email" name="email" id="email" placeholder="Adresse mail">
|
||||
@@ -35,7 +35,7 @@
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,19 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
<?php include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/edit" method="post">
|
||||
<h1>
|
||||
<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>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<input type="text" value="<?=$wikiPage->name?>" name="name" id="name" placeholder="Titre">
|
||||
</h1>
|
||||
@@ -24,7 +24,7 @@
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,57 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
<?php include('blocks/d.head.html'); ?>
|
||||
|
||||
<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"':''?>>
|
||||
<h1><?=$wikiPage->name?></h1>
|
||||
<? if($user->rankIsHigher('premium')) { ?>
|
||||
<?php if($user->rankIsHigher('premium')) { ?>
|
||||
<span class="subtitle">
|
||||
<? if(isset($wikiHistory)) { ?>
|
||||
<?php if(isset($wikiHistory)) { ?>
|
||||
<select id="wikihistory">
|
||||
<? $i = 0;
|
||||
<?php $i = 0;
|
||||
foreach ($wikiHistory->objs as $row) { ?>
|
||||
<option <?=$row->version_id==$wikiPage->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'• ':''?><? echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option>
|
||||
<? $i++;
|
||||
<option <?=$row->version_id==$wikiPage->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'• ':''?><?php echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option>
|
||||
<?php $i++;
|
||||
} ?>
|
||||
</select>
|
||||
<? }
|
||||
<?php }
|
||||
if ($user->rankIsHigher('moderator') && isset($wikiHistory)) { ?>
|
||||
—
|
||||
<? }
|
||||
<?php }
|
||||
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> —
|
||||
<? 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>
|
||||
<? } else { ?>
|
||||
<?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 } ?>
|
||||
|
||||
<div id="wikiContent">
|
||||
<?=$wikiPage->content_html?>
|
||||
</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>
|
||||
</section>
|
||||
|
||||
<? if($user->rankIsHigher('premium')) { ?>
|
||||
<?php if($user->rankIsHigher('premium')) { ?>
|
||||
<script type="text/javascript">
|
||||
$( "#wikihistory" ).change(function() {
|
||||
window.location.href = "<?=$config['rel_root_folder']?>wiki/<?=$wikiPage->permalink?>/"+$( this ).val();
|
||||
});
|
||||
</script>
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
<?php include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user