Compare commits
82 Commits
da27362fd5
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49e83aef49 | ||
|
|
3996b79cf9 | ||
|
|
587572297d | ||
|
|
5c34318982 | ||
|
|
8c66a92e39 | ||
|
|
20c2c24988 | ||
|
|
991fff087e | ||
|
|
029635e509 | ||
|
|
be0bd0195a | ||
|
|
5c228c9533 | ||
|
|
723b81aebd | ||
|
|
1e5d1a7cc9 | ||
|
|
16ca71e399 | ||
|
|
df2e08f54a | ||
|
|
114c971184 | ||
|
|
d3c2987c9b | ||
|
|
c7aa53b1f0 | ||
|
|
159f21d5b2 | ||
|
|
5080425824 | ||
|
|
e4983112db | ||
|
|
f4325d3a5a | ||
|
|
6bdbcec947 | ||
|
|
79a33031d6 | ||
|
|
6aad02ce2d | ||
|
|
810207ef9b | ||
|
|
363df1ab75 | ||
|
|
b866cc890e | ||
|
|
6b3edaed02 | ||
|
|
a8bc3e7ef7 | ||
|
|
bd8786daed | ||
|
|
f284c1883c | ||
|
|
c4c91315ec | ||
|
|
f845eb3ef4 | ||
|
|
06bf74ea21 | ||
|
|
10a72dcdb9 | ||
|
|
86fad21898 | ||
|
|
83df17669d | ||
|
|
54226e3cbd | ||
|
|
fd76affce9 | ||
|
|
4eb8f685c5 | ||
|
|
2801ddf144 | ||
|
|
d75de36d61 | ||
|
|
208e3132ad | ||
|
|
d744317283 | ||
|
|
e3de743bb8 | ||
|
|
acfb15d5e3 | ||
|
|
4e1f6a9083 | ||
|
|
bb365942ab | ||
|
|
42a3aa08f5 | ||
|
|
d9963bf64b | ||
|
|
6137f6a027 | ||
|
|
f874f6b17e | ||
|
|
f9f6debe65 | ||
|
|
ca25bccbec | ||
|
|
74b3a8721a | ||
|
|
23f8123718 | ||
|
|
98103c096e | ||
|
|
6340175e44 | ||
|
|
92e21aa959 | ||
|
|
c77b9e524d | ||
|
|
f1ae1d174e | ||
|
|
ceda4b4d22 | ||
|
|
d2b556dec7 | ||
|
|
67b1b3c9e5 | ||
|
|
391cfc1273 | ||
|
|
a53ddf22ff | ||
|
|
238eebc00b | ||
|
|
bc44a41106 | ||
|
|
4ab51c9687 | ||
|
|
613776264c | ||
|
|
687de1ed71 | ||
|
|
36be8018b4 | ||
|
|
8490877990 | ||
|
|
662f72a006 | ||
|
|
f60cf54bab | ||
|
|
507bf492a0 | ||
|
|
af4103c31c | ||
|
|
36a42bb4f6 | ||
|
|
7ec61dbc63 | ||
|
|
3a497bbb64 | ||
|
|
fbdc2485aa | ||
|
|
dfa4dccd6c |
1
.gitignore
vendored
@@ -5,3 +5,4 @@ _ressources/dump.sql
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
*.log
|
||||
/tmp/*
|
||||
BIN
_ressources/logo_carre.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
85
_ressources/logo_carre.svg
Normal file
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="44"
|
||||
height="44"
|
||||
viewBox="0 0 44 44"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
|
||||
sodipodi:docname="logo_carre.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="3.959798"
|
||||
inkscape:cx="17.172593"
|
||||
inkscape:cy="21.465742"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="702"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(2.2888184e-7,-1008.3622)">
|
||||
<g
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="text4136"
|
||||
transform="matrix(1.1379801,0,0,1.1379801,3.1581138e-8,-151.20504)" />
|
||||
<g
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="text4136-1"
|
||||
transform="matrix(1.1379801,0,0,1.1379801,-348.56109,665.85293)">
|
||||
<path
|
||||
d="m 327.11423,334.16668 -10.09786,-27.23536 -10.34214,27.23536 z m -18.81955,-1.26818 5.88391,-15.54965 4.87414,-1.40926 6.40569,16.95891 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:200;font-stretch:normal;font-family:'Fira Sans';-inkscape-font-specification:'Fira Sans Ultra-Light';fill:#000000;fill-opacity:1"
|
||||
id="path4159"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccc" />
|
||||
<path
|
||||
d="m 344.58688,334.12116 -0.008,-1.22266 h -1.36672 l -8.73903,-23.79476 0.83839,-1.55306 -0.73436,-0.62958 -0.82296,1.22506 -0.69448,-1.17371 -0.71601,0.66008 0.84437,1.49829 -9.42882,23.76768 h -1.23813 l 0.0188,1.26818 z m -17.50259,-1.22266 6.57828,-15.42426 6.1435,15.42426 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:200;font-stretch:normal;font-size:40px;line-height:125%;font-family:'Fira Sans';-inkscape-font-specification:'Fira Sans Ultra-Light';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="path4159-4"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccccccccccccc" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.7 KiB |
BIN
_ressources/logo_carre_blanc.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
_ressources/logo_carre_noir.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
@@ -12,7 +12,7 @@ if(isset($controller->splitted_url[1]) && $user->rankIsHigher("moderator")) {
|
||||
|
||||
$output = array();
|
||||
chdir($config['abs_root_folder']);
|
||||
exec("git pull", $output);
|
||||
exec("git pull 2>&1", $output);
|
||||
|
||||
include ($config['views_folder']."d.admin.git-pull.html");
|
||||
}
|
||||
@@ -42,9 +42,201 @@ if(isset($controller->splitted_url[1]) && $user->rankIsHigher("moderator")) {
|
||||
$notfound = 1;
|
||||
}
|
||||
break;
|
||||
case 'wiki-files':
|
||||
if ($user->rankIsHigher("moderator")) {
|
||||
$head['css'] = "d.index.css;d.admin.css";
|
||||
$head['title'] = "Fichiers attachés au wiki";
|
||||
$rows_per_pages = 50;
|
||||
$files_folder = $config['medias_folder']."wiki/";
|
||||
|
||||
// Delete a file
|
||||
if ($user->rankIsHigher("administrator")) {
|
||||
if(isset($controller->splitted_url[2]) && $controller->splitted_url[2]=='delete' && isset($controller->splitted_url[3])) {
|
||||
$filename=$files_folder.$controller->splitted_url[3];
|
||||
if (file_exists($filename)) {
|
||||
unlink($filename);
|
||||
error_log(date('r')." \t".$user->name." (".$user->id.") \tDELETE \tDelete wiki file '".$controller->splitted_url[3]."'\r\n",3,$config['logs_folder'].'wiki-files.log');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add a file
|
||||
if(isset($controller->splitted_url[2]) && $controller->splitted_url[2]=='upload' && isset($_FILES['file'])) {
|
||||
$filename=$config['medias_folder']."wiki/".$_FILES['file']['name'];
|
||||
if(move_uploaded_file($_FILES['file']['tmp_name'], $filename)) {
|
||||
error_log(date('r')." \t".$user->name." (".$user->id.") \tUPLOAD Upload wiki file '".$_FILES['file']['name']."'\r\n",3,$config['logs_folder'].'wiki-files.log');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Get the file list
|
||||
$files_list = scandir($files_folder);
|
||||
// Populate table
|
||||
foreach ($files_list as $file) {
|
||||
$file_path = $files_folder.$file;
|
||||
|
||||
if (is_file($file_path)) {
|
||||
$file_info = [
|
||||
'name' => $file,
|
||||
'type' => mime_content_type($file_path),
|
||||
'creation_date' => date("Y-m-d H:i:s", filectime($file_path)),
|
||||
'size' => filesize($file_path),
|
||||
];
|
||||
|
||||
$files[] = $file_info;
|
||||
}
|
||||
}
|
||||
$filenb = count($files);
|
||||
|
||||
// Manage sorting
|
||||
if(isset($_GET['orderby']))
|
||||
$orderby = $_GET['orderby'];
|
||||
else
|
||||
$orderby = 'name';
|
||||
if(isset($_GET['order']) && $_GET['order']=='ASC') {
|
||||
$order = 'ASC';
|
||||
usort($files, function ($a, $b) use ($orderby) { return $a[$orderby] <=> $b[$orderby]; });
|
||||
}
|
||||
else {
|
||||
$order = 'DESC';
|
||||
usort($files, function ($a, $b) use ($orderby) { return $b[$orderby] <=> $a[$orderby]; });
|
||||
}
|
||||
|
||||
// Get the correct page number
|
||||
if (!isset($controller->splitted_url[2]) OR $controller->splitted_url[2]=="" OR $controller->splitted_url[2]=="0" OR !is_numeric($controller->splitted_url[2])) {
|
||||
$page = 0;
|
||||
} else {
|
||||
$page = $controller->splitted_url[2] - 1;
|
||||
}
|
||||
// In case the wanted page is too big
|
||||
if($rows_per_pages * $page >= $filenb)
|
||||
$page = 0;
|
||||
|
||||
$first = $page*$rows_per_pages+1;
|
||||
$last = (($page+1)*$rows_per_pages > $filenb ? $filenb : ($page+1)*$rows_per_pages);
|
||||
include ($config['views_folder']."d.admin.wiki-files.html");
|
||||
}
|
||||
else {
|
||||
$notfound = 1;
|
||||
}
|
||||
break;
|
||||
case 'stats':
|
||||
if ($user->rankIsHigher("moderator")) {
|
||||
$head['title'] = "Statistiques";
|
||||
|
||||
$report = $config['abs_root_folder'].'tmp/report.html';
|
||||
|
||||
$files = glob('/var/log/nginx/kabano.org-access.log*.gz');
|
||||
|
||||
$parts = [];
|
||||
|
||||
if (!empty($files)) {
|
||||
$parts[] = 'zcat ' . implode(' ', array_map('escapeshellarg', $files));
|
||||
}
|
||||
|
||||
if (file_exists('/var/log/nginx/kabano.org-access.log.1')) {
|
||||
$parts[] = 'cat /var/log/nginx/kabano.org-access.log.1';
|
||||
}
|
||||
|
||||
$parts[] = 'cat /var/log/nginx/kabano.org-access.log';
|
||||
|
||||
$command = '/bin/bash -c \'(' . implode(' && ', $parts) . ')'
|
||||
. ' | goaccess --log-format=COMBINED --no-progress -o '
|
||||
. escapeshellarg($report)
|
||||
. ' -\' 2>&1';
|
||||
|
||||
$output = shell_exec($command);
|
||||
|
||||
include ($config['views_folder']."d.admin.stats.html");
|
||||
}
|
||||
else {
|
||||
$notfound = 1;
|
||||
}
|
||||
break;
|
||||
case 'sql-backup':
|
||||
if ($user->rankIsHigher("administrator")) {
|
||||
$head['title'] = "Export SQL";
|
||||
|
||||
if(isset($controller->splitted_url[2]) && $controller->splitted_url[2]=='delete' && isset($controller->splitted_url[3])) {
|
||||
unlink($config['abs_root_folder'].'tmp/'.$controller->splitted_url[3]);
|
||||
$output = Array();
|
||||
$backup_file = Array();
|
||||
}
|
||||
else {
|
||||
// Nom du fichier de sauvegarde
|
||||
$timestamp = date('Ymd_His');
|
||||
$backup_filename[0] = $timestamp.'_backup.sql';
|
||||
$backup_file[0] = $config['abs_root_folder'].'tmp/'.$backup_filename[0];
|
||||
|
||||
// Construction de la commande pg_dump
|
||||
$cmd = 'PGPASSWORD="'.$config['SQL_pass'].'" pg_dump -h '.$config['SQL_host'].' -U '.$config['SQL_user'].' -F c -b -v -f "'.$backup_file[0].'" '.$config['SQL_db'].' 2>&1';
|
||||
|
||||
$output = [];
|
||||
$return_var = 0;
|
||||
exec($cmd, $output, $return_var);
|
||||
}
|
||||
|
||||
$backup_files = glob($config['abs_root_folder'].'tmp/*.sql');
|
||||
|
||||
include ($config['views_folder']."d.admin.backup.html");
|
||||
}
|
||||
else {
|
||||
$notfound = 1;
|
||||
}
|
||||
break;
|
||||
case 'files-backup':
|
||||
if ($user->rankIsHigher("administrator")) {
|
||||
$head['title'] = "Export des fichiers";
|
||||
$output = Array();
|
||||
$backup_file = Array();
|
||||
|
||||
if(isset($controller->splitted_url[2]) && $controller->splitted_url[2]=='delete' && isset($controller->splitted_url[3])) {
|
||||
unlink($config['abs_root_folder'].'tmp/'.$controller->splitted_url[3]);
|
||||
}
|
||||
else {
|
||||
// Nom du fichier de sauvegarde
|
||||
$timestamp = date('Ymd_His');
|
||||
$backup_source[0] = $config['abs_root_folder'].'medias/avatars';
|
||||
$backup_source[1] = $config['abs_root_folder'].'medias/wiki';
|
||||
$backup_filename[0] = $timestamp.'_avatar_files.zip';
|
||||
$backup_filename[1] = $timestamp.'_wiki_files.zip';
|
||||
|
||||
for($i=0;$i<2;$i++) {
|
||||
$backup_file[$i] = $config['abs_root_folder'].'tmp/'.$backup_filename[$i];
|
||||
|
||||
$backup[$i] = new ZipArchive();
|
||||
if ($backup[$i]->open($backup_file[$i], ZipArchive::CREATE | ZipArchive::OVERWRITE) === TRUE) {
|
||||
$files = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($backup_source[$i]),
|
||||
RecursiveIteratorIterator::LEAVES_ONLY
|
||||
);
|
||||
|
||||
foreach ($files as $name => $file) {
|
||||
if (!$file->isDir()) {
|
||||
$filePath = $file->getRealPath();
|
||||
$relativePath = substr($filePath, strlen(realpath($backup_source[$i])) + 1);
|
||||
$backup[$i]->addFile($filePath, $relativePath);
|
||||
}
|
||||
}
|
||||
|
||||
$backup[$i]->close();
|
||||
} else {
|
||||
$output[0] = "Erreur lors de la création de l'archive $backup_filename[$i] avec les avatars de $backup_source[$i]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$backup_files = glob($config['abs_root_folder'].'tmp/*.zip');
|
||||
|
||||
include ($config['views_folder']."d.admin.backup.html");
|
||||
}
|
||||
else {
|
||||
$notfound = 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$notfound = 1;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if($user->rankIsHigher("moderator")) {
|
||||
@@ -55,4 +247,41 @@ else {
|
||||
$notfound = 1;
|
||||
}
|
||||
|
||||
// Fonctions de mise en forme
|
||||
|
||||
function getFontAwesomeIcon($mimeType) {
|
||||
$icons = [
|
||||
'application/pdf' => 'fa-file-pdf',
|
||||
'image/jpeg' => 'fa-file-image',
|
||||
'image/png' => 'fa-file-image',
|
||||
'application/zip' => 'fa-file-archive',
|
||||
'text/plain' => 'fa-file-alt',
|
||||
'application/vnd.ms-excel' => 'fa-file-excel',
|
||||
'application/msword' => 'fa-file-word',
|
||||
'video/mp4' => 'fa-file-video',
|
||||
'audio/mpeg' => 'fa-file-audio',
|
||||
];
|
||||
|
||||
return $icons[$mimeType] ?? 'fa-file'; // Default
|
||||
}
|
||||
|
||||
function formatBytes($bytes, $locale = 'en', $precision = 2) {
|
||||
$unitMap = [
|
||||
'en' => ['B', 'KB', 'MB', 'GB', 'TB', 'PB'],
|
||||
'fr' => ['o', 'Ko', 'Mo', 'Go', 'To', 'Po']
|
||||
];
|
||||
|
||||
$locale = explode('_', $locale)[0];
|
||||
$units = $unitMap[$locale] ?? $unitMap['en'];
|
||||
|
||||
if ($bytes == 0) {
|
||||
return '0 ' . $units[0];
|
||||
}
|
||||
|
||||
$power = floor(log($bytes, 1024));
|
||||
$formatted = round($bytes / pow(1024, $power), $precision);
|
||||
|
||||
return $formatted . ' ' . $units[$power];
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -126,6 +126,7 @@ if(isset($controller->splitted_url[1])) {
|
||||
if($_POST['password']!='')
|
||||
$userProfile->password=sha1($_POST['password']);
|
||||
$userProfile->locale=$_POST['locale'];
|
||||
$userProfile->timezone=$_POST['timezone'];
|
||||
if($user->rankIsHigher("administrator"))
|
||||
$userProfile->rank = $_POST['rank'];
|
||||
$userProfile->website=$_POST['website'];
|
||||
|
||||
@@ -69,6 +69,8 @@ else if(isset($controller->splitted_url[1]) && $wikiPage->checkPermalink($contro
|
||||
|
||||
$wikiPage->md2html();
|
||||
$head['title'] = $wikiPage->name;
|
||||
$head['css'] .= ";../third/simplelightbox/simple-lightbox.min.css";
|
||||
$head['third'] = "simplelightbox/simple-lightbox.min.js";
|
||||
include ($config['views_folder']."d.wiki.view.html");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
locale_set_default("fr_FR");
|
||||
date_default_timezone_set("UTC"); // Default tz for date manipulation is UTC. Display tz is in session.php
|
||||
|
||||
|
||||
/*****
|
||||
|
||||
@@ -25,10 +25,10 @@ function generate_image_thumbnail($source_image_path, $thumbnail_image_path, $wi
|
||||
// If the limitation is on the height (cuts on the width)
|
||||
if($height*$source_image_width/$source_image_height > $width) {
|
||||
$src_x = (int)(($source_image_width - $source_image_height * $width / $height) / 2);
|
||||
$source_image_width = $source_image_height * $width / $height;
|
||||
$source_image_width = (int)($source_image_height * $width / $height);
|
||||
} else {
|
||||
$src_y = (int)(($source_image_height - $source_image_width * $height / $width) / 2);
|
||||
$source_image_height = $source_image_width * $height / $width;
|
||||
$source_image_height = (int)($source_image_width * $height / $width);
|
||||
}
|
||||
|
||||
$thumbnail_gd_image = imagecreatetruecolor($thumbnail_image_width, $thumbnail_image_height);
|
||||
|
||||
@@ -6,17 +6,33 @@ ini_set("session.cookie_lifetime",60*60*24*30);
|
||||
session_start();
|
||||
|
||||
$user = new Kabano\User();
|
||||
$user->rank = "visitor"; // All users are visitors
|
||||
|
||||
if(isset($_SESSION['userid'])) {
|
||||
$user->checkID($_SESSION['userid']);
|
||||
if ($user->checkID($_SESSION['userid'])) {
|
||||
$user->updateLoginDate();
|
||||
//setlocale(LC_ALL, $config['locales'][$user->locale][4]);
|
||||
$config['locale'] = $user->locale;
|
||||
$config['timezone'] = $user->timezone;
|
||||
}
|
||||
else {
|
||||
session_destroy();
|
||||
$config['locale'] = "fr_FR";
|
||||
$config['timezone'] = "Europe/Paris";
|
||||
$user->rank = "visitor"; // All users are visitors
|
||||
}
|
||||
}
|
||||
else {
|
||||
$config['locale'] = "fr_FR";
|
||||
$config['timezone'] = "Europe/Paris";
|
||||
$user->rank = "visitor"; // All users are visitors
|
||||
}
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
$user->date_format = new IntlDateFormatter($config['locale'], IntlDateFormatter::LONG, IntlDateFormatter::NONE, $config['timezone']);
|
||||
} else {
|
||||
$user->date_format = new IntlDateFormatter($config['locale'], IntlDateFormatter::RELATIVE_LONG, IntlDateFormatter::NONE, $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']);
|
||||
|
||||
|
||||
?>
|
||||
@@ -39,6 +39,10 @@ class Poi
|
||||
public $alt_position = NULL;
|
||||
public $parameters = NULL;
|
||||
|
||||
public $lat;
|
||||
public $lon;
|
||||
public $ele;
|
||||
|
||||
/*****
|
||||
** Checks if a page at this URL exists and return the ID
|
||||
*****/
|
||||
|
||||
@@ -38,6 +38,13 @@ class User
|
||||
public $visit_date = NULL;
|
||||
public $register_date = NULL;
|
||||
|
||||
public $date_format;
|
||||
public $datetime_format;
|
||||
public $datetimeshort_format;
|
||||
public $locale_obj;
|
||||
public $locale_loaded = false;
|
||||
|
||||
|
||||
/*****
|
||||
** Connect to correct account using ID and stores its ID
|
||||
*****/
|
||||
@@ -119,7 +126,7 @@ class User
|
||||
return '<span class="userrole" style="color: '.$ranks[$this->rank][2].';">'.$ranks[$this->rank][1].'</span>';
|
||||
}
|
||||
public function get_locale() {
|
||||
if( isset($this->locale_loaded) ) {
|
||||
if( $this->locale_loaded) {
|
||||
return $this->locale_obj->display_name;
|
||||
}
|
||||
else {
|
||||
@@ -213,7 +220,7 @@ class User
|
||||
$this->visit_date = date('r');
|
||||
$this->register_date = date('r');
|
||||
$this->locale = "fr_FR";
|
||||
$this->timezone = "CEST";
|
||||
$this->timezone = "Europe/Paris";
|
||||
|
||||
$con = pg_connect("host=".$config['SQL_host']." dbname=".$config['SQL_db']." user=".$config['SQL_user']." password=".$config['SQL_pass'])
|
||||
or die ("Could not connect to server\n");
|
||||
@@ -245,17 +252,17 @@ class User
|
||||
or die ("Could not connect to server\n");
|
||||
|
||||
if($this->password=='') {
|
||||
$query = "UPDATE users SET version = $1, name = $2, is_avatar_present = $3, locale = $4, rank = $5, email = $6, website = $7 WHERE id = $8";
|
||||
$query = "UPDATE users SET version = $1, name = $2, is_avatar_present = $3, locale = $4, rank = $5, email = $6, website = $7, timezone = $8 WHERE id = $9";
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
pg_execute($con, "prepare1", array($this->version, $this->name, $this->is_avatar_present, $this->locale, $this->rank, $this->email, $this->website, $this->id))
|
||||
pg_execute($con, "prepare1", array($this->version, $this->name, $this->is_avatar_present, $this->locale, $this->rank, $this->email, $this->website, $this->timezone, $this->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
}
|
||||
else {
|
||||
$query = "UPDATE users SET name = $1, is_avatar_present = $2, locale = $3, rank = $4, email = $5, website = $6, password = $7 WHERE id = $8";
|
||||
$query = "UPDATE users SET name = $1, is_avatar_present = $2, locale = $3, rank = $4, email = $5, website = $6, password = $7, timezone = $8, version = $9 WHERE id = $10";
|
||||
pg_prepare($con, "prepare1", $query)
|
||||
or die ("Cannot prepare statement\n");
|
||||
pg_execute($con, "prepare1", array($this->name, $this->is_avatar_present, $this->locale, $this->rank, $this->email, $this->website, $this->password, $this->id))
|
||||
pg_execute($con, "prepare1", array($this->name, $this->is_avatar_present, $this->locale, $this->rank, $this->email, $this->website, $this->password, $this->timezone, $this->version, $this->id))
|
||||
or die ("Cannot execute statement\n");
|
||||
}
|
||||
|
||||
@@ -299,7 +306,7 @@ class User
|
||||
$message .= "Cordialement,<br>\r\n";
|
||||
$message .= "<br>\r\n";
|
||||
$message .= "L'équipe Kabano.<br>\r\n";
|
||||
$message .= "<small style='color:#777;'><i>Fait avec ♥ depuis Toulouse.</i></small><br>\r\n";
|
||||
$message .= "<small style='color:#777;'><i>Fait avec ♥ en Ariège.</i></small><br>\r\n";
|
||||
|
||||
$headers = 'From: '. $config['bot_mail'] . "\r\n" .
|
||||
'Reply-To: '. $config['bot_mail'] . "\r\n" .
|
||||
|
||||
@@ -30,6 +30,8 @@ class WikiPage
|
||||
public $name = NULL;
|
||||
public $content = NULL;
|
||||
|
||||
public $content_html;
|
||||
|
||||
/*****
|
||||
** Checks if a page at this ermalink exists and return the populated element
|
||||
*****/
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
<footer>
|
||||
<div id="footernav">
|
||||
<a href="<?=$config['rel_root_folder']?>wiki/legal">Mentions Légales</a> —
|
||||
<a href="<?=$config['rel_root_folder']?>contact">Contact</a>
|
||||
<div class="flex">
|
||||
<p class="flex-element"><a target="_blank" href="https://www.facebook.com/kabano09"><i class="fab fa-facebook-square"></i></a> Léo Serre — <script>document.write("06 " + "1" + "8 6" + "2 3" + "2 ");</script>05</p>
|
||||
<div id="footernav" class="flex-element">
|
||||
<a href="<?=$config['rel_root_folder']?>wiki/cgv">CGV</a> —
|
||||
<a href="<?=$config['rel_root_folder']?>wiki/legal">Mentions Légales</a> —
|
||||
<a href="<?=$config['rel_root_folder']?>contact">Contact</a>
|
||||
</div>
|
||||
</div>
|
||||
<p><i>Applications mobiles bientôt disponibles.</i></p>
|
||||
</footer>
|
||||
@@ -1,6 +1,6 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<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'])) {
|
||||
foreach(explode(";",$head['css']) as $css) { ?>
|
||||
@@ -29,18 +29,18 @@
|
||||
<title><?=$head['title']?> — Kabano</title>
|
||||
<? }
|
||||
else { ?>
|
||||
<title>Cabanes et bivouac en montagne</title>
|
||||
<title>Refuges de montagne et métallerie agricole</title>
|
||||
<? } ?>
|
||||
<? if (isset($head['description'])) { ?>
|
||||
<meta name="description" content="<?=$head['description']?>">
|
||||
? }
|
||||
else { ?>
|
||||
<meta name="description" content="Annuaire collaboratif des hébergements pour les activitées de plein air : cabanes, refuges, campings...">
|
||||
<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'])) { ?>
|
||||
<meta name="keywords" content="<?=$head['keywords']?>">
|
||||
<? }
|
||||
else { ?>
|
||||
<meta name="keywords" content="kabano, huts, mountain, hiking, cabanes, refuges, bivouac, montagne, randonnée">
|
||||
<meta name="keywords" content="kabano, cabanes, refuges, bivouac, montagne, randonnée, métallerie, agricole">
|
||||
<? } ?>
|
||||
</head>
|
||||
@@ -4,12 +4,26 @@
|
||||
<img alt="Kabano logo" src="<?=$config['views_url'].'img/'?>header.svg">
|
||||
</a>
|
||||
<nav>
|
||||
<ul>
|
||||
<li class="on-bar"><a class="on-bar" href="<?=$config['rel_root_folder']?>map">Carte</a></li>
|
||||
<!-- <li class="on-bar"><a class="on-bar" href="<?=$config['rel_root_folder']?>search">Recherche</a></li>
|
||||
<li class="on-bar"><a class="on-bar" href="<?=$config['rel_root_folder']?>news">Nouveautés</a></li> -->
|
||||
<li class="on-bar"><a class="on-bar" href="<?=$config['rel_root_folder']?>community">Contribuer</a></li>
|
||||
<li class="on-bar has-sub">
|
||||
<input type="checkbox" id="togglemenu"><label for="togglemenu" class="hamburger on-bar"><i class="icon fas fa-bars"></i></label>
|
||||
<ul id="menu">
|
||||
<li class="on-bar has-sub with-subtitle"><a class="on-bar" href="#">Restauration<br>
|
||||
<span class="subtitle">de refuges pastoraux</span></a>
|
||||
<ul>
|
||||
<li><a href="<?=$config['rel_root_folder']?>wiki/restauration-de-refuges">Activités</a></li>
|
||||
<li><a href="<?=$config['rel_root_folder']?>wiki/portfolio-restauration">Réalisations</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="on-bar with-subtitle"><a class="on-bar" href="<?=$config['rel_root_folder']?>wiki/metallerie">Métallerie<br>
|
||||
<span class="subtitle">agricole</span></a></li>
|
||||
<li class="on-bar has-sub with-subtitle">
|
||||
<a class="on-bar" href="#">Inventaire<br>
|
||||
<span class="subtitle">des cabanes de montagne</span></a>
|
||||
<ul>
|
||||
<li><a href="<?=$config['rel_root_folder']?>map">Carte</a></li>
|
||||
<li><a href="<?=$config['rel_root_folder']?>community">Contribuer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="on-bar has-sub menu-icon">
|
||||
<? if ($user->id == 0) { ?>
|
||||
<a class="on-bar" href="#"><i class="icon fas fa-user"></i></a>
|
||||
<? } elseif ($user->is_avatar_present == 't') { ?>
|
||||
@@ -37,12 +51,12 @@
|
||||
<? } ?>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="on-bar has-sub"><a class="on-bar" href="#"><i class="icon fas fa-question"></i></a>
|
||||
<li class="on-bar has-sub menu-icon"><a class="on-bar" href="#"><i class="icon fas fa-question"></i></a>
|
||||
<ul>
|
||||
<li><a href="<?=$config['rel_root_folder']?>wiki/help">Aide</a></li>
|
||||
<!--<li><a href="<?=$config['rel_root_folder']?>wiki/help">Aide</a></li>-->
|
||||
<li><a href="<?=$config['rel_root_folder']?>blog">Blog</a></li>
|
||||
<li><a href="<?=$config['rel_root_folder']?>contact">Contact</a></li>
|
||||
<li><a href="<?=$config['rel_root_folder']?>wiki/api">API Développeurs</a></li>
|
||||
<!--<li><a href="<?=$config['rel_root_folder']?>wiki/api">API Développeurs</a></li>-->
|
||||
<li><a href="<?=$config['rel_root_folder']?>wiki/about">À propos</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
82
views/css/d.admin.css
Normal file
@@ -0,0 +1,82 @@
|
||||
/*********************************/
|
||||
/** Wiki files page **/
|
||||
/*********************************/
|
||||
|
||||
#wiki_files table {
|
||||
width: 100%;
|
||||
margin: 10px auto 30px;
|
||||
}
|
||||
|
||||
#wiki_files table, #wiki_files td {
|
||||
border: 1px solid #ccc;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
#wiki_files th {
|
||||
border: 1px solid #aaa;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
#wiki_files th a {
|
||||
color: inherit !important;
|
||||
}
|
||||
#wiki_files th i {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#wiki_files td, #wiki_files th {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#wiki_files tr:nth-child(even) {
|
||||
background: #efefef;
|
||||
}
|
||||
#wiki_files tr:nth-child(odd) {
|
||||
background: #e1e1e1;
|
||||
}
|
||||
#wiki_files tr.first {
|
||||
background: #ccc;
|
||||
}
|
||||
#wiki_files tr:hover {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
#wiki_files tr.first:hover {
|
||||
background: #ccc;
|
||||
}
|
||||
|
||||
#wiki_files .pagebuttons {
|
||||
text-align: center;
|
||||
}
|
||||
#wiki_files .pagebuttons a {
|
||||
background: #efefef;
|
||||
border: 1px solid #ccc;
|
||||
padding: 5px;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
#wiki_files .pagebuttons .previous {
|
||||
margin-right: -1px;
|
||||
}
|
||||
|
||||
#wiki_files td a {
|
||||
display: block;
|
||||
}
|
||||
#wiki_files .center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#send_file {
|
||||
display: flex;
|
||||
}
|
||||
#send_file div {
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
}
|
||||
#send_file div {
|
||||
flex: 2
|
||||
}
|
||||
#send_file input[type="submit"] {
|
||||
text-align: center;
|
||||
width: 150px;
|
||||
flex: 1;
|
||||
margin: 10px;
|
||||
padding: 10px;
|
||||
border-bottom: 2px solid blue;
|
||||
}
|
||||
@@ -89,6 +89,31 @@
|
||||
border: 1px inset;
|
||||
}
|
||||
|
||||
#blogContent img {
|
||||
max-width: 100%;
|
||||
border: 1px solid #bbb;
|
||||
}
|
||||
|
||||
#blogContent .imglegend {
|
||||
position: relative;
|
||||
}
|
||||
#blogContent .imglegend img {
|
||||
display: block;
|
||||
}
|
||||
#blogContent .imglegend p {
|
||||
display: block;
|
||||
background: rgba(0,0,0,0.5);
|
||||
color: white;
|
||||
font-size: 14px;
|
||||
font-variant: small-caps;
|
||||
line-height: 20px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin: 0;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
|
||||
#new_comment {
|
||||
clear: both;
|
||||
margin: 100px auto 0 auto;
|
||||
@@ -230,9 +255,20 @@ form.form label {
|
||||
float: right;
|
||||
font-size: 17px;
|
||||
}
|
||||
#permalink {
|
||||
width: calc(100% - 20px);
|
||||
#permalink_container {
|
||||
position: relative;
|
||||
}
|
||||
#permalink {
|
||||
width: calc(100% - 225px);
|
||||
padding-left: 215px;
|
||||
}
|
||||
#permalink_label {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
|
||||
form.form input[type=submit] {
|
||||
width: auto;
|
||||
|
||||
@@ -25,7 +25,8 @@ a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
input {
|
||||
input, textarea {
|
||||
font-family: "Fira Sans", "Open Sans",Helvetica,Arial,sans-serif;
|
||||
border-bottom-left-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
@@ -38,6 +39,10 @@ small {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.button {
|
||||
padding: 5px 10px;
|
||||
margin: 5px 10px;
|
||||
@@ -100,7 +105,7 @@ header {
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
header ul {
|
||||
#menu {
|
||||
float: right;
|
||||
position: relative;
|
||||
}
|
||||
@@ -111,7 +116,7 @@ header li {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
header li a {
|
||||
header li a, .hamburger {
|
||||
color: white;
|
||||
padding: 25px 15px 15px;
|
||||
height: 20px;
|
||||
@@ -121,6 +126,16 @@ header li a {
|
||||
header li a:hover, header li a:focus-within {
|
||||
color: white;
|
||||
}
|
||||
header li.with-subtitle a {
|
||||
padding: 15px 15px 25px;
|
||||
}
|
||||
|
||||
header li .subtitle {
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
white-space: nowrap;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
header li:hover a, header li:focus-within a {
|
||||
border-bottom: 6px solid blue;
|
||||
@@ -146,7 +161,9 @@ header .icon.avatar {
|
||||
header li.has-sub:hover a, header li.has-sub:focus-within a {
|
||||
border-bottom: 6px solid #212121;
|
||||
}
|
||||
|
||||
header li.has-sub:hover > a {
|
||||
cursor: default;
|
||||
}
|
||||
header li.has-sub:hover > ul, header li.has-sub:focus-within > ul {
|
||||
display: block;
|
||||
}
|
||||
@@ -159,6 +176,12 @@ header li.has-sub ul {
|
||||
background: #212121;
|
||||
}
|
||||
|
||||
header li.with-subtitle ul {
|
||||
right: unset;
|
||||
position: relative;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
header li.has-sub ul li {
|
||||
display: block;
|
||||
height: 46px;
|
||||
@@ -212,8 +235,58 @@ header input:hover, header input:focus-within {
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.hamburger {
|
||||
display: none;
|
||||
float: right;
|
||||
}
|
||||
#togglemenu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
#menu {
|
||||
display: none;
|
||||
background: black;
|
||||
float: inherit;
|
||||
position: static;
|
||||
}
|
||||
.hamburger {
|
||||
display: block;
|
||||
}
|
||||
#togglemenu:checked ~ #menu {
|
||||
display: block;
|
||||
}
|
||||
header li {
|
||||
width: 100%;
|
||||
height: inherit;
|
||||
}
|
||||
header li.menu-icon {
|
||||
width: unset;
|
||||
}
|
||||
header li.menu-icon a {
|
||||
padding: 20px 15px;
|
||||
}
|
||||
header li .subtitle {
|
||||
padding-left: 0px;
|
||||
}
|
||||
header li.has-sub ul {
|
||||
width: 100%;
|
||||
}
|
||||
header li.has-sub:hover ul, header li.has-sub:focus-within ul, header li.has-sub:hover ul li, header li.has-sub:focus-within ul li, header li.has-sub:hover ul a, header li.has-sub:focus-within ul a {
|
||||
background-color: #212121;
|
||||
border: 0;
|
||||
}
|
||||
header li.has-sub:hover a, header li.has-sub:focus-within a {
|
||||
border-left: 6px solid blue;
|
||||
border-bottom: 0;
|
||||
}
|
||||
header form {
|
||||
width: unset;
|
||||
}
|
||||
}
|
||||
|
||||
#Hcontent {
|
||||
width: 850px;
|
||||
max-width: 850px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@@ -238,14 +311,14 @@ section {
|
||||
position: relative;
|
||||
background: white;
|
||||
margin: auto;
|
||||
width: 820px;
|
||||
min-height: calc(100% - 98px);
|
||||
max-width: 820px;
|
||||
min-height: calc(100% - 94px);
|
||||
z-index: 10;
|
||||
padding: 15px;
|
||||
text-align: justify;
|
||||
}
|
||||
section#index {
|
||||
min-height: calc(100% - 98px - 320px);
|
||||
min-height: calc(100% - 95px - 320px);
|
||||
}
|
||||
|
||||
section h1 {
|
||||
@@ -254,12 +327,15 @@ section h1 {
|
||||
margin-top: 20px;
|
||||
border-bottom: 1px solid #bbb;
|
||||
}
|
||||
section#index h1{
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
section .subtitle {
|
||||
font-variant: small-caps;
|
||||
font-weight: 500;
|
||||
background: #ddd;
|
||||
margin: 0 20px 20px 0;
|
||||
margin: 0 20px 5px 0;
|
||||
display: inline-block;
|
||||
padding: 3px 5px;
|
||||
float: right;
|
||||
@@ -269,23 +345,30 @@ section p {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
section h1 {
|
||||
font-size: 1.8rem;
|
||||
text-align: left;
|
||||
}
|
||||
section#index h1 {
|
||||
font-size: 1.7rem;
|
||||
}
|
||||
}
|
||||
|
||||
/***************************************/
|
||||
|
||||
footer {
|
||||
background: #212121;
|
||||
width: 820px;
|
||||
max-width: 820px;
|
||||
padding: 15px;
|
||||
margin: 15px auto 0 auto;
|
||||
color: #c1c1c1;
|
||||
text-align: left;
|
||||
}
|
||||
footer {
|
||||
}
|
||||
|
||||
footer #footernav {
|
||||
float: right;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
footer a {
|
||||
@@ -296,13 +379,19 @@ footer a:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
footer .flex {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
/*********************************/
|
||||
/** Index page **/
|
||||
/*********************************/
|
||||
|
||||
#indexFullW {
|
||||
position: relative;
|
||||
background: url('../img/aside.jpg') center center no-repeat #070707;
|
||||
background: url('../img/aside.jpg') left center no-repeat #070707;
|
||||
width: 100%;
|
||||
height: 320px;
|
||||
z-index: 100;
|
||||
@@ -311,44 +400,25 @@ footer a:hover {
|
||||
|
||||
#AScontent {
|
||||
height: 320px;
|
||||
width: 850px;
|
||||
max-width: 850px;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#spacebeforesponsors {
|
||||
height: 238px;
|
||||
}
|
||||
|
||||
#sponsors {
|
||||
height: 70px;
|
||||
#imglegend {
|
||||
text-align: right;
|
||||
background: rgba(0,0,0,0.5);
|
||||
padding: 5px 30px;
|
||||
}
|
||||
|
||||
#sponsors a {
|
||||
float: right;
|
||||
display: block;
|
||||
padding-top: 5px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
#sponsors a img {
|
||||
height: 60px;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#sponsors p {
|
||||
float: left;
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
font-size: 14px;
|
||||
font-variant: small-caps;
|
||||
line-height: 70px;
|
||||
line-height: 20px;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
section .thumb {
|
||||
margin: 0 10px;
|
||||
border: 1px solid #aaa;
|
||||
#imglegend p {
|
||||
padding: 5px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
/*********************************/
|
||||
|
||||
@@ -9,10 +9,54 @@ body {
|
||||
footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: calc(50% - 425px);
|
||||
right: 50%;
|
||||
transform: translateX(50%);
|
||||
width: 100%;
|
||||
max-width: 820px;
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
#advert {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 9999;
|
||||
background: rgba(50,50,50,0.8);
|
||||
color: #ddd;
|
||||
padding: 20px;
|
||||
border-bottom: 6px solid blue;
|
||||
text-align: center;
|
||||
}
|
||||
#advert a{
|
||||
color: white;
|
||||
}
|
||||
#advert .dots span {
|
||||
opacity: 0;
|
||||
animation: appear 1.5s infinite;
|
||||
}
|
||||
|
||||
#advert .dots span:nth-child(1) {
|
||||
animation-delay: 0s;
|
||||
}
|
||||
|
||||
#advert .dots span:nth-child(2) {
|
||||
animation-delay: 0.3s;
|
||||
}
|
||||
|
||||
#advert .dots span:nth-child(3) {
|
||||
animation-delay: 0.6s;
|
||||
}
|
||||
|
||||
@keyframes appear {
|
||||
0%, 80%, 100% {
|
||||
opacity: 0;
|
||||
}
|
||||
40% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
Controls of the map
|
||||
*****************************************/
|
||||
@@ -154,14 +198,16 @@ footer {
|
||||
|
||||
#footer-credits, #footer-legend {
|
||||
background: #212121;
|
||||
width: 820px;
|
||||
padding: 15px;
|
||||
margin: 15px auto 0 auto;
|
||||
color: #c1c1c1;
|
||||
text-align: left;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: calc(50% - 425px);
|
||||
right: 50%;
|
||||
transform: translateX(50%);
|
||||
width: 100%;
|
||||
max-width: 820px;
|
||||
z-index: 10000;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@@ -42,10 +42,13 @@ html, body {
|
||||
/** Editor page **/
|
||||
/*********************************/
|
||||
|
||||
form.form input, form.form textarea, #locale {
|
||||
font-size: 16px;
|
||||
padding: 10px;
|
||||
}
|
||||
form.form input, form.form textarea, form.form input[type=radio]:checked+label, #locale {
|
||||
background: #ddd;
|
||||
border-bottom: 2px solid #ccc;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
form.form h1 input {
|
||||
@@ -126,6 +129,7 @@ form.form input[type=radio]+label img {
|
||||
width: 21px;
|
||||
background: #ddd;
|
||||
font-size: 25px;
|
||||
border-radius: 100px;
|
||||
}
|
||||
#specific_form .threecb.check:after {
|
||||
content: "\f058"; /* check */
|
||||
@@ -158,8 +162,20 @@ form.form input[type=radio]+label img {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
#permalink_container {
|
||||
position: relative;
|
||||
margin: 2px 0;
|
||||
}
|
||||
#permalink {
|
||||
width: calc(100% - 20px);
|
||||
width: calc(100% - 194px);
|
||||
padding-left: 184px;
|
||||
}
|
||||
#permalink_label {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
opacity: 0.8;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*********************************/
|
||||
|
||||
form.form {
|
||||
width: 50%;
|
||||
width: 80%;
|
||||
margin: 25px auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ form.form input[type=submit] {
|
||||
#wikiContent blockquote { margin-left: 40px; margin-right: 40px }
|
||||
#wikiContent ol, #wikiContent ul, #wikiContent dd { margin-left: 40px }
|
||||
#wikiContent ol ul, #wikiContent ul ol, #wikiContent ul ul, #wikiContent ol ol { margin-top: 0; margin-bottom: 0 }
|
||||
#wikiContent hr { border: 1px solid #bbb }
|
||||
|
||||
#wikiContent .footnotes {
|
||||
font-size: 0.8em;
|
||||
@@ -57,10 +58,31 @@ form.form input[type=submit] {
|
||||
#wikiContent .footnotes p {
|
||||
margin: 0.4em 0;
|
||||
}
|
||||
#wikiContent hr {
|
||||
border: 1px inset;
|
||||
}
|
||||
|
||||
#wiki_page.archive {
|
||||
opacity: 0.5;
|
||||
}
|
||||
#wikiContent img {
|
||||
max-width: 100%;
|
||||
border: 1px solid #bbb;
|
||||
}
|
||||
|
||||
#wikiContent .imglegend {
|
||||
position: relative;
|
||||
}
|
||||
#wikiContent .imglegend img {
|
||||
display: block;
|
||||
}
|
||||
#wikiContent .imglegend p {
|
||||
display: block;
|
||||
background: rgba(0,0,0,0.5);
|
||||
color: white;
|
||||
font-size: 14px;
|
||||
font-variant: small-caps;
|
||||
line-height: 20px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin: 0;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
42
views/d.admin.backup.html
Normal file
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1><?=$head['title']?></h1>
|
||||
<br>
|
||||
<pre><?
|
||||
foreach($output as $line) {
|
||||
echo $line."<br>";
|
||||
}
|
||||
?></pre>
|
||||
<br>
|
||||
|
||||
<? $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 { ?>
|
||||
Fichier <?=$file?> non généré
|
||||
<? }
|
||||
$i++;
|
||||
}?>
|
||||
|
||||
<br>
|
||||
<h4>Archives des anciennes sauvegardes</h4>
|
||||
<ul style="padding: 1em 0 1em 40px;">
|
||||
<? 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>
|
||||
<? } ?>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -8,7 +8,7 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Mise à jour.</h1>
|
||||
<h1><?=$head['title']?></h1>
|
||||
<br>
|
||||
<pre><?
|
||||
foreach($output as $line) {
|
||||
|
||||
@@ -8,13 +8,16 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Administration.</h1>
|
||||
<h1>Administration</h1>
|
||||
<br>
|
||||
<? 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")) { ?>
|
||||
<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>
|
||||
<? } ?>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Logs.</h1>
|
||||
<h1><?=$head['title']?></h1>
|
||||
<span class="subtitle">
|
||||
<select id="logfile">
|
||||
<? $i = 0;
|
||||
|
||||
27
views/d.admin.stats.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1><?=$head['title']?></h1>
|
||||
<br>
|
||||
<pre><?
|
||||
print_r($output);
|
||||
?></pre>
|
||||
<br>
|
||||
<? 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 { ?>
|
||||
Echec de la commande
|
||||
<? } ?>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
75
views/d.admin.wiki-files.html
Executable file
@@ -0,0 +1,75 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<? include('blocks/d.head.html'); ?>
|
||||
|
||||
<body>
|
||||
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section id="wiki_files">
|
||||
<h1><?=$head['title']?></h1>
|
||||
|
||||
<p class="subtitle">Fichiers attachés <?=$first?> à <?=$last?> sur les <?=$filenb?> présents</p>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<form action="<?=$config['rel_root_folder']?>admin/wiki-files/upload/" method="post" enctype="multipart/form-data" id="send_file">
|
||||
<div>
|
||||
<label for="file">Envoyer un fichier :</label>
|
||||
<input type="file" id="file" name="file">
|
||||
</div>
|
||||
<input type="submit" value="Envoyer">
|
||||
</form>
|
||||
|
||||
|
||||
<table>
|
||||
<tr class="first">
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+1?>?orderby=name&order=<?=$order=='ASC'?'DESC':'ASC'?>">Nom</a>
|
||||
<?=$orderby=='name'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+1?>?orderby=type&order=<?=$order=='ASC'?'DESC':'ASC'?>">Type</a>
|
||||
<?=$orderby=='type'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
<th>
|
||||
<a href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+1?>?orderby=size&order=<?=$order=='ASC'?'DESC':'ASC'?>">Taille</a>
|
||||
<?=$orderby=='size'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
|
||||
</th>
|
||||
<th>
|
||||
<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")) { ?>
|
||||
<th>Suppression</th>
|
||||
<? } ?>
|
||||
</tr>
|
||||
<? 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 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>
|
||||
<? } ?>
|
||||
</tr>
|
||||
<? } ?>
|
||||
</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><? } ?>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -31,7 +31,10 @@
|
||||
<textarea rows="30" name="content" id="content" placeholder="Contenu de l'article"><?=$blogArticle->content?></textarea>
|
||||
|
||||
<? if(isset($new) AND $new==1) { ?>
|
||||
<input type="text" name="permalink" id="permalink" placeholder="URL">
|
||||
<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">
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<label for="is_commentable">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section id="blog_list">
|
||||
<h1>Blog.</h1>
|
||||
<h1>Blog</h1>
|
||||
<p class="subtitle">
|
||||
<? if ($user->rankIsHigher("moderator")) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>blog/new"><i class="fas fa-plus"></i> Nouvel article</a> —
|
||||
@@ -22,12 +22,12 @@
|
||||
<? foreach ($blogArticles->objs as $row) { ?>
|
||||
|
||||
<article<? 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>
|
||||
<p class="article_legend">
|
||||
<a class="article_link" href="<?=$config['rel_root_folder']?>blog/<?=$row->permalink?>">Lire la suite...</a>
|
||||
<span class="article_infos">
|
||||
Le <? echo strftime('%e %B %G',strtotime($row->update_date)) ?> par
|
||||
<? echo datefmt_format($user->date_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?> par
|
||||
<? if ($user->rankIsHigher("registered")) { ?>
|
||||
<a href="<?=$config['rel_root_folder']?>user/p/<?=$row->author?>"><?=$row->author_name?></a>
|
||||
<? }
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<select id="bloghistory">
|
||||
<? $i = 0;
|
||||
foreach ($blogHistory->objs as $row) { ?>
|
||||
<option <?=$row->version_id==$blogArticle->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'• ':''?><? echo strftime('%d/%m/%Y %H:%M:%S',strtotime($row->update_date)) ?></option>
|
||||
<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++;
|
||||
} ?>
|
||||
</select>
|
||||
@@ -45,7 +45,7 @@
|
||||
else { ?>
|
||||
<?=$blogArticle->author_name?>
|
||||
<? } ?>
|
||||
le <? echo strftime('%e %B %G, %kh%Mm%Ss',strtotime($blogArticle->creation_date)) ?> <small><abbr title="Temps Universel Coordonné">UTC</abbr></small></p>
|
||||
le <? echo datefmt_format($user->datetime_format,date_create($blogArticle->creation_date, new DateTimeZone("UTC"))) ?></p>
|
||||
|
||||
<!-- COMMENTS -->
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<? } else { ?>
|
||||
<?=$comment->author_obj->name?>
|
||||
<? } ?>
|
||||
le <? echo strftime('%e %B %G, %kh%Mm%Ss',strtotime($comment->update_date)) ?> <small><abbr title="Temps Universel Coordonné">UTC</abbr></small>
|
||||
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') { ?>
|
||||
<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>
|
||||
<? } ?>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Contribuer au projet Kabano.</h1>
|
||||
<h1>Contribuer au projet Kabano</h1>
|
||||
<p>Étant un projet collaboratif, Kabano se repose sur vos contributions pour diffuser des informations au plus proche de la réalité. En participant au projet Kabano, vous acceptez de placer vos collaborations sous <a href="<?=$config['rel_root_folder']?>wiki/licences">nos licences libres</a>.</p>
|
||||
<br>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Nous contacter.</h1>
|
||||
<h1>Me contacter</h1>
|
||||
<form class="form" action="<?=$config['rel_root_folder']?>contact" method="post">
|
||||
<? if($error=="name") { ?>
|
||||
<p style="color: red;">Veuillez renseigner votre nom.</p>
|
||||
@@ -43,8 +43,8 @@
|
||||
else { ?>
|
||||
<p id="captcha">
|
||||
<input type="hidden" id="captchahidden" name="captcha" value="10">
|
||||
<span id="captchatext">Merci d'attendre <b id="captchasec">10 s</b> avant de pouvoir nous contacter.<br>
|
||||
<small>Ceci nous permet de laisser les robots à la porte.</small></span>
|
||||
<span id="captchatext">Merci d'attendre <b id="captchasec">10 s</b> avant de pouvoir me contacter.<br>
|
||||
<small>Ceci me permet de laisser les robots à la porte.</small></span>
|
||||
<input disabled id="captchasubmit" style="display:none;" type="submit" name="submit" value="Envoyer">
|
||||
</p>
|
||||
<? } ?>
|
||||
|
||||
@@ -8,23 +8,32 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<aside id="indexFullW">
|
||||
<!-- <div id="AScontent">
|
||||
<div id="spacebeforesponsors"></div>
|
||||
<div id="sponsors">
|
||||
<p style="font-size: 1.3em;">Aidez Kabano en partagant sa <a style="font-weight: 6b00; color: orange; float: none; padding: 0; display: inline;" href="http://fr.ulule.com/kabano/" target="_blank">campagne de financement Ulule</a> !</p>
|
||||
<div id="AScontent">
|
||||
<div id="imglegend">
|
||||
<p>Refuge de Pointe Basse</p>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<?
|
||||
require_once($config['models_folder']."d.wiki.php");
|
||||
$wikiPage = new Kabano\WikiPage();
|
||||
$wikiPage->checkPermalink('index');
|
||||
$wikiPage->md2html();
|
||||
?>
|
||||
|
||||
<section id="index">
|
||||
<h1>Cabanes et bivouac en montagne.</h1>
|
||||
<p><abbr title="Cabane en espéranto">Kabano</abbr> est une plateforme collaborative sur laquelle vous pouvez récupérer toutes les informations nécessaires relatives aux hébergements en montagne. Ces informations ont été ajoutées par vous, pour vous, c'est pourquoi il est primordial de ne pas cesser d'ajouter des commentaires, cabanes, refuges ou emplacements de bivouac. Attention toutefois, ces données ne sont en aucun cas garanties et des précautions dues à l'environnement montagnard sont à prendre.</p>
|
||||
<br>
|
||||
<p style="text-align: center;">
|
||||
<img alt="Illustration hut" src="<?=$config['views_url']?>img/thumb1.jpg" class="thumb" title="© ptit tapou - Forums Pyrénées Team">
|
||||
<img alt="Illustration tent" src="<?=$config['views_url']?>img/thumb2.jpg" class="thumb">
|
||||
<img alt="Illustration hut" src="<?=$config['views_url']?>img/thumb3.jpg" class="thumb" title="CC BY-SA - EricM - refuges.info">
|
||||
</p>
|
||||
<h1><?=$wikiPage->name?></h1>
|
||||
|
||||
<? 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>
|
||||
<? } ?>
|
||||
|
||||
<br><br>
|
||||
|
||||
<?=$wikiPage->content_html?>
|
||||
</section>
|
||||
|
||||
<? include('blocks/d.footer.html'); ?>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
<? 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="mapid" style="height: 100%;"></div>
|
||||
|
||||
<div id="footer-credits" style="display: none;">
|
||||
|
||||
@@ -124,7 +124,10 @@
|
||||
<div id="specific_form"></div>
|
||||
|
||||
<? if(isset($new) AND $new==1) { ?>
|
||||
<input type="text" name="permalink" id="permalink" placeholder="Lien permanent" required>
|
||||
<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">
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Connexion.</h1>
|
||||
<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) { ?>
|
||||
<p style="color: red;">Erreur lors de la connexion, merci de réessayer.</p>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section id="member_list">
|
||||
<h1>Liste des membres.</h1>
|
||||
<h1>Liste des membres</h1>
|
||||
<p class="subtitle">Membres <?=$first?> à <?=$last?> sur les <?=$users->number?> inscrits</p>
|
||||
|
||||
<table>
|
||||
@@ -45,8 +45,8 @@
|
||||
<a class="username" href="<?=$config['rel_root_folder']?>user/p/<?=$row->id?>"><?=$row->name?></a>
|
||||
</td>
|
||||
<td><?=$row->get_rank()?></td>
|
||||
<td><? echo strftime('%e %B %G',strtotime($row->register_date)) ?></td>
|
||||
<td><? echo strftime('%e %B %G',strtotime($row->visit_date)) ?></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>
|
||||
<? 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>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<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">
|
||||
<? if(isset($_GET['error']) AND $_GET['error']==1) { ?>
|
||||
<p style="color: red;">Cette adresse mail n'existe pas.</p>
|
||||
|
||||
@@ -47,6 +47,13 @@
|
||||
<option <?=$userProfile->get_locale()==$locale->display_name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option>
|
||||
<? } ?>
|
||||
</select></li>
|
||||
<li><label for="timezone">Fuseau horaire :</label>
|
||||
<select name="timezone" id="timezone">
|
||||
<? $timezones = timezone_identifiers_list();
|
||||
foreach($timezones as $timezone) { ?>
|
||||
<option <?=$userProfile->timezone==$timezone?'selected':''?> value="<?=$timezone?>"><?=$timezone?></option>
|
||||
<? } ?>
|
||||
</select></li>
|
||||
<? if($user->rankIsHigher("administrator")) { ?>
|
||||
<li><label for="rank">Rang : </label>
|
||||
<select name="rank" id="rank">
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
</aside>
|
||||
<div id="description">
|
||||
<p>Langue : <?=$userProfile->get_locale()?></p>
|
||||
<p>Inscrit le <? echo strftime('%e %B %G, %kh%Mm%Ss',strtotime($userProfile->register_date)) ?> <small><abbr title="Temps Universel Coordonné">UTC</abbr></small></p>
|
||||
<p>Dernière connexion le <? echo strftime('%e %B %G, %kh%Mm%Ss',strtotime($userProfile->visit_date)) ?> <small><abbr title="Temps Universel Coordonné">UTC</abbr></small></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><?=$userProfile->get_rank()?></p>
|
||||
<p>
|
||||
<? if ($userProfile->website != "") { ?>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<? include('blocks/d.nav.html'); ?>
|
||||
|
||||
<section>
|
||||
<h1>Inscription.</h1>
|
||||
<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") { ?>
|
||||
<p style="color: red;">Veuillez choisir un autre nom d'utilisateur.</p>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<select id="wikihistory">
|
||||
<? $i = 0;
|
||||
foreach ($wikiHistory->objs as $row) { ?>
|
||||
<option <?=$row->version_id==$wikiPage->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'• ':''?><? echo strftime('%d/%m/%Y %H:%M:%S',strtotime($row->update_date)) ?></option>
|
||||
<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++;
|
||||
} ?>
|
||||
</select>
|
||||
@@ -38,7 +38,7 @@
|
||||
<?=$wikiPage->content_html?>
|
||||
</div>
|
||||
|
||||
<p id="wikiTimestamp">Page mise à jour le <? echo strftime('%e %B %G, %kh%Mm%Ss',strtotime($wikiPage->update_date)) ?> <small><abbr title="Temps Universel Coordonné">UTC</abbr></small></p>
|
||||
<p id="wikiTimestamp">Page mise à jour le <? echo datefmt_format($user->datetime_format,date_create($wikiPage->update_date, new DateTimeZone("UTC"))) ?></p>
|
||||
|
||||
<div style="clear: both;"> </div>
|
||||
</section>
|
||||
|
||||
BIN
views/img/aside.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 27 KiB |
@@ -21,12 +21,18 @@ function reduce() {
|
||||
}, 100, function() {
|
||||
// Animation complete.
|
||||
});
|
||||
$( "header a.on-bar" ).animate({
|
||||
$( "header li:not(.with-subtitle) a.on-bar" ).animate({
|
||||
paddingTop: "15px",
|
||||
paddingBottom: "5px"
|
||||
}, 100, function() {
|
||||
// Animation complete.
|
||||
});
|
||||
$( "header li.with-subtitle a.on-bar" ).animate({
|
||||
paddingTop: "5px",
|
||||
paddingBottom: "15px"
|
||||
}, 100, function() {
|
||||
// Animation complete.
|
||||
});
|
||||
}
|
||||
|
||||
function enlarge() {
|
||||
@@ -50,21 +56,27 @@ function enlarge() {
|
||||
}, 100, function() {
|
||||
// Animation complete.
|
||||
});
|
||||
$( "header a.on-bar" ).animate({
|
||||
$( "header li:not(.with-subtitle) a.on-bar" ).animate({
|
||||
paddingTop: "25px",
|
||||
paddingBottom: "15px"
|
||||
}, 100, function() {
|
||||
// Animation complete.
|
||||
});
|
||||
$( "header li.with-subtitle a.on-bar" ).animate({
|
||||
paddingTop: "15px",
|
||||
paddingBottom: "25px"
|
||||
}, 100, function() {
|
||||
// Animation complete.
|
||||
});
|
||||
}
|
||||
|
||||
$(window).scroll(function() {
|
||||
var position = $(window).scrollTop();
|
||||
if (position>80 && small!=1) {
|
||||
if (position>80 && small!=1 && $('body').width() > 800) {
|
||||
small = 1;
|
||||
reduce();
|
||||
}
|
||||
else if (position<=80 && small!=0) {
|
||||
else if (position<=80 && small!=0 && $('body').width() > 800) {
|
||||
small = 0;
|
||||
enlarge();
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@ var mymap;
|
||||
$( document ).ready(function() {
|
||||
// Differents layers for the map
|
||||
var topo_maptiler = L.tileLayer('https://api.maptiler.com/maps/topographique/{z}/{x}/{y}.png?key=Sm8M7mJ53GtYdl773rpi', {tms: false, attribution: 'Carte © <a href="https://www.maptiler.com/copyright/" target="_blank">MapTiler</a>, Données © <a href="http://www.openstreetmap.org/copyright" target="_blank">Contributeurs OpenStreetMap</a>', tileSize: 512, zoomOffset: -1, minZoom: 1});
|
||||
var ign = L.tileLayer('https://wxs.ign.fr/5sf7ych7ecsa575btea2ln17/geoportail/wmts?service=WMTS&request=GetTile&version=1.0.0&tilematrixset=PM&tilematrix={z}&tilecol={x}&tilerow={y}&layer=ORTHOIMAGERY.ORTHOPHOTOS&format=image/jpeg&style=normal', {attribution: 'Carte & Connées © <a href="http://ign.fr/" target="_blank">IGN-F/Géoportail</a>'});
|
||||
var ign = L.tileLayer('https://data.geopf.fr/private/wmts?&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER=GEOGRAPHICALGRIDSYSTEMS.MAPS&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&apikey=ign_scan_ws', {attribution: 'Carte & Connées © <a href="http://ign.fr/" target="_blank">IGN-F/Géoportail</a>'});
|
||||
|
||||
// Base layers
|
||||
var baseLayers = {
|
||||
"OpenStreetMap": topo_maptiler,
|
||||
|
||||
@@ -4,7 +4,7 @@ var poi_layer;
|
||||
$( document ).ready(function() {
|
||||
// Differents layers for the map
|
||||
var topo_maptiler = L.tileLayer('https://api.maptiler.com/maps/topographique/{z}/{x}/{y}.png?key=Sm8M7mJ53GtYdl773rpi', {tms: false, attribution: 'Carte © <a href="https://www.maptiler.com/copyright/" target="_blank">MapTiler</a>, Données © <a href="http://www.openstreetmap.org/copyright" target="_blank">Contributeurs OpenStreetMap</a>', tileSize: 512, zoomOffset: -1, minZoom: 1});
|
||||
var ign = L.tileLayer('https://wxs.ign.fr/5sf7ych7ecsa575btea2ln17/geoportail/wmts?service=WMTS&request=GetTile&version=1.0.0&tilematrixset=PM&tilematrix={z}&tilecol={x}&tilerow={y}&layer=ORTHOIMAGERY.ORTHOPHOTOS&format=image/jpeg&style=normal', {attribution: 'Carte & Connées © <a href="http://ign.fr/" target="_blank">IGN-F/Géoportail</a>'});
|
||||
var ign = L.tileLayer('https://data.geopf.fr/private/wmts?&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER=GEOGRAPHICALGRIDSYSTEMS.MAPS&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&apikey=ign_scan_ws', {attribution: 'Carte & Connées © <a href="http://ign.fr/" target="_blank">IGN-F/Géoportail</a>'});
|
||||
// Base layers
|
||||
var baseLayers = {
|
||||
"OpenStreetMap": topo_maptiler,
|
||||
|
||||
7
views/third/simplelightbox/simple-lightbox.min.css
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
By André Rinas, www.andrerinas.de
|
||||
Documentation, www.simplelightbox.com
|
||||
Available for use under the MIT License
|
||||
Version 2.14.3
|
||||
*/
|
||||
body.hidden-scroll{overflow:hidden}.sl-overlay{position:fixed;left:0;right:0;top:0;bottom:0;background:#fff;display:none;z-index:1035}.sl-wrapper{z-index:1040;width:100%;height:100%;left:0;top:0;position:fixed}.sl-wrapper *{box-sizing:border-box}.sl-wrapper button{border:0 none;background:rgba(0,0,0,0);font-size:28px;padding:0;cursor:pointer}.sl-wrapper button:hover{opacity:.7}.sl-wrapper .sl-close{display:none;position:fixed;right:30px;top:30px;z-index:10060;margin-top:-14px;margin-right:-14px;height:44px;width:44px;line-height:44px;font-family:Arial,Baskerville,monospace;color:#000;font-size:3rem}.sl-wrapper .sl-counter{display:none;position:fixed;top:30px;left:30px;z-index:10060;color:#000;font-size:1rem}.sl-wrapper .sl-download{display:none;position:fixed;bottom:5px;width:100%;text-align:center;z-index:10060;color:#fff;font-size:1rem}.sl-wrapper .sl-download a{color:#fff}.sl-wrapper .sl-navigation{width:100%;display:none}.sl-wrapper .sl-navigation button{position:fixed;top:50%;margin-top:-22px;height:44px;width:22px;line-height:44px;text-align:center;display:block;z-index:10060;font-family:Arial,Baskerville,monospace;color:#000}.sl-wrapper .sl-navigation button.sl-next{right:5px;font-size:2rem}.sl-wrapper .sl-navigation button.sl-prev{left:5px;font-size:2rem}@media(min-width: 35.5em){.sl-wrapper .sl-navigation button{width:44px}.sl-wrapper .sl-navigation button.sl-next{right:10px;font-size:3rem}.sl-wrapper .sl-navigation button.sl-prev{left:10px;font-size:3rem}}@media(min-width: 50em){.sl-wrapper .sl-navigation button{width:44px}.sl-wrapper .sl-navigation button.sl-next{right:20px;font-size:3rem}.sl-wrapper .sl-navigation button.sl-prev{left:20px;font-size:3rem}}.sl-wrapper.sl-dir-rtl .sl-navigation{direction:ltr}.sl-wrapper .sl-image{position:fixed;-ms-touch-action:none;touch-action:none;z-index:10000}.sl-wrapper .sl-image img{margin:0;padding:0;display:block;border:0 none;width:100%;height:auto}@media(min-width: 35.5em){.sl-wrapper .sl-image img{border:0 none}}@media(min-width: 50em){.sl-wrapper .sl-image img{border:0 none}}.sl-wrapper .sl-image iframe{background:#000;border:0 none}@media(min-width: 35.5em){.sl-wrapper .sl-image iframe{border:0 none}}@media(min-width: 50em){.sl-wrapper .sl-image iframe{border:0 none}}.sl-wrapper .sl-image .sl-caption{display:none;padding:10px;color:#fff;background:rgba(0,0,0,.8);font-size:1rem;position:absolute;bottom:0;left:0;right:0}.sl-wrapper .sl-image .sl-caption.pos-top{bottom:auto;top:0}.sl-wrapper .sl-image .sl-caption.pos-outside{bottom:auto}.sl-spinner{display:none;border:5px solid #333;border-radius:40px;height:40px;left:50%;margin:-20px 0 0 -20px;opacity:0;position:fixed;top:50%;width:40px;z-index:1007;-webkit-animation:pulsate 1s ease-out infinite;-moz-animation:pulsate 1s ease-out infinite;-ms-animation:pulsate 1s ease-out infinite;-o-animation:pulsate 1s ease-out infinite;animation:pulsate 1s ease-out infinite}.sl-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.sl-transition{transition:-moz-transform ease 200ms;transition:-ms-transform ease 200ms;transition:-o-transform ease 200ms;transition:-webkit-transform ease 200ms;transition:transform ease 200ms}@-webkit-keyframes pulsate{0%{transform:scale(0.1);opacity:0}50%{opacity:1}100%{transform:scale(1.2);opacity:0}}@keyframes pulsate{0%{transform:scale(0.1);opacity:0}50%{opacity:1}100%{transform:scale(1.2);opacity:0}}@-moz-keyframes pulsate{0%{transform:scale(0.1);opacity:0}50%{opacity:1}100%{transform:scale(1.2);opacity:0}}@-o-keyframes pulsate{0%{transform:scale(0.1);opacity:0}50%{opacity:1}100%{transform:scale(1.2);opacity:0}}@-ms-keyframes pulsate{0%{transform:scale(0.1);opacity:0}50%{opacity:1}100%{transform:scale(1.2);opacity:0}}
|
||||