Compare commits

..

84 Commits

Author SHA1 Message Date
leosw
49e83aef49 La mise à jour affichera les erreurs 2025-12-28 12:26:18 +01:00
leosw
3996b79cf9 revert test 2025-12-26 14:57:24 +01:00
leosw
587572297d test 2025-12-26 14:55:30 +01:00
leosw
5c34318982 Fix stats command 2025-12-26 14:50:50 +01:00
leosw
8c66a92e39 Changement lien facebook 2025-09-20 12:37:08 +02:00
leosw
20c2c24988 Style hérité du wiki dans le blog 2025-08-30 18:18:47 +02:00
leosw
991fff087e Sauvegarde des fichiers medias 2025-08-30 17:45:56 +02:00
leosw
029635e509 Fix gitignore 2025-08-30 13:44:57 +02:00
leosw
be0bd0195a Sauvegarde SQL 2025-08-30 13:43:03 +02:00
leosw
5c228c9533 Fix all stats 2025-08-30 12:52:22 +02:00
leosw
723b81aebd debug 2025-08-30 12:50:46 +02:00
leosw
1e5d1a7cc9 debug 2025-08-30 12:49:31 +02:00
leosw
16ca71e399 debug 2025-08-30 12:39:24 +02:00
leosw
df2e08f54a debug 2025-08-30 12:38:20 +02:00
leosw
114c971184 debug 2025-08-30 12:36:23 +02:00
leosw
d3c2987c9b remove debug 2025-08-30 12:33:41 +02:00
leosw
c7aa53b1f0 debug 2025-08-30 12:31:42 +02:00
leosw
159f21d5b2 debug 2025-08-30 12:17:55 +02:00
leosw
5080425824 debug 2025-08-30 12:10:42 +02:00
leosw
e4983112db debug 2025-08-30 12:08:50 +02:00
leosw
f4325d3a5a debug 2025-08-30 12:08:14 +02:00
leosw
6bdbcec947 Nouvel essai avec un glob 2025-08-30 12:05:22 +02:00
leosw
79a33031d6 debug 2025-08-30 11:57:28 +02:00
leosw
6aad02ce2d Stats: correction nom fichier 2025-08-30 11:50:25 +02:00
leosw
810207ef9b Stats : meilleure gestion de l'affichage 2025-08-30 11:49:29 +02:00
leosw
363df1ab75 Stats : Commande plus robuste pour récupérer l'affichage 2025-08-30 11:48:41 +02:00
leosw
b866cc890e Pas de ncurse dans goaccess 2025-08-30 11:46:17 +02:00
leosw
6b3edaed02 revert debug 2025-08-30 11:43:16 +02:00
leosw
a8bc3e7ef7 debug 2025-08-30 11:41:21 +02:00
leosw
bd8786daed debug 2025-08-30 11:40:30 +02:00
leosw
f284c1883c Revert droit d'admin 2025-08-30 11:37:11 +02:00
leosw
c4c91315ec Générer les stats comme sudo 2025-08-30 11:32:50 +02:00
leosw
f845eb3ef4 Gestion d'erreur sur les stats 2025-08-30 11:29:17 +02:00
leosw
06bf74ea21 Page statistiques 2025-08-30 11:24:04 +02:00
leosw
10a72dcdb9 Changement lieu fab dans mail 2025-08-18 20:00:54 +02:00
leosw
86fad21898 Point qui traine 2025-08-18 19:49:28 +02:00
leosw
83df17669d Ajout d'un avertissement sur la page carte 2025-08-18 18:56:59 +02:00
leosw
54226e3cbd Correction sur les formulaires sur mobile 2025-08-18 18:48:05 +02:00
leosw
fd76affce9 Ajout CGV 2025-08-18 18:36:46 +02:00
leosw
4eb8f685c5 Correction du pied de page sur la page carte 2025-08-18 18:14:11 +02:00
leosw
2801ddf144 Correction du footer sur la page carte 2025-08-18 17:54:41 +02:00
leosw
d75de36d61 Dernière version du menu corrigé 2025-08-18 17:38:36 +02:00
leosw
208e3132ad Test sur le menu 2025-08-18 17:24:23 +02:00
leosw
d744317283 Ajout d'un menu responsive 2025-08-18 17:15:58 +02:00
leosw
e3de743bb8 Fix la nav sur mobile 2025-08-17 22:45:00 +02:00
leosw
acfb15d5e3 Ajout d'une lightbox pour les portfolio 2025-08-17 22:08:51 +02:00
leosw
4e1f6a9083 Style pour les images dans le wiki 2025-08-03 22:15:21 +02:00
leosw
bb365942ab Log les uploads 2025-08-02 15:06:11 +02:00
leosw
42a3aa08f5 Ajout d'un formulaire d'envoi de fichiers 2025-08-02 15:00:19 +02:00
leosw
d9963bf64b Limiter la supressions aux admins 2025-08-02 14:09:36 +02:00
leosw
6137f6a027 Ajout du logging des fichiers effacés 2025-08-02 14:05:07 +02:00
leosw
f874f6b17e Amélioration de la cliquabilité 2025-08-02 14:00:38 +02:00
leosw
f9f6debe65 Ajout de la fonctionnalité de suppression de fichiers 2025-08-02 13:57:28 +02:00
leosw
ca25bccbec Fixe 2025-08-02 13:40:54 +02:00
leosw
74b3a8721a Mise en forme du tableau 2025-08-02 13:31:38 +02:00
leosw
23f8123718 Ajout d'un système de listing des fichiers de dossier /medias/wiki 2025-08-02 13:16:50 +02:00
leosw
98103c096e Le contenu spécial de la page d'accueil est déplacé dans le wiki (y compris le CSS) 2025-08-02 11:03:39 +02:00
leosw
6340175e44 Typo 2025-08-02 10:45:36 +02:00
leosw
92e21aa959 L'accueil est géré en markdown 2025-07-16 19:53:24 +02:00
leosw
c77b9e524d Mise à jour des headers 2025-07-16 19:46:35 +02:00
leosw
f1ae1d174e ajout téléphone 2025-07-13 18:37:50 +02:00
leosw
ceda4b4d22 typo 2025-07-13 18:24:37 +02:00
leosw
d2b556dec7 Typo 2025-07-13 18:23:51 +02:00
leosw
67b1b3c9e5 Fix map 2025-07-13 18:05:46 +02:00
leosw
391cfc1273 Suppression vieilles images 2025-07-13 17:58:08 +02:00
leosw
a53ddf22ff Ajout de la page d'accueil et typos 2025-07-13 17:57:45 +02:00
leosw
238eebc00b La page d'accueil est désormais fournie par une page du wiki spécifique 2025-07-13 16:10:30 +02:00
leosw
bc44a41106 Fix blanc après footer 2025-07-13 15:48:38 +02:00
leosw
4ab51c9687 Ajout lien fb en pied de page 2025-07-13 15:46:45 +02:00
leosw
613776264c Changement du menu pour mes nouvelles activités 2025-07-13 15:10:56 +02:00
leosw
687de1ed71 Ajout des logos carrés et d'un meilleur support du redimentionnement d'images 2025-07-13 14:27:10 +02:00
leosw
36be8018b4 ajout du support pout php 8.2 en supprimant la création de propriétés dynamiques 2025-07-13 14:14:16 +02:00
Léo Serre
8490877990 Fix HTML in blog comments 2022-02-02 11:01:41 +00:00
leosw
662f72a006 Fix dates in php < 8.0.0 2022-02-01 22:39:26 +01:00
leosw
f60cf54bab User can change his timezone 2022-02-01 22:35:08 +01:00
leosw
507bf492a0 First support for timezones on date displays 2022-02-01 22:25:52 +01:00
leosw
af4103c31c Change date to relative : can now be yesterday or today 2022-02-01 21:36:29 +01:00
leosw
36a42bb4f6 Upgrades SQL skeleton 2022-02-01 21:13:54 +01:00
leosw
7ec61dbc63 Add support for user defined locale and timezone in date/time prints, remove deprecated PHP strftime 2022-02-01 21:13:27 +01:00
leosw
3a497bbb64 Fix round background for radio buttons 2021-08-19 18:57:36 +02:00
leosw
fbdc2485aa Add static placeholder in poi permalink field 2021-08-19 18:36:06 +02:00
leosw
dfa4dccd6c Add static placeholder in blog permalink field 2021-08-19 18:24:52 +02:00
leosw
da27362fd5 Fix permalink processing for pois 2021-06-04 21:36:10 +02:00
leosw
f0b82ddb3d Add permalink field in poi new form 2021-06-04 20:56:48 +02:00
56 changed files with 1805 additions and 832 deletions

1
.gitignore vendored
View File

@@ -5,3 +5,4 @@ _ressources/dump.sql
*.sublime-project *.sublime-project
*.sublime-workspace *.sublime-workspace
*.log *.log
/tmp/*

BIN
_ressources/logo_carre.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -12,7 +12,7 @@ if(isset($controller->splitted_url[1]) && $user->rankIsHigher("moderator")) {
$output = array(); $output = array();
chdir($config['abs_root_folder']); chdir($config['abs_root_folder']);
exec("git pull", $output); exec("git pull 2>&1", $output);
include ($config['views_folder']."d.admin.git-pull.html"); include ($config['views_folder']."d.admin.git-pull.html");
} }
@@ -42,6 +42,198 @@ if(isset($controller->splitted_url[1]) && $user->rankIsHigher("moderator")) {
$notfound = 1; $notfound = 1;
} }
break; 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: default:
$notfound = 1; $notfound = 1;
break; break;
@@ -55,4 +247,41 @@ else {
$notfound = 1; $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];
}
?> ?>

View File

@@ -18,13 +18,14 @@ switch ($controller->splitted_url[1]) {
$poi->lon = $_POST['lon']; $poi->lon = $_POST['lon'];
$poi->ele = $_POST['ele']; $poi->ele = $_POST['ele'];
$poi->author = $user->id; $poi->author = $user->id;
if(!$blogArticle->checkPermalink($_POST['permalink'],1)) { $poi->source = "k";
$blogArticle->permalink = $_POST['permalink']; if(!$poi->checkPermalink($_POST['permalink'],1)) {
$blogArticle->insert(); $poi->permalink = $_POST['permalink'];
header('Location: '.$config['rel_root_folder']."blog/".$blogArticle->permalink); $poi->insert();
header('Location: '.$config['rel_root_folder']."blog/".$poi->permalink);
} }
else { else {
$head['title'] = $blogArticle->name; $head['title'] = $poi->name;
$error = "permalink"; $error = "permalink";
} }
} }

View File

@@ -126,6 +126,7 @@ if(isset($controller->splitted_url[1])) {
if($_POST['password']!='') if($_POST['password']!='')
$userProfile->password=sha1($_POST['password']); $userProfile->password=sha1($_POST['password']);
$userProfile->locale=$_POST['locale']; $userProfile->locale=$_POST['locale'];
$userProfile->timezone=$_POST['timezone'];
if($user->rankIsHigher("administrator")) if($user->rankIsHigher("administrator"))
$userProfile->rank = $_POST['rank']; $userProfile->rank = $_POST['rank'];
$userProfile->website=$_POST['website']; $userProfile->website=$_POST['website'];

View File

@@ -69,6 +69,8 @@ else if(isset($controller->splitted_url[1]) && $wikiPage->checkPermalink($contro
$wikiPage->md2html(); $wikiPage->md2html();
$head['title'] = $wikiPage->name; $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"); include ($config['views_folder']."d.wiki.view.html");
} }
} }

View File

@@ -3,6 +3,8 @@
ini_set('display_errors', 1); ini_set('display_errors', 1);
ini_set('display_startup_errors', 1); ini_set('display_startup_errors', 1);
error_reporting(E_ALL); 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
/***** /*****

View File

@@ -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 the limitation is on the height (cuts on the width)
if($height*$source_image_width/$source_image_height > $width) { if($height*$source_image_width/$source_image_height > $width) {
$src_x = (int)(($source_image_width - $source_image_height * $width / $height) / 2); $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 { } else {
$src_y = (int)(($source_image_height - $source_image_width * $height / $width) / 2); $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); $thumbnail_gd_image = imagecreatetruecolor($thumbnail_image_width, $thumbnail_image_height);

View File

@@ -6,17 +6,33 @@ ini_set("session.cookie_lifetime",60*60*24*30);
session_start(); session_start();
$user = new Kabano\User(); $user = new Kabano\User();
$user->rank = "visitor"; // All users are visitors
if(isset($_SESSION['userid'])) { if(isset($_SESSION['userid'])) {
$user->checkID($_SESSION['userid']);
if ($user->checkID($_SESSION['userid'])) { if ($user->checkID($_SESSION['userid'])) {
$user->updateLoginDate(); $user->updateLoginDate();
//setlocale(LC_ALL, $config['locales'][$user->locale][4]); $config['locale'] = $user->locale;
$config['timezone'] = $user->timezone;
} }
else { else {
session_destroy(); 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']);
?> ?>

View File

@@ -39,6 +39,10 @@ class Poi
public $alt_position = NULL; public $alt_position = NULL;
public $parameters = NULL; public $parameters = NULL;
public $lat;
public $lon;
public $ele;
/***** /*****
** Checks if a page at this URL exists and return the ID ** Checks if a page at this URL exists and return the ID
*****/ *****/

View File

@@ -38,6 +38,13 @@ class User
public $visit_date = NULL; public $visit_date = NULL;
public $register_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 ** 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>'; return '<span class="userrole" style="color: '.$ranks[$this->rank][2].';">'.$ranks[$this->rank][1].'</span>';
} }
public function get_locale() { public function get_locale() {
if( isset($this->locale_loaded) ) { if( $this->locale_loaded) {
return $this->locale_obj->display_name; return $this->locale_obj->display_name;
} }
else { else {
@@ -213,7 +220,7 @@ class User
$this->visit_date = date('r'); $this->visit_date = date('r');
$this->register_date = date('r'); $this->register_date = date('r');
$this->locale = "fr_FR"; $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']) $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"); or die ("Could not connect to server\n");
@@ -245,17 +252,17 @@ class User
or die ("Could not connect to server\n"); or die ("Could not connect to server\n");
if($this->password=='') { 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) pg_prepare($con, "prepare1", $query)
or die ("Cannot prepare statement\n"); 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"); or die ("Cannot execute statement\n");
} }
else { 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) pg_prepare($con, "prepare1", $query)
or die ("Cannot prepare statement\n"); 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"); or die ("Cannot execute statement\n");
} }
@@ -299,7 +306,7 @@ class User
$message .= "Cordialement,<br>\r\n"; $message .= "Cordialement,<br>\r\n";
$message .= "<br>\r\n"; $message .= "<br>\r\n";
$message .= "L'équipe Kabano.<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" . $headers = 'From: '. $config['bot_mail'] . "\r\n" .
'Reply-To: '. $config['bot_mail'] . "\r\n" . 'Reply-To: '. $config['bot_mail'] . "\r\n" .

View File

@@ -30,6 +30,8 @@ class WikiPage
public $name = NULL; public $name = NULL;
public $content = NULL; public $content = NULL;
public $content_html;
/***** /*****
** Checks if a page at this ermalink exists and return the populated element ** Checks if a page at this ermalink exists and return the populated element
*****/ *****/

View File

@@ -1,7 +1,10 @@
<footer> <footer>
<div id="footernav"> <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 &mdash; <script>document.write("06 " + "1" + "8 6" + "2 3" + "2 ");</script>&#48;&#53;</p>
<div id="footernav" class="flex-element">
<a href="<?=$config['rel_root_folder']?>wiki/cgv">CGV</a> &mdash;
<a href="<?=$config['rel_root_folder']?>wiki/legal">Mentions Légales</a> &mdash; <a href="<?=$config['rel_root_folder']?>wiki/legal">Mentions Légales</a> &mdash;
<a href="<?=$config['rel_root_folder']?>contact">Contact</a> <a href="<?=$config['rel_root_folder']?>contact">Contact</a>
</div> </div>
<p><i>Applications mobiles bientôt disponibles.</i></p> </div>
</footer> </footer>

View File

@@ -1,6 +1,6 @@
<head> <head>
<meta charset="utf-8"> <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"> <link rel="shortcut icon" href="<?=$config['views_url']?>img/favicon.png">
<? if (isset($head['css'])) { <? if (isset($head['css'])) {
foreach(explode(";",$head['css']) as $css) { ?> foreach(explode(";",$head['css']) as $css) { ?>
@@ -29,18 +29,18 @@
<title><?=$head['title']?> &mdash; Kabano</title> <title><?=$head['title']?> &mdash; Kabano</title>
<? } <? }
else { ?> else { ?>
<title>Cabanes et bivouac en montagne</title> <title>Refuges de montagne et métallerie agricole</title>
<? } ?> <? } ?>
<? if (isset($head['description'])) { ?> <? if (isset($head['description'])) { ?>
<meta name="description" content="<?=$head['description']?>"> <meta name="description" content="<?=$head['description']?>">
? } ? }
else { ?> 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'])) { ?> <? if (isset($head['keywords'])) { ?>
<meta name="keywords" content="<?=$head['keywords']?>"> <meta name="keywords" content="<?=$head['keywords']?>">
<? } <? }
else { ?> 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> </head>

View File

@@ -4,12 +4,26 @@
<img alt="Kabano logo" src="<?=$config['views_url'].'img/'?>header.svg"> <img alt="Kabano logo" src="<?=$config['views_url'].'img/'?>header.svg">
</a> </a>
<nav> <nav>
<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> <ul>
<li class="on-bar"><a class="on-bar" href="<?=$config['rel_root_folder']?>map">Carte</a></li> <li><a href="<?=$config['rel_root_folder']?>wiki/restauration-de-refuges">Activités</a></li>
<!-- <li class="on-bar"><a class="on-bar" href="<?=$config['rel_root_folder']?>search">Recherche</a></li> <li><a href="<?=$config['rel_root_folder']?>wiki/portfolio-restauration">Réalisations</a></li>
<li class="on-bar"><a class="on-bar" href="<?=$config['rel_root_folder']?>news">Nouveautés</a></li> --> </ul>
<li class="on-bar"><a class="on-bar" href="<?=$config['rel_root_folder']?>community">Contribuer</a></li> </li>
<li class="on-bar has-sub"> <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) { ?> <? if ($user->id == 0) { ?>
<a class="on-bar" href="#"><i class="icon fas fa-user"></i></a> <a class="on-bar" href="#"><i class="icon fas fa-user"></i></a>
<? } elseif ($user->is_avatar_present == 't') { ?> <? } elseif ($user->is_avatar_present == 't') { ?>
@@ -37,12 +51,12 @@
<? } ?> <? } ?>
</ul> </ul>
</li> </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> <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']?>blog">Blog</a></li>
<li><a href="<?=$config['rel_root_folder']?>contact">Contact</a></li> <li><a href="<?=$config['rel_root_folder']?>contact">Contact</a></li>
<li><a href="<?=$config['rel_root_folder']?>wiki/api">API Développeurs</a></li> <!--<li><a href="<?=$config['rel_root_folder']?>wiki/api">API Développeurs</a></li>-->
<li><a href="<?=$config['rel_root_folder']?>wiki/about">À propos</a></li> <li><a href="<?=$config['rel_root_folder']?>wiki/about">À propos</a></li>
</ul> </ul>
</li> </li>

82
views/css/d.admin.css Normal file
View 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;
}

View File

@@ -89,6 +89,31 @@
border: 1px inset; 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 { #new_comment {
clear: both; clear: both;
margin: 100px auto 0 auto; margin: 100px auto 0 auto;
@@ -230,9 +255,20 @@ form.form label {
float: right; float: right;
font-size: 17px; font-size: 17px;
} }
#permalink { #permalink_container {
width: calc(100% - 20px); 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] { form.form input[type=submit] {
width: auto; width: auto;

View File

@@ -25,7 +25,8 @@ a:hover {
text-decoration: none; text-decoration: none;
} }
input { input, textarea {
font-family: "Fira Sans", "Open Sans",Helvetica,Arial,sans-serif;
border-bottom-left-radius: 3px; border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px; border-bottom-right-radius: 3px;
} }
@@ -38,6 +39,10 @@ small {
font-weight: 500; font-weight: 500;
} }
pre {
overflow: auto;
}
.button { .button {
padding: 5px 10px; padding: 5px 10px;
margin: 5px 10px; margin: 5px 10px;
@@ -100,7 +105,7 @@ header {
z-index: 1000; z-index: 1000;
} }
header ul { #menu {
float: right; float: right;
position: relative; position: relative;
} }
@@ -111,7 +116,7 @@ header li {
vertical-align: middle; vertical-align: middle;
} }
header li a { header li a, .hamburger {
color: white; color: white;
padding: 25px 15px 15px; padding: 25px 15px 15px;
height: 20px; height: 20px;
@@ -121,6 +126,16 @@ header li a {
header li a:hover, header li a:focus-within { header li a:hover, header li a:focus-within {
color: white; 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 { header li:hover a, header li:focus-within a {
border-bottom: 6px solid blue; 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 { header li.has-sub:hover a, header li.has-sub:focus-within a {
border-bottom: 6px solid #212121; 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 { header li.has-sub:hover > ul, header li.has-sub:focus-within > ul {
display: block; display: block;
} }
@@ -159,6 +176,12 @@ header li.has-sub ul {
background: #212121; background: #212121;
} }
header li.with-subtitle ul {
right: unset;
position: relative;
min-width: 100%;
}
header li.has-sub ul li { header li.has-sub ul li {
display: block; display: block;
height: 46px; height: 46px;
@@ -212,8 +235,58 @@ header input:hover, header input:focus-within {
color: #222; 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 { #Hcontent {
width: 850px; max-width: 850px;
margin: 0 auto; margin: 0 auto;
} }
@@ -238,14 +311,14 @@ section {
position: relative; position: relative;
background: white; background: white;
margin: auto; margin: auto;
width: 820px; max-width: 820px;
min-height: calc(100% - 98px); min-height: calc(100% - 94px);
z-index: 10; z-index: 10;
padding: 15px; padding: 15px;
text-align: justify; text-align: justify;
} }
section#index { section#index {
min-height: calc(100% - 98px - 320px); min-height: calc(100% - 95px - 320px);
} }
section h1 { section h1 {
@@ -254,12 +327,15 @@ section h1 {
margin-top: 20px; margin-top: 20px;
border-bottom: 1px solid #bbb; border-bottom: 1px solid #bbb;
} }
section#index h1{
font-size: 40px;
}
section .subtitle { section .subtitle {
font-variant: small-caps; font-variant: small-caps;
font-weight: 500; font-weight: 500;
background: #ddd; background: #ddd;
margin: 0 20px 20px 0; margin: 0 20px 5px 0;
display: inline-block; display: inline-block;
padding: 3px 5px; padding: 3px 5px;
float: right; float: right;
@@ -269,23 +345,30 @@ section p {
margin: 20px 0; margin: 20px 0;
} }
@media (max-width: 800px) {
section h1 {
font-size: 1.8rem;
text-align: left;
}
section#index h1 {
font-size: 1.7rem;
}
}
/***************************************/ /***************************************/
footer { footer {
background: #212121; background: #212121;
width: 820px; max-width: 820px;
padding: 15px; padding: 15px;
margin: 15px auto 0 auto; margin: 15px auto 0 auto;
color: #c1c1c1; color: #c1c1c1;
text-align: left;
}
footer {
} }
footer #footernav { footer #footernav {
float: right;
padding: 0; padding: 0;
margin: 0; margin: 0;
margin-left: auto;
} }
footer a { footer a {
@@ -296,13 +379,19 @@ footer a:hover {
color: white; color: white;
} }
footer .flex {
display: flex;
flex-wrap: wrap;
gap: 1rem;
}
/*********************************/ /*********************************/
/** Index page **/ /** Index page **/
/*********************************/ /*********************************/
#indexFullW { #indexFullW {
position: relative; position: relative;
background: url('../img/aside.jpg') center center no-repeat #070707; background: url('../img/aside.jpg') left center no-repeat #070707;
width: 100%; width: 100%;
height: 320px; height: 320px;
z-index: 100; z-index: 100;
@@ -311,44 +400,25 @@ footer a:hover {
#AScontent { #AScontent {
height: 320px; height: 320px;
width: 850px; max-width: 850px;
margin: auto; margin: auto;
position: relative;
} }
#spacebeforesponsors { #imglegend {
height: 238px; text-align: right;
}
#sponsors {
height: 70px;
background: rgba(0,0,0,0.5); 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; color: white;
font-size: 20px; font-size: 14px;
font-variant: small-caps; font-variant: small-caps;
line-height: 70px; line-height: 20px;
position: absolute;
width: 100%;
bottom: 0px;
} }
#imglegend p {
section .thumb { padding: 5px;
margin: 0 10px; height: 20px;
border: 1px solid #aaa;
} }
/*********************************/ /*********************************/

View File

@@ -9,10 +9,54 @@ body {
footer { footer {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: calc(50% - 425px); right: 50%;
transform: translateX(50%);
width: 100%;
max-width: 820px;
z-index: 10000; 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 Controls of the map
*****************************************/ *****************************************/
@@ -154,14 +198,16 @@ footer {
#footer-credits, #footer-legend { #footer-credits, #footer-legend {
background: #212121; background: #212121;
width: 820px;
padding: 15px; padding: 15px;
margin: 15px auto 0 auto; margin: 15px auto 0 auto;
color: #c1c1c1; color: #c1c1c1;
text-align: left; text-align: left;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: calc(50% - 425px); right: 50%;
transform: translateX(50%);
width: 100%;
max-width: 820px;
z-index: 10000; z-index: 10000;
display: flex; display: flex;
} }

View File

@@ -42,10 +42,13 @@ html, body {
/** Editor page **/ /** 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 { form.form input, form.form textarea, form.form input[type=radio]:checked+label, #locale {
background: #ddd; background: #ddd;
border-bottom: 2px solid #ccc; border-bottom: 2px solid #ccc;
padding: 10px;
} }
form.form h1 input { form.form h1 input {
@@ -126,6 +129,7 @@ form.form input[type=radio]+label img {
width: 21px; width: 21px;
background: #ddd; background: #ddd;
font-size: 25px; font-size: 25px;
border-radius: 100px;
} }
#specific_form .threecb.check:after { #specific_form .threecb.check:after {
content: "\f058"; /* check */ content: "\f058"; /* check */
@@ -158,6 +162,22 @@ form.form input[type=radio]+label img {
font-style: italic; font-style: italic;
} }
#permalink_container {
position: relative;
margin: 2px 0;
}
#permalink {
width: calc(100% - 194px);
padding-left: 184px;
}
#permalink_label {
position: absolute;
top: 10px;
left: 10px;
opacity: 0.8;
font-size: 16px;
}
/***************************************** /*****************************************
Controls of the map Controls of the map
*****************************************/ *****************************************/

View File

@@ -3,7 +3,7 @@
/*********************************/ /*********************************/
form.form { form.form {
width: 50%; width: 80%;
margin: 25px auto; margin: 25px auto;
text-align: center; text-align: center;
} }

View File

@@ -50,6 +50,7 @@ form.form input[type=submit] {
#wikiContent blockquote { margin-left: 40px; margin-right: 40px } #wikiContent blockquote { margin-left: 40px; margin-right: 40px }
#wikiContent ol, #wikiContent ul, #wikiContent dd { margin-left: 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 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 { #wikiContent .footnotes {
font-size: 0.8em; font-size: 0.8em;
@@ -57,10 +58,31 @@ form.form input[type=submit] {
#wikiContent .footnotes p { #wikiContent .footnotes p {
margin: 0.4em 0; margin: 0.4em 0;
} }
#wikiContent hr {
border: 1px inset;
}
#wiki_page.archive { #wiki_page.archive {
opacity: 0.5; 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
View 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>

View File

@@ -8,7 +8,7 @@
<? include('blocks/d.nav.html'); ?> <? include('blocks/d.nav.html'); ?>
<section> <section>
<h1>Mise à jour.</h1> <h1><?=$head['title']?></h1>
<br> <br>
<pre><? <pre><?
foreach($output as $line) { foreach($output as $line) {

View File

@@ -8,13 +8,16 @@
<? include('blocks/d.nav.html'); ?> <? include('blocks/d.nav.html'); ?>
<section> <section>
<h1>Administration.</h1> <h1>Administration</h1>
<br> <br>
<? if($user->rankIsHigher("administrator")) { ?> <? if($user->rankIsHigher("administrator")) { ?>
<a href="<?=$config['rel_root_folder']?>admin/git-pull" class="button"><i class="fas fa-sync-alt"></i> Mettre à jour</a> <small>Met à jour le logiciel depuis le dépôt GIT.</small><br><br> <a href="<?=$config['rel_root_folder']?>admin/git-pull" class="button"><i class="fas fa-sync-alt"></i> Mettre à jour</a> <small>Met à jour le logiciel depuis le dépôt GIT.</small><br><br>
<a href="<?=$config['rel_root_folder']?>admin/sql-backup" class="button"><i class="fas fa-file-export"></i> Sauvegarde SQL</a><a href="<?=$config['rel_root_folder']?>admin/files-backup" class="button"><i class="fas fa-file-export"></i> Archive des médias</a><small>Génère un dump SQL et une archive de fichiers téléchargeable.</small><br><br>
<? } ?> <? } ?>
<? if($user->rankIsHigher("moderator")) { ?> <? if($user->rankIsHigher("moderator")) { ?>
<a href="<?=$config['rel_root_folder']?>admin/logs" class="button"><i class="fas fa-history"></i> Voir les logs</a> <small>Permet d'accéder aux 200 dernières lignes des logs bruts des actions sur la base de données.</small><br><br> <a href="<?=$config['rel_root_folder']?>admin/logs" class="button"><i class="fas fa-history"></i> Voir les logs</a> <small>Permet d'accéder aux 200 dernières lignes des logs bruts des actions sur la base de données.</small><br><br>
<a href="<?=$config['rel_root_folder']?>admin/wiki-files" class="button"><i class="fas fa-paperclip"></i> Fichiers attachés</a><small>Gérer les fichiers attachés pour le wiki : liste, ajout, suppression...</small><br><br>
<a href="<?=$config['rel_root_folder']?>admin/stats" class="button"><i class="fas fa-chart-line"></i> Statistiques</a><small>Analyser les logs et afficher les statistiques.</small><br><br>
<? } ?> <? } ?>
</section> </section>

View File

@@ -8,7 +8,7 @@
<? include('blocks/d.nav.html'); ?> <? include('blocks/d.nav.html'); ?>
<section> <section>
<h1>Logs.</h1> <h1><?=$head['title']?></h1>
<span class="subtitle"> <span class="subtitle">
<select id="logfile"> <select id="logfile">
<? $i = 0; <? $i = 0;

27
views/d.admin.stats.html Normal file
View 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
View 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&amp;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&amp;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&amp;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&amp;order=<?=$order=='ASC'?'DESC':'ASC'?>">Date de création</a>
<?=$orderby=='creation_date'?$order=='ASC'?'<i class="fas fa-caret-down" aria-hidden="true"></i>':'<i class="fas fa-caret-up" aria-hidden="true"></i>':''?>
</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?>&amp;order=<?=$order?>" onclick="return confirm('Es-tu sûr de vouloir supprimer ?');"><span class="external-link"><i class="fas fa-trash"></i></span></a>
</td>
<? } ?>
</tr>
<? } ?>
</table>
<div class="pagebuttons">
<? if ($page != 0) { ?><a class="previous" href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page?>?orderby=<?=$orderby?>&amp;order=<?=$order?>"><i class="fas fa-chevron-left fa-fw"></i></a><? }
if (($page+1)*$rows_per_pages < $filenb) { ?><a class="next" href="<?=$config['rel_root_folder']?>admin/wiki-files/<?=$page+2?>?orderby=<?=$orderby?>&amp;order=<?=$order?>"><i class="fas fa-chevron-right fa-fw"></i></a><? } ?>
</div>
</section>
<? include('blocks/d.footer.html'); ?>
</body>
</html>

View File

@@ -31,7 +31,10 @@
<textarea rows="30" name="content" id="content" placeholder="Contenu de l'article"><?=$blogArticle->content?></textarea> <textarea rows="30" name="content" id="content" placeholder="Contenu de l'article"><?=$blogArticle->content?></textarea>
<? if(isset($new) AND $new==1) { ?> <? 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"> <input type="text" name="permalink" id="permalink" placeholder="URL">
</div>
<? } ?> <? } ?>
<label for="is_commentable"> <label for="is_commentable">

View File

@@ -8,7 +8,7 @@
<? include('blocks/d.nav.html'); ?> <? include('blocks/d.nav.html'); ?>
<section id="blog_list"> <section id="blog_list">
<h1>Blog.</h1> <h1>Blog</h1>
<p class="subtitle"> <p class="subtitle">
<? if ($user->rankIsHigher("moderator")) { ?> <? if ($user->rankIsHigher("moderator")) { ?>
<a href="<?=$config['rel_root_folder']?>blog/new"><i class="fas fa-plus"></i> Nouvel article</a> &mdash; <a href="<?=$config['rel_root_folder']?>blog/new"><i class="fas fa-plus"></i> Nouvel article</a> &mdash;
@@ -22,12 +22,12 @@
<? foreach ($blogArticles->objs as $row) { ?> <? foreach ($blogArticles->objs as $row) { ?>
<article<? if($row->is_public == 'f') echo ' class="article_archive" '; ?>> <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> <div class="article_content"><?=mb_substr($row->content_txt,0,200)?>...</div>
<p class="article_legend"> <p class="article_legend">
<a class="article_link" href="<?=$config['rel_root_folder']?>blog/<?=$row->permalink?>">Lire la suite...</a> <a class="article_link" href="<?=$config['rel_root_folder']?>blog/<?=$row->permalink?>">Lire la suite...</a>
<span class="article_infos"> <span class="article_infos">
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")) { ?> <? if ($user->rankIsHigher("registered")) { ?>
<a href="<?=$config['rel_root_folder']?>user/p/<?=$row->author?>"><?=$row->author_name?></a> <a href="<?=$config['rel_root_folder']?>user/p/<?=$row->author?>"><?=$row->author_name?></a>
<? } <? }

View File

@@ -15,7 +15,7 @@
<select id="bloghistory"> <select id="bloghistory">
<? $i = 0; <? $i = 0;
foreach ($blogHistory->objs as $row) { ?> foreach ($blogHistory->objs as $row) { ?>
<option <?=$row->version_id==$blogArticle->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'&bull; ':''?><? echo 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"?'&bull; ':''?><? echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option>
<? $i++; <? $i++;
} ?> } ?>
</select> </select>
@@ -45,7 +45,7 @@
else { ?> else { ?>
<?=$blogArticle->author_name?> <?=$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 --> <!-- COMMENTS -->
@@ -83,7 +83,7 @@
<? } else { ?> <? } else { ?>
<?=$comment->author_obj->name?> <?=$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') { ?> <? if (($user->rankIsHigher("moderator") || $user->id == $comment->author) && $comment->is_public == 't') { ?>
<span class="delete_link"><a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/delete_comment/<?=$comment->id?>"><i class="fas fa-trash"></i> Effacer le commentaire</a></span> <span class="delete_link"><a href="<?=$config['rel_root_folder']?>blog/<?=$blogArticle->permalink?>/delete_comment/<?=$comment->id?>"><i class="fas fa-trash"></i> Effacer le commentaire</a></span>
<? } ?> <? } ?>

View File

@@ -8,7 +8,7 @@
<? include('blocks/d.nav.html'); ?> <? include('blocks/d.nav.html'); ?>
<section> <section>
<h1>Contribuer au projet Kabano.</h1> <h1>Contribuer au projet Kabano</h1>
<p>&Eacute;tant un projet collaboratif, Kabano se repose sur vos contributions pour diffuser des informations au plus proche de la réalité. En participant au projet Kabano, vous acceptez de placer vos collaborations sous <a href="<?=$config['rel_root_folder']?>wiki/licences">nos licences libres</a>.</p> <p>&Eacute;tant un projet collaboratif, Kabano se repose sur vos contributions pour diffuser des informations au plus proche de la réalité. En participant au projet Kabano, vous acceptez de placer vos collaborations sous <a href="<?=$config['rel_root_folder']?>wiki/licences">nos licences libres</a>.</p>
<br> <br>

View File

@@ -8,7 +8,7 @@
<? include('blocks/d.nav.html'); ?> <? include('blocks/d.nav.html'); ?>
<section> <section>
<h1>Nous contacter.</h1> <h1>Me contacter</h1>
<form class="form" action="<?=$config['rel_root_folder']?>contact" method="post"> <form class="form" action="<?=$config['rel_root_folder']?>contact" method="post">
<? if($error=="name") { ?> <? if($error=="name") { ?>
<p style="color: red;">Veuillez renseigner votre nom.</p> <p style="color: red;">Veuillez renseigner votre nom.</p>
@@ -43,8 +43,8 @@
else { ?> else { ?>
<p id="captcha"> <p id="captcha">
<input type="hidden" id="captchahidden" name="captcha" value="10"> <input type="hidden" id="captchahidden" name="captcha" value="10">
<span id="captchatext">Merci d'attendre <b id="captchasec">10 s</b> avant de pouvoir nous contacter.<br> <span id="captchatext">Merci d'attendre <b id="captchasec">10 s</b> avant de pouvoir me contacter.<br>
<small>Ceci nous permet de laisser les robots à la porte.</small></span> <small>Ceci me permet de laisser les robots à la porte.</small></span>
<input disabled id="captchasubmit" style="display:none;" type="submit" name="submit" value="Envoyer"> <input disabled id="captchasubmit" style="display:none;" type="submit" name="submit" value="Envoyer">
</p> </p>
<? } ?> <? } ?>

View File

@@ -8,23 +8,32 @@
<? include('blocks/d.nav.html'); ?> <? include('blocks/d.nav.html'); ?>
<aside id="indexFullW"> <aside id="indexFullW">
<!-- <div id="AScontent"> <div id="AScontent">
<div id="spacebeforesponsors"></div> <div id="imglegend">
<div id="sponsors"> <p>Refuge de Pointe Basse</p>
<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>
</div> </div>
</div> -->
</aside> </aside>
<?
require_once($config['models_folder']."d.wiki.php");
$wikiPage = new Kabano\WikiPage();
$wikiPage->checkPermalink('index');
$wikiPage->md2html();
?>
<section id="index"> <section id="index">
<h1>Cabanes et bivouac en montagne.</h1> <h1><?=$wikiPage->name?></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> <? if($user->rankIsHigher('moderator')) { ?>
<p style="text-align: center;"> <span class="subtitle">
<img alt="Illustration hut" src="<?=$config['views_url']?>img/thumb1.jpg" class="thumb" title="© ptit tapou - Forums Pyrénées Team"> <a href="<?=$config['rel_root_folder']?>wiki/index/edit"><i class="fas fa-pencil-alt"></i> Éditer la page</a>
<img alt="Illustration tent" src="<?=$config['views_url']?>img/thumb2.jpg" class="thumb"> </span>
<img alt="Illustration hut" src="<?=$config['views_url']?>img/thumb3.jpg" class="thumb" title="CC BY-SA - EricM - refuges.info"> <? } ?>
</p>
<br><br>
<?=$wikiPage->content_html?>
</section> </section>
<? include('blocks/d.footer.html'); ?> <? include('blocks/d.footer.html'); ?>

View File

@@ -7,6 +7,8 @@
<? include('blocks/d.nav.html'); ?> <? 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="mapid" style="height: 100%;"></div>
<div id="footer-credits" style="display: none;"> <div id="footer-credits" style="display: none;">

View File

@@ -118,12 +118,37 @@
updateForm($(this).prev().val()); updateForm($(this).prev().val());
}); });
}); });
</script> </script>
<p id="abstract"></p> <p id="abstract"></p>
<div id="specific_form"></div> <div id="specific_form"></div>
<? 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">
</div>
<? } ?>
<script type="text/javascript">
$( "#name" ).keyup(function() {
permalink = $( "#name" ).val();
permalink = permalink.replace(/ /g,'_');
permalink = permalink.toLowerCase();
permalink = permalink.replace(/[^a-z0-9_]/g,'-');
permalink = permalink.replace(/[_-]+$/g,'');
$( "#permalink" ).val(permalink);
});
$( "#name" ).change(function() {
permalink = $( "#name" ).val();
permalink = permalink.replace(/ /g,'_');
permalink = permalink.toLowerCase();
permalink = permalink.replace(/[^a-z0-9_]/g,'-');
permalink = permalink.replace(/[_-]+$/g,'');
$( "#permalink" ).val(permalink);
});
</script>
<input name="submit" id="submit" type="submit" value="Ajouter l'hébergement"> <input name="submit" id="submit" type="submit" value="Ajouter l'hébergement">
</form> </form>
</section> </section>

View File

@@ -8,7 +8,7 @@
<? include('blocks/d.nav.html'); ?> <? include('blocks/d.nav.html'); ?>
<section> <section>
<h1>Connexion.</h1> <h1>Connexion</h1>
<form class="form" action="<?=$config['rel_root_folder']?>user/login" method="post" id="login"> <form class="form" action="<?=$config['rel_root_folder']?>user/login" method="post" id="login">
<? if(isset($_GET['error']) AND $_GET['error']==1) { ?> <? if(isset($_GET['error']) AND $_GET['error']==1) { ?>
<p style="color: red;">Erreur lors de la connexion, merci de réessayer.</p> <p style="color: red;">Erreur lors de la connexion, merci de réessayer.</p>

View File

@@ -8,7 +8,7 @@
<? include('blocks/d.nav.html'); ?> <? include('blocks/d.nav.html'); ?>
<section id="member_list"> <section id="member_list">
<h1>Liste des membres.</h1> <h1>Liste des membres</h1>
<p class="subtitle">Membres <?=$first?> à <?=$last?> sur les <?=$users->number?> inscrits</p> <p class="subtitle">Membres <?=$first?> à <?=$last?> sur les <?=$users->number?> inscrits</p>
<table> <table>
@@ -45,8 +45,8 @@
<a class="username" href="<?=$config['rel_root_folder']?>user/p/<?=$row->id?>"><?=$row->name?></a> <a class="username" href="<?=$config['rel_root_folder']?>user/p/<?=$row->id?>"><?=$row->name?></a>
</td> </td>
<td><?=$row->get_rank()?></td> <td><?=$row->get_rank()?></td>
<td><? echo strftime('%e %B %G',strtotime($row->register_date)) ?></td> <td><? echo datefmt_format($user->date_format,date_create($row->register_date, new DateTimeZone("UTC"))) ?></td>
<td><? echo strftime('%e %B %G',strtotime($row->visit_date)) ?></td> <td><? echo datefmt_format($user->date_format,date_create($row->visit_date, new DateTimeZone("UTC"))) ?></td>
<td> <td>
<? if ($row->website != "") { ?> <? if ($row->website != "") { ?>
<a target="_blank" href="<?=$row->website?>">Site internet <span class="external-link"><i class="fas fa-external-link-alt"></i></span></a> <a target="_blank" href="<?=$row->website?>">Site internet <span class="external-link"><i class="fas fa-external-link-alt"></i></span></a>

View File

@@ -8,7 +8,7 @@
<? include('blocks/d.nav.html'); ?> <? include('blocks/d.nav.html'); ?>
<section> <section>
<h1>Envoi d'un mot de passe.</h1> <h1>Envoi d'un mot de passe</h1>
<form class="form" action="<?=$config['rel_root_folder']?>user/password_lost" method="post" id="password_lodt"> <form class="form" action="<?=$config['rel_root_folder']?>user/password_lost" method="post" id="password_lodt">
<? if(isset($_GET['error']) AND $_GET['error']==1) { ?> <? if(isset($_GET['error']) AND $_GET['error']==1) { ?>
<p style="color: red;">Cette adresse mail n'existe pas.</p> <p style="color: red;">Cette adresse mail n'existe pas.</p>

View File

@@ -47,6 +47,13 @@
<option <?=$userProfile->get_locale()==$locale->display_name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option> <option <?=$userProfile->get_locale()==$locale->display_name?'selected':''?> value="<?=$locale->name?>"><?=$locale->display_name?></option>
<? } ?> <? } ?>
</select></li> </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")) { ?> <? if($user->rankIsHigher("administrator")) { ?>
<li><label for="rank">Rang : </label> <li><label for="rank">Rang : </label>
<select name="rank" id="rank"> <select name="rank" id="rank">

View File

@@ -24,8 +24,8 @@
</aside> </aside>
<div id="description"> <div id="description">
<p>Langue : <?=$userProfile->get_locale()?></p> <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>Inscrit le <? echo datefmt_format($user->datetime_format,date_create($userProfile->register_date, new DateTimeZone("UTC"))) ?></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>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><?=$userProfile->get_rank()?></p>
<p> <p>
<? if ($userProfile->website != "") { ?> <? if ($userProfile->website != "") { ?>

View File

@@ -8,7 +8,7 @@
<? include('blocks/d.nav.html'); ?> <? include('blocks/d.nav.html'); ?>
<section> <section>
<h1>Inscription.</h1> <h1>Inscription</h1>
<form class="form" action="<?=$config['rel_root_folder']?>user/signin" method="post" id="signin"> <form class="form" action="<?=$config['rel_root_folder']?>user/signin" method="post" id="signin">
<? if(isset($_GET['error']) AND $_GET['error']=="name") { ?> <? if(isset($_GET['error']) AND $_GET['error']=="name") { ?>
<p style="color: red;">Veuillez choisir un autre nom d'utilisateur.</p> <p style="color: red;">Veuillez choisir un autre nom d'utilisateur.</p>

View File

@@ -15,7 +15,7 @@
<select id="wikihistory"> <select id="wikihistory">
<? $i = 0; <? $i = 0;
foreach ($wikiHistory->objs as $row) { ?> foreach ($wikiHistory->objs as $row) { ?>
<option <?=$row->version_id==$wikiPage->version_id?'selected':''?> value="<?=$i?>"><?=$row->is_archive=="f"?'&bull; ':''?><? echo 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"?'&bull; ':''?><? echo datefmt_format($user->datetimeshort_format,date_create($row->update_date, new DateTimeZone("UTC"))) ?></option>
<? $i++; <? $i++;
} ?> } ?>
</select> </select>
@@ -38,7 +38,7 @@
<?=$wikiPage->content_html?> <?=$wikiPage->content_html?>
</div> </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> <div style="clear: both;"> </div>
</section> </section>

BIN
views/img/aside.jpg Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -21,12 +21,18 @@ function reduce() {
}, 100, function() { }, 100, function() {
// Animation complete. // Animation complete.
}); });
$( "header a.on-bar" ).animate({ $( "header li:not(.with-subtitle) a.on-bar" ).animate({
paddingTop: "15px", paddingTop: "15px",
paddingBottom: "5px" paddingBottom: "5px"
}, 100, function() { }, 100, function() {
// Animation complete. // Animation complete.
}); });
$( "header li.with-subtitle a.on-bar" ).animate({
paddingTop: "5px",
paddingBottom: "15px"
}, 100, function() {
// Animation complete.
});
} }
function enlarge() { function enlarge() {
@@ -50,21 +56,27 @@ function enlarge() {
}, 100, function() { }, 100, function() {
// Animation complete. // Animation complete.
}); });
$( "header a.on-bar" ).animate({ $( "header li:not(.with-subtitle) a.on-bar" ).animate({
paddingTop: "25px", paddingTop: "25px",
paddingBottom: "15px" paddingBottom: "15px"
}, 100, function() { }, 100, function() {
// Animation complete. // Animation complete.
}); });
$( "header li.with-subtitle a.on-bar" ).animate({
paddingTop: "15px",
paddingBottom: "25px"
}, 100, function() {
// Animation complete.
});
} }
$(window).scroll(function() { $(window).scroll(function() {
var position = $(window).scrollTop(); var position = $(window).scrollTop();
if (position>80 && small!=1) { if (position>80 && small!=1 && $('body').width() > 800) {
small = 1; small = 1;
reduce(); reduce();
} }
else if (position<=80 && small!=0) { else if (position<=80 && small!=0 && $('body').width() > 800) {
small = 0; small = 0;
enlarge(); enlarge();
} }

View File

@@ -3,7 +3,8 @@ var mymap;
$( document ).ready(function() { $( document ).ready(function() {
// Differents layers for the map // 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 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 // Base layers
var baseLayers = { var baseLayers = {
"OpenStreetMap": topo_maptiler, "OpenStreetMap": topo_maptiler,

View File

@@ -4,7 +4,7 @@ var poi_layer;
$( document ).ready(function() { $( document ).ready(function() {
// Differents layers for the map // 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 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 // Base layers
var baseLayers = { var baseLayers = {
"OpenStreetMap": topo_maptiler, "OpenStreetMap": topo_maptiler,

View 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}}

File diff suppressed because one or more lines are too long