From 75df9edb8c923313fd6a1f9f3ced318014e32337 Mon Sep 17 00:00:00 2001
From: ewilly
Date: Wed, 23 Mar 2016 19:30:43 +0100
Subject: [PATCH] Initial commit
---
README.md | 5 +-
conf/nginx.conf | 23 +
manifest.json | 80 +
scripts/backup | 19 +
scripts/install | 109 +
scripts/remove | 8 +
scripts/restore | 11 +
scripts/upgrade | 41 +
sources/LICENCE.md | 201 ++
sources/changelog.md | 131 +
sources/config.php | 55 +
sources/contributors.md | 9 +
sources/core/.htaccess | 4 +
sources/core/Array2feed.php | 76 +
sources/core/GET_POST_admin_data.php | 367 +++
sources/core/auto_dropzone.php | 469 ++++
sources/core/auto_restrict.php | 723 ++++++
sources/core/auto_thumb.php | 97 +
sources/core/commands_GET_vars.php | 132 +
sources/core/core.php | 1205 +++++++++
sources/core/core.php.zip | Bin 0 -> 12796 bytes
sources/core/js/VanillaJS.js | 328 +++
sources/core/js/audio.js | 24 +
sources/core/js/audiojs.swf | Bin 0 -> 1644 bytes
sources/core/js/blazy.js | 6 +
sources/core/js/lightbox.js | 72 +
sources/core/js/m3uStreamPlayer.js | 143 +
sources/core/js/marked.js | 6 +
sources/core/js/micromarkdown.js | 10 +
sources/core/js/playlist.js | 40 +
sources/core/js/qr.js | 760 ++++++
sources/core/js/scrolltotop.js | 94 +
sources/core/js/sorttable.js | 495 ++++
sources/core/listfiles.php | 228 ++
sources/core/markdown.php | 509 ++++
sources/core/share.php | 197 ++
sources/core/templates.php | 71 +
sources/core/test.html | 2298 +++++++++++++++++
sources/index.php | 37 +
sources/locale/de.php | 292 +++
sources/locale/en.php | 355 +++
sources/locale/es.php | 338 +++
sources/locale/fr.php | 343 +++
sources/readme.md | 60 +
sources/templates/default/admin.php | 266 ++
sources/templates/default/css/admin.css | 139 +
sources/templates/default/css/dialog.css | 154 ++
.../templates/default/css/edit_profiles.css | 13 +
sources/templates/default/css/editor.css | 34 +
sources/templates/default/css/font/bozon.eot | Bin 0 -> 17140 bytes
sources/templates/default/css/font/bozon.svg | 108 +
sources/templates/default/css/font/bozon.ttf | Bin 0 -> 16984 bytes
sources/templates/default/css/font/bozon.woff | Bin 0 -> 10312 bytes
.../templates/default/css/font/bozon.woff2 | Bin 0 -> 8692 bytes
.../templates/default/css/font/fontello.eot | Bin 0 -> 12604 bytes
.../templates/default/css/font/fontello.svg | 36 +
.../templates/default/css/font/fontello.ttf | Bin 0 -> 12436 bytes
.../templates/default/css/font/fontello.woff | Bin 0 -> 6860 bytes
sources/templates/default/css/footer.css | 26 +
sources/templates/default/css/gallery.css | 33 +
sources/templates/default/css/header.css | 282 ++
sources/templates/default/css/home.css | 82 +
sources/templates/default/css/icons.css | 99 +
sources/templates/default/css/ini.css | 149 ++
sources/templates/default/css/lightbox.css | 85 +
sources/templates/default/css/list.css | 322 +++
sources/templates/default/css/lock.css | 27 +
sources/templates/default/css/login.css | 53 +
sources/templates/default/css/markdown.css | 425 +++
sources/templates/default/css/mobile.css | 55 +
.../templates/default/css/music_player.css | 205 ++
sources/templates/default/css/pen.css | 175 ++
sources/templates/default/css/share.css | 51 +
sources/templates/default/css/stats.css | 77 +
sources/templates/default/css/style.php | 90 +
sources/templates/default/css/users_page.css | 124 +
sources/templates/default/css/userslist.css | 34 +
sources/templates/default/edit_profiles.php | 56 +
sources/templates/default/editor.php | 77 +
sources/templates/default/favicon.png | Bin 0 -> 2993 bytes
sources/templates/default/footer.php | 23 +
sources/templates/default/footer_markdown.php | 5 +
sources/templates/default/header.php | 111 +
sources/templates/default/header_markdown.php | 19 +
sources/templates/default/home.php | 77 +
.../default/img/admin/fil_ariane_home.png | Bin 0 -> 337 bytes
.../default/img/admin/menu_download_url.png | Bin 0 -> 600 bytes
.../templates/default/img/admin/menu_file.png | Bin 0 -> 229 bytes
.../templates/default/img/admin/menu_icon.png | Bin 0 -> 159 bytes
.../templates/default/img/admin/menu_link.png | Bin 0 -> 498 bytes
.../templates/default/img/admin/menu_list.png | Bin 0 -> 170 bytes
.../templates/default/img/admin/menu_move.png | Bin 0 -> 296 bytes
.../default/img/admin/menu_new_folder.png | Bin 0 -> 386 bytes
.../templates/default/img/admin/move_file.png | Bin 0 -> 481 bytes
.../default/img/admin/move_folder.png | Bin 0 -> 331 bytes
.../templates/default/img/admin/previous.png | Bin 0 -> 545 bytes
.../default/img/admin/shared_folder.png | Bin 0 -> 1121 bytes
sources/templates/default/img/admin/space.png | Bin 0 -> 353 bytes
sources/templates/default/img/barb.png | Bin 0 -> 176 bytes
sources/templates/default/img/barw.png | Bin 0 -> 170 bytes
.../templates/default/img/dialog/required.png | Bin 0 -> 648 bytes
.../templates/default/img/extensions/css.png | Bin 0 -> 1182 bytes
.../templates/default/img/extensions/doc.png | Bin 0 -> 2016 bytes
.../templates/default/img/extensions/exe.png | Bin 0 -> 2726 bytes
.../templates/default/img/extensions/html.png | Bin 0 -> 1139 bytes
.../templates/default/img/extensions/js.png | Bin 0 -> 1135 bytes
.../templates/default/img/extensions/mp3.png | Bin 0 -> 938 bytes
.../templates/default/img/extensions/mp4.png | Bin 0 -> 1028 bytes
.../templates/default/img/extensions/pdf.png | Bin 0 -> 1487 bytes
.../templates/default/img/extensions/php.png | Bin 0 -> 1147 bytes
.../templates/default/img/extensions/swf.png | Bin 0 -> 1877 bytes
.../templates/default/img/extensions/txt.png | Bin 0 -> 1363 bytes
.../default/img/extensions/unknown.png | Bin 0 -> 867 bytes
.../templates/default/img/extensions/xls.png | Bin 0 -> 1887 bytes
.../templates/default/img/extensions/zip.png | Bin 0 -> 2691 bytes
sources/templates/default/img/folder.png | Bin 0 -> 456 bytes
.../templates/default/img/footer/github.png | Bin 0 -> 1714 bytes
sources/templates/default/img/ghost.png | Bin 0 -> 165 bytes
.../default/img/header/file_tree.png | Bin 0 -> 694 bytes
sources/templates/default/img/header/home.png | Bin 0 -> 318 bytes
.../templates/default/img/header/locked.png | Bin 0 -> 309 bytes
.../templates/default/img/header/log_file.png | Bin 0 -> 294 bytes
sources/templates/default/img/header/logo.png | Bin 0 -> 2995 bytes
.../templates/default/img/header/logout.png | Bin 0 -> 296 bytes
.../default/img/header/miniupload.png | Bin 0 -> 438 bytes
.../templates/default/img/header/new_pass.png | Bin 0 -> 434 bytes
.../templates/default/img/header/new_user.png | Bin 0 -> 449 bytes
.../default/img/header/regen_tree.png | Bin 0 -> 786 bytes
.../templates/default/img/header/search.png | Bin 0 -> 399 bytes
.../default/img/header/text_editor.png | Bin 0 -> 509 bytes
sources/templates/default/img/header/user.png | Bin 0 -> 354 bytes
.../templates/default/img/header/users.png | Bin 0 -> 580 bytes
sources/templates/default/img/home/burn.png | Bin 0 -> 2889 bytes
sources/templates/default/img/home/design.png | Bin 0 -> 4726 bytes
.../templates/default/img/home/error_link.png | Bin 0 -> 2535 bytes
sources/templates/default/img/home/locked.png | Bin 0 -> 2376 bytes
.../templates/default/img/home/logo_agpl.png | Bin 0 -> 26264 bytes
.../templates/default/img/home/logo_css.png | Bin 0 -> 4913 bytes
.../templates/default/img/home/logo_html.png | Bin 0 -> 4908 bytes
.../templates/default/img/home/logo_js.png | Bin 0 -> 4339 bytes
.../templates/default/img/home/logo_php.png | Bin 0 -> 4616 bytes
sources/templates/default/img/home/nodb.png | Bin 0 -> 3381 bytes
sources/templates/default/img/home/qrcode.png | Bin 0 -> 3859 bytes
sources/templates/default/img/home/renew.png | Bin 0 -> 3445 bytes
.../templates/default/img/home/smartphone.png | Bin 0 -> 2541 bytes
sources/templates/default/img/home/tosend.png | Bin 0 -> 3997 bytes
.../templates/default/img/home/toshare.png | Bin 0 -> 5571 bytes
.../default/img/home/unzipfolder.png | Bin 0 -> 4059 bytes
sources/templates/default/img/home/users.png | Bin 0 -> 3840 bytes
.../templates/default/img/home/zipfolder.png | Bin 0 -> 3094 bytes
.../templates/default/img/lightbox/close.png | Bin 0 -> 493 bytes
.../default/img/lightbox/close_white.png | Bin 0 -> 857 bytes
.../default/img/lightbox/loading.gif | Bin 0 -> 1859 bytes
.../templates/default/img/lightbox/next.png | Bin 0 -> 1527 bytes
.../templates/default/img/lightbox/prev.png | Bin 0 -> 1446 bytes
sources/templates/default/img/list/burn.png | Bin 0 -> 409 bytes
.../default/img/list/download_folder.png | Bin 0 -> 385 bytes
sources/templates/default/img/list/edit.png | Bin 0 -> 509 bytes
sources/templates/default/img/list/eye.png | Bin 0 -> 365 bytes
sources/templates/default/img/list/folder.png | Bin 0 -> 305 bytes
sources/templates/default/img/list/link.png | Bin 0 -> 498 bytes
sources/templates/default/img/list/locked.png | Bin 0 -> 309 bytes
sources/templates/default/img/list/move.png | Bin 0 -> 296 bytes
sources/templates/default/img/list/qrcode.png | Bin 0 -> 505 bytes
sources/templates/default/img/list/rename.png | Bin 0 -> 383 bytes
sources/templates/default/img/list/renew.png | Bin 0 -> 381 bytes
.../default/img/list/shared_folder.png | Bin 0 -> 1115 bytes
sources/templates/default/img/list/trash.png | Bin 0 -> 2897 bytes
sources/templates/default/img/list/users.png | Bin 0 -> 580 bytes
.../templates/default/img/player-graphics.png | Bin 0 -> 1542 bytes
sources/templates/default/img/stats/trash.png | Bin 0 -> 2897 bytes
sources/templates/default/img/video.png | Bin 0 -> 5358 bytes
sources/templates/default/info.md | 1 +
sources/templates/default/login.php | 91 +
sources/templates/default/stats.php | 109 +
.../default/templates/dialog_delete.html | 17 +
.../templates/dialog_download_url.html | 17 +
.../default/templates/dialog_link.html | 13 +
.../default/templates/dialog_move.html | 18 +
.../default/templates/dialog_new_folder.html | 16 +
.../default/templates/dialog_password.html | 18 +
.../default/templates/dialog_qrcode.html | 10 +
.../default/templates/dialog_rename.html | 17 +
.../default/templates/dialog_share.html | 18 +
.../templates/default/templates/lightbox.html | 11 +
.../default/templates/links_file_icon.html | 14 +
.../default/templates/links_file_list.html | 21 +
.../default/templates/links_folder_icon.html | 16 +
.../default/templates/links_folder_list.html | 13 +
.../default/templates/links_image_icon.html | 15 +
.../default/templates/links_image_list.html | 13 +
.../default/templates/move_file_icon.html | 8 +
.../default/templates/move_file_list.html | 14 +
.../default/templates/move_folder_icon.html | 10 +
.../default/templates/move_folder_list.html | 15 +
.../default/templates/move_image_icon.html | 8 +
.../default/templates/move_image_list.html | 13 +
.../templates/default/templates/read_m3u.html | 9 +
.../default/templates/view_file_icon.html | 15 +
.../default/templates/view_file_list.html | 15 +
.../default/templates/view_folder_icon.html | 15 +
.../default/templates/view_folder_list.html | 15 +
.../default/templates/view_image_icon.html | 14 +
.../default/templates/view_image_list.html | 14 +
.../templates/view_shared_folder_icon.html | 12 +
.../templates/view_shared_folder_list.html | 11 +
sources/templates/default/users.php | 105 +
207 files changed, 14723 insertions(+), 1 deletion(-)
create mode 100644 conf/nginx.conf
create mode 100644 manifest.json
create mode 100644 scripts/backup
create mode 100644 scripts/install
create mode 100644 scripts/remove
create mode 100644 scripts/restore
create mode 100644 scripts/upgrade
create mode 100644 sources/LICENCE.md
create mode 100644 sources/changelog.md
create mode 100644 sources/config.php
create mode 100644 sources/contributors.md
create mode 100644 sources/core/.htaccess
create mode 100644 sources/core/Array2feed.php
create mode 100644 sources/core/GET_POST_admin_data.php
create mode 100644 sources/core/auto_dropzone.php
create mode 100644 sources/core/auto_restrict.php
create mode 100644 sources/core/auto_thumb.php
create mode 100644 sources/core/commands_GET_vars.php
create mode 100644 sources/core/core.php
create mode 100644 sources/core/core.php.zip
create mode 100644 sources/core/js/VanillaJS.js
create mode 100644 sources/core/js/audio.js
create mode 100644 sources/core/js/audiojs.swf
create mode 100644 sources/core/js/blazy.js
create mode 100644 sources/core/js/lightbox.js
create mode 100644 sources/core/js/m3uStreamPlayer.js
create mode 100644 sources/core/js/marked.js
create mode 100644 sources/core/js/micromarkdown.js
create mode 100644 sources/core/js/playlist.js
create mode 100644 sources/core/js/qr.js
create mode 100644 sources/core/js/scrolltotop.js
create mode 100644 sources/core/js/sorttable.js
create mode 100644 sources/core/listfiles.php
create mode 100644 sources/core/markdown.php
create mode 100644 sources/core/share.php
create mode 100644 sources/core/templates.php
create mode 100644 sources/core/test.html
create mode 100644 sources/index.php
create mode 100644 sources/locale/de.php
create mode 100644 sources/locale/en.php
create mode 100644 sources/locale/es.php
create mode 100644 sources/locale/fr.php
create mode 100644 sources/readme.md
create mode 100644 sources/templates/default/admin.php
create mode 100644 sources/templates/default/css/admin.css
create mode 100644 sources/templates/default/css/dialog.css
create mode 100644 sources/templates/default/css/edit_profiles.css
create mode 100644 sources/templates/default/css/editor.css
create mode 100644 sources/templates/default/css/font/bozon.eot
create mode 100644 sources/templates/default/css/font/bozon.svg
create mode 100644 sources/templates/default/css/font/bozon.ttf
create mode 100644 sources/templates/default/css/font/bozon.woff
create mode 100644 sources/templates/default/css/font/bozon.woff2
create mode 100644 sources/templates/default/css/font/fontello.eot
create mode 100644 sources/templates/default/css/font/fontello.svg
create mode 100644 sources/templates/default/css/font/fontello.ttf
create mode 100644 sources/templates/default/css/font/fontello.woff
create mode 100644 sources/templates/default/css/footer.css
create mode 100644 sources/templates/default/css/gallery.css
create mode 100644 sources/templates/default/css/header.css
create mode 100644 sources/templates/default/css/home.css
create mode 100644 sources/templates/default/css/icons.css
create mode 100644 sources/templates/default/css/ini.css
create mode 100644 sources/templates/default/css/lightbox.css
create mode 100644 sources/templates/default/css/list.css
create mode 100644 sources/templates/default/css/lock.css
create mode 100644 sources/templates/default/css/login.css
create mode 100644 sources/templates/default/css/markdown.css
create mode 100644 sources/templates/default/css/mobile.css
create mode 100644 sources/templates/default/css/music_player.css
create mode 100644 sources/templates/default/css/pen.css
create mode 100644 sources/templates/default/css/share.css
create mode 100644 sources/templates/default/css/stats.css
create mode 100644 sources/templates/default/css/style.php
create mode 100644 sources/templates/default/css/users_page.css
create mode 100644 sources/templates/default/css/userslist.css
create mode 100644 sources/templates/default/edit_profiles.php
create mode 100644 sources/templates/default/editor.php
create mode 100644 sources/templates/default/favicon.png
create mode 100644 sources/templates/default/footer.php
create mode 100644 sources/templates/default/footer_markdown.php
create mode 100644 sources/templates/default/header.php
create mode 100644 sources/templates/default/header_markdown.php
create mode 100644 sources/templates/default/home.php
create mode 100644 sources/templates/default/img/admin/fil_ariane_home.png
create mode 100644 sources/templates/default/img/admin/menu_download_url.png
create mode 100644 sources/templates/default/img/admin/menu_file.png
create mode 100644 sources/templates/default/img/admin/menu_icon.png
create mode 100644 sources/templates/default/img/admin/menu_link.png
create mode 100644 sources/templates/default/img/admin/menu_list.png
create mode 100644 sources/templates/default/img/admin/menu_move.png
create mode 100644 sources/templates/default/img/admin/menu_new_folder.png
create mode 100644 sources/templates/default/img/admin/move_file.png
create mode 100644 sources/templates/default/img/admin/move_folder.png
create mode 100644 sources/templates/default/img/admin/previous.png
create mode 100644 sources/templates/default/img/admin/shared_folder.png
create mode 100644 sources/templates/default/img/admin/space.png
create mode 100644 sources/templates/default/img/barb.png
create mode 100644 sources/templates/default/img/barw.png
create mode 100644 sources/templates/default/img/dialog/required.png
create mode 100644 sources/templates/default/img/extensions/css.png
create mode 100644 sources/templates/default/img/extensions/doc.png
create mode 100644 sources/templates/default/img/extensions/exe.png
create mode 100644 sources/templates/default/img/extensions/html.png
create mode 100644 sources/templates/default/img/extensions/js.png
create mode 100644 sources/templates/default/img/extensions/mp3.png
create mode 100644 sources/templates/default/img/extensions/mp4.png
create mode 100644 sources/templates/default/img/extensions/pdf.png
create mode 100644 sources/templates/default/img/extensions/php.png
create mode 100644 sources/templates/default/img/extensions/swf.png
create mode 100644 sources/templates/default/img/extensions/txt.png
create mode 100644 sources/templates/default/img/extensions/unknown.png
create mode 100644 sources/templates/default/img/extensions/xls.png
create mode 100644 sources/templates/default/img/extensions/zip.png
create mode 100644 sources/templates/default/img/folder.png
create mode 100644 sources/templates/default/img/footer/github.png
create mode 100644 sources/templates/default/img/ghost.png
create mode 100644 sources/templates/default/img/header/file_tree.png
create mode 100644 sources/templates/default/img/header/home.png
create mode 100644 sources/templates/default/img/header/locked.png
create mode 100644 sources/templates/default/img/header/log_file.png
create mode 100644 sources/templates/default/img/header/logo.png
create mode 100644 sources/templates/default/img/header/logout.png
create mode 100644 sources/templates/default/img/header/miniupload.png
create mode 100644 sources/templates/default/img/header/new_pass.png
create mode 100644 sources/templates/default/img/header/new_user.png
create mode 100644 sources/templates/default/img/header/regen_tree.png
create mode 100644 sources/templates/default/img/header/search.png
create mode 100644 sources/templates/default/img/header/text_editor.png
create mode 100644 sources/templates/default/img/header/user.png
create mode 100644 sources/templates/default/img/header/users.png
create mode 100644 sources/templates/default/img/home/burn.png
create mode 100644 sources/templates/default/img/home/design.png
create mode 100644 sources/templates/default/img/home/error_link.png
create mode 100644 sources/templates/default/img/home/locked.png
create mode 100644 sources/templates/default/img/home/logo_agpl.png
create mode 100644 sources/templates/default/img/home/logo_css.png
create mode 100644 sources/templates/default/img/home/logo_html.png
create mode 100644 sources/templates/default/img/home/logo_js.png
create mode 100644 sources/templates/default/img/home/logo_php.png
create mode 100644 sources/templates/default/img/home/nodb.png
create mode 100644 sources/templates/default/img/home/qrcode.png
create mode 100644 sources/templates/default/img/home/renew.png
create mode 100644 sources/templates/default/img/home/smartphone.png
create mode 100644 sources/templates/default/img/home/tosend.png
create mode 100644 sources/templates/default/img/home/toshare.png
create mode 100644 sources/templates/default/img/home/unzipfolder.png
create mode 100644 sources/templates/default/img/home/users.png
create mode 100644 sources/templates/default/img/home/zipfolder.png
create mode 100644 sources/templates/default/img/lightbox/close.png
create mode 100644 sources/templates/default/img/lightbox/close_white.png
create mode 100644 sources/templates/default/img/lightbox/loading.gif
create mode 100644 sources/templates/default/img/lightbox/next.png
create mode 100644 sources/templates/default/img/lightbox/prev.png
create mode 100644 sources/templates/default/img/list/burn.png
create mode 100644 sources/templates/default/img/list/download_folder.png
create mode 100644 sources/templates/default/img/list/edit.png
create mode 100644 sources/templates/default/img/list/eye.png
create mode 100644 sources/templates/default/img/list/folder.png
create mode 100644 sources/templates/default/img/list/link.png
create mode 100644 sources/templates/default/img/list/locked.png
create mode 100644 sources/templates/default/img/list/move.png
create mode 100644 sources/templates/default/img/list/qrcode.png
create mode 100644 sources/templates/default/img/list/rename.png
create mode 100644 sources/templates/default/img/list/renew.png
create mode 100644 sources/templates/default/img/list/shared_folder.png
create mode 100644 sources/templates/default/img/list/trash.png
create mode 100644 sources/templates/default/img/list/users.png
create mode 100644 sources/templates/default/img/player-graphics.png
create mode 100644 sources/templates/default/img/stats/trash.png
create mode 100644 sources/templates/default/img/video.png
create mode 100644 sources/templates/default/info.md
create mode 100644 sources/templates/default/login.php
create mode 100644 sources/templates/default/stats.php
create mode 100644 sources/templates/default/templates/dialog_delete.html
create mode 100644 sources/templates/default/templates/dialog_download_url.html
create mode 100644 sources/templates/default/templates/dialog_link.html
create mode 100644 sources/templates/default/templates/dialog_move.html
create mode 100644 sources/templates/default/templates/dialog_new_folder.html
create mode 100644 sources/templates/default/templates/dialog_password.html
create mode 100644 sources/templates/default/templates/dialog_qrcode.html
create mode 100644 sources/templates/default/templates/dialog_rename.html
create mode 100644 sources/templates/default/templates/dialog_share.html
create mode 100644 sources/templates/default/templates/lightbox.html
create mode 100644 sources/templates/default/templates/links_file_icon.html
create mode 100644 sources/templates/default/templates/links_file_list.html
create mode 100644 sources/templates/default/templates/links_folder_icon.html
create mode 100644 sources/templates/default/templates/links_folder_list.html
create mode 100644 sources/templates/default/templates/links_image_icon.html
create mode 100644 sources/templates/default/templates/links_image_list.html
create mode 100644 sources/templates/default/templates/move_file_icon.html
create mode 100644 sources/templates/default/templates/move_file_list.html
create mode 100644 sources/templates/default/templates/move_folder_icon.html
create mode 100644 sources/templates/default/templates/move_folder_list.html
create mode 100644 sources/templates/default/templates/move_image_icon.html
create mode 100644 sources/templates/default/templates/move_image_list.html
create mode 100644 sources/templates/default/templates/read_m3u.html
create mode 100644 sources/templates/default/templates/view_file_icon.html
create mode 100644 sources/templates/default/templates/view_file_list.html
create mode 100644 sources/templates/default/templates/view_folder_icon.html
create mode 100644 sources/templates/default/templates/view_folder_list.html
create mode 100644 sources/templates/default/templates/view_image_icon.html
create mode 100644 sources/templates/default/templates/view_image_list.html
create mode 100644 sources/templates/default/templates/view_shared_folder_icon.html
create mode 100644 sources/templates/default/templates/view_shared_folder_list.html
create mode 100644 sources/templates/default/users.php
diff --git a/README.md b/README.md
index c81af09..46c8c1c 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,4 @@
-# bozon_ynh
\ No newline at end of file
+# BoZoN package for YunoHost
+
+* [BoZoN website](http://bozon.pw)
+* [YunoHost website](https://yunohost.org/)
diff --git a/conf/nginx.conf b/conf/nginx.conf
new file mode 100644
index 0000000..074f145
--- /dev/null
+++ b/conf/nginx.conf
@@ -0,0 +1,23 @@
+location YNH_EXAMPLE_PATH {
+ # Path to source
+ alias YNH_EXAMPLE_ALIAS ;
+ if ($scheme = http) {
+ rewrite ^ https://$server_name$request_uri? permanent;
+ }
+ client_max_body_size 10G;
+ # Example PHP configuration
+ index index.php;
+ try_files $uri $uri/ index.php;
+ location ~ [^/]\.php(/|$) {
+ fastcgi_split_path_info ^(.+?\.php)(/.*)$;
+ fastcgi_pass unix:/var/run/php5-fpm.sock;
+ fastcgi_index index.php;
+ include fastcgi_params;
+ fastcgi_param REMOTE_USER $remote_user;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ fastcgi_param SCRIPT_FILENAME $request_filename;
+ }
+
+ # Include SSOWAT user panel.
+ include conf.d/yunohost_panel.conf.inc;
+}
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 0000000..f4e928c
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,80 @@
+{
+ "name": "BoZoN",
+ "id": "bozon",
+ "description": {
+ "en": "Minimalist Drag & drop file sharing app",
+ "fr": "Application minimaliste de partage de fichiers"
+ },
+ "url": "http://bozon.pw",
+ "license": "free",
+ "developer": {
+ "name": "ewilly",
+ "email": "ewilly@neuf.fr"
+ },
+ "multi_instance": "false",
+ "services": [
+ "nginx",
+ "php5-fpm"
+ ],
+ "arguments": {
+ "install" : [
+ {
+ "name": "domain",
+ "type": "domain",
+ "ask": {
+ "en": "Choose a domain for BoZoN",
+ "fr": "Choisissez un domaine pour BoZoN"
+ },
+ "example": "domain.org"
+ },
+ {
+ "name": "path",
+ "type": "path",
+ "ask": {
+ "en": "Choose a path for BoZoN",
+ "fr": "Choisissez un chemin pour BoZoN"
+ },
+ "example": "/bozon",
+ "default": "/bozon"
+ },
+ {
+ "name": "admin",
+ "type": "user",
+ "ask": {
+ "en": "Choose an admin user for BoZoN",
+ "fr": "Choisissez un administrateur pour BoZoN"
+ },
+ "example": "homer"
+ },
+ {
+ "name": "password",
+ "type": "password",
+ "ask": {
+ "en": "Choose an admin password for BoZoN",
+ "fr": "Choisissez un mot de passe administrateur pour BoZoN"
+ },
+ "example": "super_secret_password"
+ },
+ {
+ "name": "public_site",
+ "ask": {
+ "en": "Should this application be public ?",
+ "fr": "Est-ce que cette application doit être visible publiquement ?"
+ },
+ "choices": ["Yes", "No"],
+ "default": "Yes"
+ },
+ {
+ "name": "default_lang",
+ "ask": {
+ "en": "Default language",
+ "fr": "Langue par défaut"
+ },
+ "choices": ["de","en","es","fr","it","nl","pl","pt","po","ro","ru"],
+ "default": "en"
+ }
+
+
+ ]
+ }
+}
diff --git a/scripts/backup b/scripts/backup
new file mode 100644
index 0000000..74de43b
--- /dev/null
+++ b/scripts/backup
@@ -0,0 +1,19 @@
+#! /bin/bash
+
+# causes the shell to exit if any subcommand or pipeline returns a non-zero status
+set -e
+
+app=bozon
+app_path=/var/www/$app
+data_path=/home/yunohost.app/$app
+save_path=$1
+
+# Backup sources & data
+ sudo mkdir -p $save_path/data
+ sudo cp -R $app_path $save_path
+ sudo cp -R $data_path $save_path/data
+
+# Copy Nginx and YunoHost parameters to make the script "standalone"
+ sudo cp -a /etc/yunohost/apps/$app/. save_path/yunohost
+ domain=$(sudo yunohost app setting $app domain)
+ sudo cp -a /etc/nginx/conf.d/$domain.d/$app.conf save_path/nginx.conf
diff --git a/scripts/install b/scripts/install
new file mode 100644
index 0000000..6dd9895
--- /dev/null
+++ b/scripts/install
@@ -0,0 +1,109 @@
+#! /bin/bash
+
+app=bozon
+
+#retrieve arguments
+domain=$1
+path=$2
+admin=$3
+password=$4
+is_public=$5
+default_lang=$6
+
+# Remove trailing slash
+[ "$path" != "/" ] && path=${path%/}
+
+# Check domain/path availability
+sudo yunohost app checkurl $domain$path -a $app
+if [[ ! $? -eq 0 ]]; then
+ exit 1
+fi
+
+# Check user
+sudo yunohost user list --json | grep -q "\"username\": \"$admin\""
+if [[ ! $? -eq 0 ]]; then
+ echo "Wrong user"
+ exit 1
+fi
+
+# Save app settings
+sudo yunohost app setting $app admin -v "$admin"
+sudo yunohost app setting $app is_public -v "$is_public"
+sudo yunohost app setting $app domain -v "$domain"
+sudo yunohost app setting $app path -v "$path"
+
+#create path for copying
+final_path=/var/www/$app
+sudo mkdir -p $final_path
+data_path=/home/yunohost.app/$app
+sudo mkdir -p $data_path
+
+#copy files to final folder and set permissions
+sudo cp -R ../sources/* $final_path/
+sudo find $final_path -type f -name ".htaccess" | xargs sudo rm
+
+#setup permissions
+sudo chown -R root: $final_path
+sudo find $final_path -type f | xargs sudo chmod 644
+sudo find $final_path -type d | xargs sudo chmod 755
+sudo chown -R www-data: $data_path
+sudo find $data_path -type f | xargs sudo chmod 644
+sudo find $data_path -type d | xargs sudo chmod 755
+
+#configure nginx settings
+folder_path=${path%/}
+sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" ../conf/nginx.conf
+# If path is only / (without subfolder), add trailing slash to alias
+alias_path=$final_path
+[ "$path" == '/' ] && alias_path=$alias_path'/'
+sudo sed -i "s@YNH_EXAMPLE_ALIAS@$alias_path@g" ../conf/nginx.conf
+sudo sed -i "s@YNH_EXAMPLE_FOLDER@$folder_path@g" ../conf/nginx.conf
+sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
+
+#temporary set public accessible
+sudo yunohost app setting $app unprotected_uris -v "/"
+
+# Restart services
+sudo service nginx reload
+sudo yunohost app ssowatconf
+
+#temporary add domain name to /etc/hosts
+sudo sed -i "1 i\127.0.0.1 $domain #bozon_hosts" /etc/hosts
+
+#make request to install app
+#get the html page
+curl_path=$([ "$path" == "/" ] || echo $path)
+#curl -kL -o install_page.html https://$domain$curl_path/index.php?p=admin >/dev/null 2>&1
+
+
+#get the token for form validation
+#token=$(cat install_page.html | grep "input" | grep "token" | tail -1 | cut -d' ' -f3 | cut -d'"' -f2)
+#send http POST values
+#curl -k -X POST \
+ --data-urlencode "default_lang=$default_lang" \
+ --data-urlencode "install=Installer" \
+ --data-urlencode "name=$admin" \
+ --data-urlencode "login=$admin" \
+ --data-urlencode "pwd=$password" \
+ --data-urlencode "pwd2=$password" \
+ --data-urlencode "token=$token" \
+ https://$domain$curl_path/index.php?p=admin > /dev/null 2>&1
+
+#remove domain name from /etc/hosts
+sudo sed -i "/#bozon_hosts/d" /etc/hosts
+
+# If app is private, remove url to SSOWat conf from skipped_uris
+if [ "$is_public" = "No" ];
+then
+ sudo yunohost app setting $app unprotected_uris -d
+fi
+
+#adding admin to the allowed users
+sudo yunohost app addaccess $app -u $admin
+
+#allow only allowed users to access admin panel
+#sudo yunohost app setting bozon protected_uris -v "/core/admin/"
+
+# Restart services
+sudo service nginx reload
+sudo yunohost app ssowatconf
diff --git a/scripts/remove b/scripts/remove
new file mode 100644
index 0000000..496b789
--- /dev/null
+++ b/scripts/remove
@@ -0,0 +1,8 @@
+#! /bin/bash
+
+app=bozon
+domain=$(sudo yunohost app setting $app domain)
+
+sudo rm -rf /var/www/$app
+sudo rm -rf /home/yunohost.app/$app
+sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf
diff --git a/scripts/restore b/scripts/restore
new file mode 100644
index 0000000..7ed81fa
--- /dev/null
+++ b/scripts/restore
@@ -0,0 +1,11 @@
+#! /bin/bash
+
+app=bozon
+app_path=/var/www/$app
+data_path=/home/yunohost.app/$app
+save_path=$1
+
+sudo mv $save_path $app_path
+sudo mv $app_path/data $data_path
+sudo rm -rf $app_path/data
+sudo chown -R www-data: $data_path
diff --git a/scripts/upgrade b/scripts/upgrade
new file mode 100644
index 0000000..8b759ed
--- /dev/null
+++ b/scripts/upgrade
@@ -0,0 +1,41 @@
+#! /bin/bash
+
+app=bozon
+
+#retrieve arguments
+domain=$(sudo yunohost app setting $app domain)
+path=$(sudo yunohost app setting $app path)
+admin=$(sudo yunohost app setting $app admin)
+is_public=$(sudo yunohost app setting $app is_public)
+
+
+# Remove trailing "/" for next commands
+path=${path%/}
+
+# Copy source files
+final_path=/var/www/$app
+sudo mkdir -p $final_path
+sudo cp -a ../sources/* $final_path
+sudo find $final_path -type f -name ".htaccess" | xargs sudo rm
+sudo rm $final_path/install.php
+
+sudo chown -R root: $final_path
+sudo chown -R www-data: $final_path/data
+sudo find $final_path -type f | xargs sudo chmod 644
+sudo find $final_path -type d | xargs sudo chmod 755
+
+
+#configure nginx settings
+sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" ../conf/nginx.conf
+sudo sed -i "s@YNH_EXAMPLE_ALIAS@$final_path@g" ../conf/nginx.conf
+sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
+
+# If app is public, add url to SSOWat conf as skipped_uris
+if [ "$is_public" = "Yes" ];
+then
+ sudo yunohost app setting $app unprotected_uris -v "/"
+fi
+
+# Restart services
+sudo service nginx reload
+sudo yunohost app ssowatconf
diff --git a/sources/LICENCE.md b/sources/LICENCE.md
new file mode 100644
index 0000000..6b80c84
--- /dev/null
+++ b/sources/LICENCE.md
@@ -0,0 +1,201 @@
+
+ Copyright (C) 2016 bronco@warriordudimanche.net
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+
+
+
+#GNU AFFERO GENERAL PUBLIC LICENSE
+
+##Version 3, 19 November 2007
+
+###Copyright © 2007 Free Software Foundation, Inc.
+Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+##Preamble
+
+The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.
+
+The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users.
+
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
+
+Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software.
+
+A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public.
+
+The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version.
+
+An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license.
+
+The precise terms and conditions for copying, distribution and modification follow.
+
+##TERMS AND CONDITIONS
+
+0. Definitions.
+"This License" refers to version 3 of the GNU Affero General Public License.
+
+"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
+
+"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations.
+
+To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.
+
+A "covered work" means either the unmodified Program or a work based on the Program.
+
+To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
+
+To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
+
+An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
+
+1. Source Code.
+The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work.
+
+A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
+
+The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
+
+The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
+
+The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
+
+The Corresponding Source for a work in source code form is that same work.
+
+2. Basic Permissions.
+All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
+
+You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
+
+Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
+
+3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
+
+When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
+
+4. Conveying Verbatim Copies.
+You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
+
+You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
+
+5. Conveying Modified Source Versions.
+You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
+
+a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
+b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices".
+c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
+d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
+A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
+
+6. Conveying Non-Source Forms.
+You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
+
+a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
+b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
+c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
+d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
+e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
+A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
+
+A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
+
+"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
+
+If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
+
+The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
+
+Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
+
+7. Additional Terms.
+"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
+
+When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
+
+Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
+
+a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
+b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
+c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
+d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
+e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
+f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
+All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
+
+If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
+
+Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
+
+8. Termination.
+You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
+
+However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
+
+Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
+
+9. Acceptance Not Required for Having Copies.
+You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
+
+10. Automatic Licensing of Downstream Recipients.
+Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
+
+An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
+
+You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
+
+11. Patents.
+A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version".
+
+A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
+
+Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
+
+In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
+
+If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
+
+If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
+
+A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
+
+Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
+
+12. No Surrender of Others' Freedom.
+If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
+
+13. Remote Network Interaction; Use with the GNU General Public License.
+Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph.
+
+Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License.
+
+14. Revised Versions of this License.
+The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation.
+
+If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
+
+Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
+
+15. Disclaimer of Warranty.
+THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+16. Limitation of Liability.
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+17. Interpretation of Sections 15 and 16.
+If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
+
+END OF TERMS AND CONDITIONS
\ No newline at end of file
diff --git a/sources/changelog.md b/sources/changelog.md
new file mode 100644
index 0000000..0bdb464
--- /dev/null
+++ b/sources/changelog.md
@@ -0,0 +1,131 @@
+
+# Version history
+## New in 2.4
+- optimisation : reduce slow down when folder tree contains a huge amount of files (tested with more than 30,000 files ^^ thx to Cyrille)
+- optimisation : reduce regen base use to reduce useless files scans (even for zip to folder option)
+- Added : volume option for playlist
+- Enhancement : unzipping file on server creates a new folder
+- Added : zip and download selection of files and folders
+- Added : in public access to a folder can now fold/unfold the folders.
+- Added : a regen base button for the admins who use FTP access instead of the bozon's upload (adds the new IDs, removes the old one and rebuilds the tree)
+- Added : a temp cleaning procedure
+- Added : a $default_temp_folder variable in config.php
+- Added : a load more button in admin list files (for those who save thousands of files in the same directory ^^ wink to Cyrille (again))
+- Added : a config variable to choose between two click on file options.
+- Enhancement : change some js functions to use my own vanillajs lib
+- Enhancement : share button will no longer appear when there's only one user
+- Enhancement : Some little changes in the design
+- Bugfix : the locked folder now works again correctly
+- Added : language choice is now saved in the user profile
+- Added : three status for users (admin/user/guest). The first user created is now superadmin.
+- Enhancement : the drag and drop fallback now accepts multiselection
+- Added : a markdown editor to quickly create a new document and share it or edit a text file (still a beta feature but it works)
+- Enhancement : users page is now available only if there's more than one user
+- Enhancement : users page design
+- Enhancement : change png icons to webfont (thx fontello ^^) 56k -> 9k \o/
+- Enhancement : change users management page (tabs instead of dialog boxes)
+- Added : Superadmin can now change the user's password
+- Added : brand new profiles rights managing; now, you can create new profiles and allow acces to specific parts of the app to those profiles.
+- Added : . and .. in file list
+- Added : download a zip from a shared folder on visitor's access
+- Added : config variable to allow or not rss/json/download from user shared access
+- Added : warnings if required libs are not installed; however, bozon can work without those libs (some functions will be disabled) and if you want to disable those warnings, go to config.php and set $disable_non_installed_libs_warning to true
+- Bugfix : encoding accents problems
+- Bugfix : refresh needed when adding or deleting a user
+- Added : config variable to use lightbox or new tab to open images/txt etc
+- Enhancement : lightbox
+- Bugfix : shared links works again
+- Enhancement/Bugfix : when you renew a shared folder id, the id will change in the shared file or will be removed from it (see $remove_item_from_users_share_when_renew_id in config.php)
+
+
+## New in 2.3b
+- Added : folder size limit for users (if there's no limit, the free space icon will not display)
+- Added : display free space in user's folder (this information will not display if admin or if allowed free space is set to 0)
+- Added : display folder size
+- Added : lazy load for gallery http://dinbror.dk/blazy/
+- Added : a minimalist lightbox
+- Bugfixes : links lost when moving a file/folder, video name in gallery mode...
+- Enhancement : brand new html/css structure by Eauland.
+- Enhancement : new table based file list
+- Added : some information on homepage
+- Added : qrcode on share page
+- Added : playlist audio. If a folder only contains mp3/ogg, it'll be shared as a playlist
+- Added : a shortcut to share link in links mode
+- Added : an icon to go directly to a gallery or a playlist in file mode
+- Changed : the dropzone is now hidden by default: click on upload button or drag a file on it to reveal the dropzone
+- Added : an option to easily change the colors: just change the values in template/default/css/styles.php !
+- Changed : color
+- Removed : old time forgotten javascript in stats.php
+- Added : scrolltotop from Cyril MAGUIRE
+- Added : download from url allows to specify a local filename
+- Added : a required state for important fields in dialog boxes
+- Bugfix : remove exif error on thumb generation
+- Added : sorting filelist by name or size
+- Enhancement : A burn mode id stays in burn mode when accessed by the connected owner (id will be burned only if not connected or not owner)
+- Bugfix : security bug
+- Added : multiselection to delete files/folders
+
+## New in 2.2beta
+- Added : double check for the password on profile creation
+- Added : password change for user connected
+- Added : markdown display for md files
+- Added : qrcode to easily get a share on smartphone
+- Added : secured rss feed for log file
+- Added : share folders between users \o/
+- Added : changes on files/folders only allowed to the owner
+- Bugfixes: htaccess problems, catching distant file path problem, some css problems
+
+## New in 2.1
+### /!\ Read carefully to avoid data loss !
+- added a top bar menu
+- added a minimalist auto gallery function: when a folder contains only images, it will be displayed as a gallery for the user.
+- bug fix on rss feed and share links
+- Added multiuser capacity ! Now, the admin (the first user) can create new users. Each user has his own separated upload folder.
+- Added a import script: beacause of multiuser change, the ID file, the upload folder, the users data has a new format...
+If you're upgrading from 2.0 or less, keep only private and upload folders, install bozon.
+When you first start, it will ask you if you want to import previous data.
+
+## New in 2.0 beta
+- major changes in bozon's structure: all is called from index page
+- real home page
+- major design improvements: lighter, no more menu etc.
+- bugfixes
+- all pages'files are now in the template folder (easier to modify)
+- html files replace the variable template (easier for designers ;-)
+- language files are now seperated in a locale folder
+- language can now also be changed in user mode (not only admin)
+- default language: set at browser default if not specified in config
+
+## New in 1.7.5b
+- added a function to erase no longuer used ids
+- bugfix with file with accent on first char: a basename function bug ! oO
+
+## New in 1.7.5
+- change in the templates: templates are now html files, easier to modify
+- added the mode in the file list's title.
+
+
+## New in 1.7.4
+bug fixes (thx to chatainsim on Github)
+- #56: problem deleting a folder
+- #53: error deleting files you just uploaded
+- #55: password protection problem when a password is used for several files (caution, this fix is not compatible with old password protection)
+- disapearing files and folders until page is refreshed.
+- my blog's URL removed (too «hasbeen»: wink to eauland ;-)
+
+
+## New in 1.7.3
+- some bugs fixed (rename bug, home icon bug)
+- little changes on resolutions below 600 (switch from icon to list view)
+- added handheld rule for media queries
+
+
+## New in 1.7.2
+- new list layout (change layout in config or in menu)
+- change theme with get variable theme=xxx
+-
+
+## New in 1.7
+* serious security enhancement by Oros ( https://www.ecirtam.net / https://github.com/Oros42 ) (Thanks a lot for this huge job !)
+* add: a link to clear stats
+* BEWARE! Because of the new data & files structure, all previous generated IDs will no longer be valid.
diff --git a/sources/config.php b/sources/config.php
new file mode 100644
index 0000000..6d2eaba
--- /dev/null
+++ b/sources/config.php
@@ -0,0 +1,55 @@
+
\ No newline at end of file
diff --git a/sources/contributors.md b/sources/contributors.md
new file mode 100644
index 0000000..548f8e1
--- /dev/null
+++ b/sources/contributors.md
@@ -0,0 +1,9 @@
+## Contributors
+
+- [aledeg](https://github.com/aledeg)
+- [ankerfest](https://github.com/ankerfest)
+- [eauland](https://github.com/eauland)
+- [Oros42](https://github.com/Oros42)
+
+## Special thanks
+- [Cyrille Borne](https://github.com/cborne) (http://www.cyrille-borne.com): without your comments, issues reporting and enhancement ideas this app would never have been so complete ;-)
diff --git a/sources/core/.htaccess b/sources/core/.htaccess
new file mode 100644
index 0000000..ebe8b76
--- /dev/null
+++ b/sources/core/.htaccess
@@ -0,0 +1,4 @@
+Order Allow,Deny
+
+Allow from all
+
diff --git a/sources/core/Array2feed.php b/sources/core/Array2feed.php
new file mode 100644
index 0000000..44aa550
--- /dev/null
+++ b/sources/core/Array2feed.php
@@ -0,0 +1,76 @@
+ array
+ # for rss type feed, each item must have the 'title', 'description', 'pubDate' and 'link' keys
+ # for atom type feed, info must have the 'title', 'id', 'updated, 'link' & 'content' keys
+function makeRSSdate($date=NULL){// format DD-MM-YY HH:MM => rfc2822 (rss compatible)
+ if ($date){
+ date_default_timezone_set('Europe/Paris');
+ $time = strtotime($date);
+ return date("r", $time);
+ }
+}
+function no_nl($string){$tab = array( CHR(13) => " ", CHR(10) => " " ); return strtr($string,$tab); }
+function array2feed($array=null){
+
+
+ if (!$array){return false;}
+ if (empty($array['infos']['type'])){$array['infos']['type']='rss';}else{$array['infos']['type']=strtolower($array['infos']['type']);}
+ if (empty($array['infos']['description'])){$array['infos']['description']='';}
+ $r="\n";$t="\t";
+ $tpl=array('rss'=>array(),'atom'=>array());
+ $tpl['rss']['header']=''.$r.''
+ .$r.$t.''.$r;
+ $tpl['atom']['header']=''.$r;
+ $tpl['rss']['footer']=$t.' '.$r;
+ $tpl['atom']['footer']=''.$r;
+ $tpl['rss']['content-type']='Content-Type: application/rss+xml; charset=utf-8';
+ $tpl['atom']['content-type']='Content-Type: application/atom+xml; charset=utf-8';
+
+ header($tpl[$array['infos']['type']]['content-type']);
+ $feed=$tpl[$array['infos']['type']]['header'];
+ //create the feed's info content
+ foreach($array['infos'] as $key=>$value){
+ if ($array['infos']['type']=='atom'){ // ATOM
+ if ($key=='link'){$feed.=$t.$t.' '.$r;}
+ elseif ($key=='author'){$feed.=$t.$t.''.$value.' '.$r;}
+ elseif ($key=='licence'){$feed.=$t.$t.'<'.$key.' href="'.$value.'" rel="license"/>'.$r;} // in atom feed, licence is the link to the licence type
+ elseif ($key!='version'&&$key!='type'){$feed.=$t.$t.'<'.$key.'>'.$value.''.$key.'>'.$r;}
+ }else{ // RSS
+ if ($key!='version'&&$key!='type'){$feed.=$t.$t.'<'.$key.'>'.$value.''.$key.'>'.$r;}
+ }
+ }
+
+ //then the items content
+ foreach ($array['items'] as $item){
+ if ($array['infos']['type']=='atom'){ $feed.=$t.$t.$t.''.$r;}else{$feed.=$t.$t.$t.'- '.$r;}
+ foreach($item as $key=>$value){
+ if ($array['infos']['type']=='atom'){ // ATOM
+ if ($key=='link'){$feed.=$t.$t.$t.$t.'
'.$r;}
+ elseif ($key=='content'){$feed.=$t.$t.$t.$t.''.htmlspecialchars($value).' '.$r;}
+ elseif (!empty($value)){$feed.=$t.$t.$t.$t.'<'.$key.'>'.no_nl($value).''.$key.'>'.$r;}
+ }else{ // RSS
+ if ($key=='pubDate'||$key=='title'||$key=='link'){$feed.=$t.$t.$t.$t.'<'.$key.'>'.htmlspecialchars($value).''.$key.'>'.$r;}
+ elseif ($key=='date'){}
+ elseif($key=='guid'){ $feed.=$t.$t.$t.$t.' '.$r;}
+ elseif(!empty($value)){$feed.=$t.$t.$t.$t.'<'.$key.'>'.$key.'>'.$r;}
+ }
+ }
+ if ($array['infos']['type']=='atom'){ $feed.=$t.$t.$t.' '.$r;}else{$feed.=$t.$t.$t.''.$r;}
+ }
+
+
+ $feed.=$tpl[$array['infos']['type']]['footer'];
+ echo $feed;
+}
+?>
\ No newline at end of file
diff --git a/sources/core/GET_POST_admin_data.php b/sources/core/GET_POST_admin_data.php
new file mode 100644
index 0000000..c053fce
--- /dev/null
+++ b/sources/core/GET_POST_admin_data.php
@@ -0,0 +1,367 @@
+'.$file.' '.e('is not writable',false).'';}
+ }
+ }
+
+ # regen tree
+ if (isset($_GET['regen'])){
+ $ids=updateIDs($ids,$_GET['regen']);
+ header('location:index.php?p=admin&token='.TOKEN);
+ exit;
+ }
+
+ # unzip: convert zip file to folder
+ if (!empty($_GET['unzip']) && trim($_GET['unzip'])!==false && $_SESSION['zip']){
+ $id=$_GET['unzip'];
+ $zipfile=id2file($id);
+ $folder=str_ireplace('.zip','',_basename($zipfile));
+ $id=new_folder($folder);
+ $destination=id2file($id);
+ unzip($zipfile,$destination);
+ $sdi=array_flip($ids);
+ $unzipped_content=recursive_glob($destination);
+ foreach ($unzipped_content as $item){
+ if (empty($sdi[$item])){$ids[uniqid(true)]=$item;}
+ }
+ store($ids);
+ //$ids=updateIDs($ids,$id);
+ header('location:index.php?p=admin&token='.TOKEN);
+ exit;
+ }
+
+ # renew file id
+ if (!empty($_GET['renew']) && trim($_GET['renew'])!==false&&is_owner($_GET['renew'])){
+ $old_id=$_GET['renew'];
+ $path=id2file($old_id);
+ unset($ids[$old_id]);
+ $new_id=addID($path,$ids);
+ # change in share folder
+
+ if (is_dir($path)){
+ $shares=load_folder_share();
+ $save=false;
+ foreach ($shares as $user=>$data){
+ if (!empty($data[$old_id])){
+ if (!$remove_item_from_users_share_when_renew_id){
+ $shares[$user][$new_id]=$data[$old_id];
+ }
+ unset($shares[$user][$old_id]);$save=true;
+ }
+ }
+ if ($save){save_folder_share($shares);}
+ }
+ header('location:index.php?p=admin&token='.TOKEN);
+ exit;
+ }
+
+ # create burn after acces state
+ if (!empty($_GET['burn']) && trim($_GET['burn'])!==false&&is_owner($_GET['burn'])){
+ $id_to_burn=$_GET['burn'];
+ $path=id2file($id_to_burn);
+ unset($ids[$id_to_burn]);
+ if ($id_to_burn[0]!='*'){
+ $ids['*'.$id_to_burn]=$path;
+ }else{
+ $ids[str_replace('*','',$id_to_burn)]=$path;
+ }
+ store($ids);
+ header('location:index.php?p=admin&token='.TOKEN);
+ exit;
+ }
+
+ # subfolder path
+ if (!empty($_GET['path']) && trim($_GET['path'])!==false){
+ $path=$_GET['path'];
+ if($path=='/'){
+ $path='';
+ }
+ if(check_path($path)){
+ $_SESSION['current_path']=$path;
+ }
+ header('location:index.php?p=admin&token='.TOKEN);
+ exit;
+ }
+
+ # search/filter
+ if (!empty($_GET['filter'])){
+ $_SESSION['filter']=$_GET['filter'];
+ }else{
+ $_SESSION['filter']='';
+ }
+
+ # file mode
+ if (!empty($_GET['mode'])){
+ $_SESSION['mode']=$_GET['mode'];
+ }elseif (empty($_SESSION['mode'])){
+ $_SESSION['mode']='view';
+ }
+
+ # create a new subfolder
+ if (!empty($_GET['newfolder'])){
+ $folder=$_GET['newfolder'];
+ if(check_path($folder)){
+ $tree=add_branch($folder,new_folder($folder)); # $path,$id
+ header('location:index.php?p=admin&msg='.$folder.' '.e('created',false).'&token='.TOKEN);
+ exit;
+ }
+
+ }
+
+ # get file from url
+ if (!empty($_GET['url'])&&$_GET['url']!='' && $_SESSION['curl']){
+ if ($content=file_curl_contents($_GET['url'])){
+ if (empty($_GET['filename'])){
+ $basename=_basename($_GET['url']);
+ }else{
+ $basename=no_special_char($_GET['filename']);
+ }
+
+ $folder_path=$_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$_SESSION['current_path'].'/';
+ $filename=$folder_path.$basename;
+ if(is_file($filename)){
+ $filename=$folder_path.rename_item($filename,$folder_path);
+ }
+ file_put_contents($filename,$content);
+
+ $tree=add_branch($filename,addID($filename));
+ header('location:index.php?p=admin&token='.TOKEN);
+ exit;
+ }else{$message.=''.e('Problem accessing remote file.',false).'
';}
+ }
+
+ # delete SINGLE file/folder
+ if (!empty($_GET['del'])&&$_GET['del']!=''&&is_owner($_GET['del'])){
+ $tree=delete_file_or_folder($_GET['del'],$ids,$tree);
+ header('location:index.php?p=admin&token='.TOKEN);
+ exit;
+ }
+
+ # rename file/folder
+ if (!empty($_GET['id'])&&!empty($_GET['newname'])&&is_owner($_GET['id'])){
+ $oldfile=id2file($_GET['id']);
+ $path=dirname($oldfile).'/';
+ $newfile=$path.no_special_char($_GET['newname']);
+ if ($newfile!=$oldfile && check_path($newfile)){
+ # if newname exists, change newname
+ if(is_file($newfile) || is_dir($newfile)){aff($newfile.' '.$oldfile);
+ $newfile=$path.rename_item(_basename($newfile),$path);
+ }
+ if (is_dir($oldfile)){
+ # for folders, must change the path in all sub items
+ $old=$oldfile;
+ $old.='/';
+ foreach($ids as $id=>$path){
+ if (strpos($path,$old)!==false){$ids[$id]=str_replace($old, $newfile.'/', $path);}
+ }
+
+ };
+ $ids[$_GET['id']]=$newfile;
+ store($ids);
+ rename($oldfile,$newfile);
+ if (is_file(get_thumbs_name($oldfile))){rename(get_thumbs_name($oldfile),get_thumbs_name($newfile));}
+ $tree=rename_branch($newfile,$oldfile,$_GET['id'],$_SESSION['login'],$tree);
+ }
+
+ header('location:index.php?p=admin&token='.TOKEN);
+ exit;
+ }
+
+ # zip and download a folder
+ if (!empty($_GET['zipfolder']) && $_SESSION['zip']){
+ $folder=id2file($_GET['zipfolder']);
+ if (!is_dir($_SESSION['temp_folder'])){mkdir($_SESSION['temp_folder']);}
+ $zipfile=$_SESSION['temp_folder'].return_owner($_GET['zipfolder']).'-'._basename($folder).'.zip';
+ zip($folder,$zipfile);
+ header('location: '.$zipfile);
+ exit;
+ }
+
+ ######################################################################
+ # $_POST DATA
+ ######################################################################
+ # Move file folder
+ if (!empty($_POST['file'])&&!empty($_POST['destination'])){
+ # init
+ $destination=$to=$_POST['destination'];
+ $file=$_POST['file'];$me=_basename($file);
+ if($destination=='/'){ $destination=''; }
+ if($file=='/'){ $file=''; }
+ $file_with_path=$_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$file;
+ $destination=$_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$destination;
+
+ if (check_path($file) && check_path($destination)){
+ if (is_file($file_with_path)){$file=$file_with_path;}
+ $file=$file_with_path;
+ $file=stripslashes($file);
+ $destination_temp = addslash_if_needed($destination)._basename($file);
+ # if file/folder exists in destination folder, change name
+ if(is_file($destination_temp) || is_dir($destination_temp)){
+ $destination_temp=addslash_if_needed($destination).rename_item(_basename($file),$destination);
+ }
+ $destination=$destination_temp;
+
+ if (!is_dir(dirname('thumbs/'.$destination))){
+ mkdir(dirname('thumbs/'.$destination),0744, true);
+ }
+ @rename(get_thumbs_name($file_with_path),get_thumbs_name($destination));
+
+ if (is_file($file_with_path)){
+ # change path in id
+ $id=file2id($file_with_path);
+ $ids=unstore();
+ $ids[$id]=$destination;
+ store($ids);
+ rename($file_with_path,$destination);
+ $tree=rename_branch($destination,$file_with_path,$id,$_SESSION['login'],$tree);
+ }elseif(is_dir($file_with_path)){
+ # change path in id and all files/folders in the moved folder
+ $id=file2id($file_with_path);
+ $ids=unstore();
+ $ids[$id]=$destination;
+ $destination=$destination.'/';
+ $file=$file.'/';
+ foreach($ids as $id=>$path){
+ if (strpos($path, $file)!==false){$ids[$id]=str_replace($file,$destination, $path);}
+ }
+ store($ids);
+ rename($file_with_path,$destination);
+ $tree=rename_branch($destination,$file_with_path,$id,$_SESSION['login'],$tree);
+ }
+
+ }
+
+ header('location:index.php?p=admin&msg='.$me.' '.e('moved to',false).' '.$to.'&token='.TOKEN);
+ exit;
+ }
+
+ # Delete multiselection
+ if (!empty($_POST['item']) && !empty($_POST['multiselect_command']) && $_POST['multiselect_command']=='delete'){
+ foreach ($_POST['item'] as $key => $item) {
+ if (is_owner($item)){
+ $tree=delete_file_or_folder($item,$ids);
+ }
+ }
+ header('location:index.php?p=admin&token='.TOKEN);
+ exit;
+ }
+
+ # zip multiselection
+ if (!empty($_POST['item']) && !empty($_POST['multiselect_command']) && $_POST['multiselect_command']=='zip' && $_SESSION['zip']){
+ $zipfile=$_SESSION['temp_folder'].'Bozon_pack'.date('d-m-Y h-i-s').'.zip';
+ $file_list=array();
+ foreach ($_POST['item'] as $key => $item) {
+ $file_list[]=id2file($item);
+ }
+ if (!is_dir($_SESSION['temp_folder'])){mkdir($_SESSION['temp_folder']);}
+ zip($file_list,$zipfile);
+ header('location: '.$zipfile);
+ exit;
+ }
+
+ # Lock folder with password
+ if (!empty($_POST['password'])&&!empty($_POST['id'])&&is_owner($_POST['id'])){
+ $id=$_POST['id'];
+ $file=id2file($id);
+ $password=blur_password($_POST['password']);
+ # turn normal share id into password hashed id
+ $ids=unstore();
+ unset($ids[$id]);
+ $ids[$password.$id]=$file;
+ store($ids);
+
+ header('location:index.php?p=admin&token='.TOKEN);
+ exit;
+ }
+
+ # Handle folder share with users
+ if (!empty($_GET['users'])&&!empty($_GET['share'])&&is_owner($_GET['share'])){
+ $folder_id=$_GET['share'];
+ $users=$auto_restrict['users'];
+ unset($users[$_SESSION['login']]);
+ $shared_with=load_folder_share();
+ $sent=array_flip($_GET['users']);
+ foreach ($users as $login=>$data){
+ if (isset($sent[$login])){
+ # User checked: add share
+ $shared_with[$login][$folder_id]=array('folder'=>id2file($folder_id),'from'=>$_SESSION['login']);
+ }else{
+ # User not checked: remove share if exists
+ if (isset($shared_with[$login][$folder_id])){unset($shared_with[$login][$folder_id]);}
+ }
+ }
+ save_folder_share($shared_with);
+ header('location:index.php?p=admin&token='.TOKEN);
+ exit;
+ }
+
+ # Handle users rights
+ if (isset($_POST['user_right'])&&is_allowed('change status rights')){
+ foreach($_POST['user_right'] as $key=>$user_nb){
+ $users_rights[$_POST['user_name'][$key]]=$user_nb;
+ }
+ save_users_rights($users_rights);
+ header('location:index.php?p=users&token='.TOKEN.'&msg='.e('Changes saved',false));
+ exit;
+ }
+
+ # Handle superadmin request for users pass change
+ if (isset($_POST['user_pass'])&&is_allowed('change passes')){
+ foreach($_POST['user_pass'] as $key=>$pass){
+ if (!empty($_POST['user_pass'][$key])&&!empty($_POST['user_name'][$key])){
+ $auto_restrict['users'][$_POST['user_name'][$key]]['pass'] = hash('sha512', $auto_restrict['users'][$_POST['user_name'][$key]]['salt'].$pass);
+ }
+ }
+ save_users();
+ header('location:index.php?p=edit_profiles&token='.TOKEN.'&msg='.e('Changes saved',false));
+ exit;
+ }
+
+ # Handle profile's rights change
+ if (isset($_POST['profile_name'])&&is_allowed('change user status')){
+ $rights=array();
+ foreach($_POST['profile_name'] as $num=>$profile){
+ if (!empty($_POST[$num])){
+ foreach($_POST[$num] as $allowed){$rights[$profile][$allowed]=1;}
+ }else{$rights[$profile]=array();}
+ }
+ save($_SESSION['profiles_rights_file'],$rights);
+ header('location:index.php?p=edit_profiles&token='.TOKEN.'&msg='.e('Changes saved',false));
+ exit;
+ }
+
+ # Editor
+ if (isset($_POST['editor_content'])&&!empty($_POST['editor_filename'])&&is_allowed('markdown editor')){
+ $extension=pathinfo($_POST['editor_filename'],PATHINFO_EXTENSION);
+ if (empty($extension)){$_POST['editor_filename'].='.md';}
+ $file=no_special_char($_POST['editor_filename']);
+ $path=addslash_if_needed($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$_SESSION['current_path']);
+ if (is_file($path.$file)&&!isset($_POST['overwrite'])){$file=rename_item($file,$path);}
+ file_put_contents($path.$file, $_POST['editor_content']);
+ if (!isset($_POST['overwrite'])){
+ $id=addID($path.$file);
+ $tree=add_branch($path.$file,$id,$_SESSION['login'],$tree);
+ }
+ header('location:index.php?p=admin&token='.TOKEN.'&msg='.$_POST['editor_filename'].' '.e('Changes saved',false));
+ exit;
+ }
+
+ if ($_FILES&&is_allowed('upload')){include('core/auto_dropzone.php');exit();}
+?>
\ No newline at end of file
diff --git a/sources/core/auto_dropzone.php b/sources/core/auto_dropzone.php
new file mode 100644
index 0000000..cdfa26f
--- /dev/null
+++ b/sources/core/auto_dropzone.php
@@ -0,0 +1,469 @@
+'path/to/',
+ 'dropzone_text'=>'D&D here !',
+ 'dropzone_id'=>'drop_images',
+ 'dropzone_class'=>'drop_images',
+ 'forbidden_filetypes'=>'exe,php',
+ 'use_style'=>true, // false if you're using an css file
+ );
+
+ 'destination_filepath' key:'destination_filepath'=>"$_SESSION['upload_root_path']/" (with ending slash)
+ if not specified, the destination folder will be destination/ (created on the first start)
+ you also can set specific paths for each mime type like that
+ 'destination_filepath'=>array('gif'=>'path/to/gif/','png'=>'path/to/png/' ... )
+
+ 'forbidden_filetypes' key: restrict allowed filetypes (separated with ,)
+ ----------------------------------------------
+
+* this is the default config
+*/
+
+// Configuration
+$phpini=ini_get_all();
+$default_config=array(
+ 'forbidden_filetypes'=>'php',
+ 'allow_unknown_filetypes'=>$allow_unknown_filetypes,
+ 'use_style'=>false, // false if you're using a external css file
+ 'auto_refresh_after_upload'=>true, // auto refresh page after uploading files (except on errors)
+ 'max_length'=>2048, // Mo (see php.ini if changes doesn't work [post_max_size / upload_max_filesize])
+ 'dropzone_text'=>e('Drop your files here or click to select a local file',false),
+ 'dropzone_id'=>'dropArea',
+ 'dropzone_class'=>'dropArea',
+ 'destination_filepath'=>$_SESSION['current_path'].'/', // this can be an array like 'jpg'=>'upload/jpeg/' or a string 'destination/'
+ 'my_filepath'=>'index.php'//$_SERVER['SCRIPT_NAME'],
+);
+
+foreach($default_config as $key=>$val){
+ // create or complete config var
+ if(!isset($auto_dropzone[$key])){ $auto_dropzone[$key]=$auto_dropzone[$key]=$val;}
+
+ // has config changed ?
+ if (!isset($_SESSION[$key]) || $auto_dropzone[$key]!=$_SESSION[$key]){ $_SESSION[$key]=$auto_dropzone[$key];}
+}
+
+if (!is_array($auto_dropzone['destination_filepath'])&&!is_dir($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath'])){
+ mkdir($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath'],0744);file_put_contents($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath'].'index.html','');
+}
+
+// Handle the unit (M/G) in max post/upload size
+$ini_max_upload=$phpini['upload_max_filesize']['global_value'];
+if (strpos($ini_max_upload,'G')!=false){$ini_max_upload=intval($ini_max_upload*1024);}
+else{$ini_max_upload=intval($ini_max_upload);}
+$ini_max_post=$phpini['post_max_size']['global_value'];
+if (strpos($ini_max_post,'G')!=false){$ini_max_post=intval($ini_max_post*1024);}
+else{$ini_max_post=intval($ini_max_post);}
+
+$max=min($auto_dropzone['max_length'],$ini_max_upload,$ini_max_post);
+$_SESSION['max_size']=$max;
+$file_length_error=e('Error, max filelength:',false).' '.$max.' Mo';
+$file_format_error=e(': Error, forbidden file format !',false);
+
+$auto_dropzone_error=false;
+
+// uploading files
+if (!empty($_FILES)){
+
+ // HANDLE UPLOAD
+ function bytesToSize1024($bytes, $precision = 2) {
+ if (!empty($bytes)){
+ $unit = array('B','KB','MB');
+ return @round($bytes / pow(1024, ($i = floor(log($bytes, 1024)))), $precision).' '.$unit[$i];
+ }else{return false;}
+ }
+ function error2msg($e){
+ if ($e>0&&$e<7){
+ $errors=array(
+ 1=>e('The file to big for the server\'s config',false),
+ 2=>e('The file to big for this page',false),
+ 3=>e('There was a problem during upload (file was truncated)',false),
+ 4=>e('No file upload',false),
+ 5=>e('No temp folder',false),
+ 6=>e('Write error on server',false),
+ );
+ return $errors[$e];
+ }else if ($e>7){return true;}
+ else{return false;}
+ }
+ function secure($file){
+ return preg_replace('#(.+)\.php#i','$1.SPHP',$file);
+ }
+
+ if (isset($_FILES['myfile']) && strtolower($_FILES['myfile']['name'])!="index.html") {
+ $sFileName = secure($_FILES['myfile']['name']);
+ $sFileType = $_FILES['myfile']['type'];
+ $sFileSize = intval(bytesToSize1024($_FILES['myfile']['size'], 1));
+ $sFileError = error2msg($_FILES['myfile']['error']);
+ $sFileExt = pathinfo($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName,PATHINFO_EXTENSION);
+
+ #########################################################################
+ # ADDED FOR BOZON
+ #########################################################################
+ if (!function_exists('folder_fit')){include($path_core.'core.php');}
+ if (!folder_fit(null,$_FILES['myfile']['size'],$_SESSION['login'])){
+ # uploaded file doesn't fit in user's folder
+ if (!isset($_SESSION['ERRORS'])){$_SESSION['ERRORS']='';}
+ $error='
+ '.$sFileName.'
+ ['.$sFileType.' ,
+ '.$sFileSize.' ] '.e('The file doesn\'t fit',false).'
+ ';
+ $_SESSION['ERRORS'].=$error;
+ exit($error);
+ }
+ #########################################################################
+
+ $ok='
+ '.$sFileName.'
+ ['.$sFileType.' ,
+ '.$sFileSize.' ] [OK]
+ ';
+ $notok='
+ '.$sFileName.'
+ ['.$sFileType.' ,
+ '.$sFileSize.' ] '.e('Upload error',false).'
+ ';
+ if (
+ is_array($auto_dropzone['destination_filepath'])
+ &&!empty($auto_dropzone['destination_filepath'][$sFileExt])
+ &&is_dir($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath'][$sFileExt])
+ ){
+ $sFileName = $auto_dropzone['destination_filepath'][$sFileExt].$sFileName;
+ echo $ok;
+ rename($_FILES['myfile']['tmp_name'], $_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName );
+ chmod($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName,0644);
+ }elseif(
+ is_array($auto_dropzone['destination_filepath'])
+ &&!empty($auto_dropzone['destination_filepath'][$sFileExt])
+ &&!is_dir($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath'][$sFileExt])
+ ||
+ is_string($auto_dropzone['destination_filepath'])
+ &&!is_dir($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath'])
+ ){
+ //local upload dir error
+ echo 'Upload path problem with '.$sFileName.' ';
+
+ }elseif($sFileError){
+ // file upload error
+ echo ''.$sFileName.': '.$sFileError.' ';
+
+ } elseif(is_dir($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath'])){
+ $file=$sFileName;
+ $sFileName = $auto_dropzone['destination_filepath'].$sFileName;
+ if (is_file($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName)){
+ $newfilename=rename_item($file,$_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$auto_dropzone['destination_filepath']);
+ echo ''.$file.' => '.$newfilename.' ';
+ $sFileName=$auto_dropzone['destination_filepath'].$newfilename;
+ }
+ echo $ok;
+ rename($_FILES['myfile']['tmp_name'], $_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName );
+ chmod($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName,0644);
+ $id=addID($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName);
+ $tree=add_branch($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$sFileName,$id,$_SESSION['login'],$tree);
+ }
+ } else {
+ echo $notok;
+ }
+ exit();
+}else{
+ // GENERATE DROPZONE
+ if ($auto_dropzone['use_style']){
+ echo '
+
+ ';
+ }
+?>
+
+
+
+
+
diff --git a/sources/core/auto_restrict.php b/sources/core/auto_restrict.php
new file mode 100644
index 0000000..b17c681
--- /dev/null
+++ b/sources/core/auto_restrict.php
@@ -0,0 +1,723 @@
+ to the form or to repeat a previously generated token, in case of various forms in a same page)
+ * - easyly secure sensitive actions adding admin password in your form (just add , auto_restrict will exit if password is not correct)
+ * - secure post and get data
+ * - add function to ask password for sensitive/superadmin actions...
+ *
+ *
+ *
+ * Verrouille l'accès à une page
+ * Il suffit d'inclure ce fichier pour bloquer l'accès...
+ * gestion de l'expiration de session,
+ * gestion de la connexion et de la déconnexion.
+ * gestion des différences entre le domaine referer et le domaine sur lequel le script est hébergé (si différent -> pas ok)
+ * gestion du bannissement des adresses ip en cas de bruteforcing ou de referer anormal
+ * gestion des tokens de sécurisation à ajouter aux forms en une commande ; le script se charge seul de vérifier le token
+ * génération aléatoire de la clé de cryptage
+ * sécurisation par mot de passe sur les actions sensibles (il suffit d'ajouter à un formulaire pour qu'auto_restrict bloque en cas de mauvais mot de passe)
+ *
+ * Améliorations eventuelles:
+ * ajouter un fichier log de connexion
+ *
+ *
+ * ajout 4.2 :
+ * ajout du statut (superadmin/admin/user) et de la langue (pour bozon)
+ * ajout 4.1 :
+ * ajout du double check de passe et du changement de mdp
+ * ajout 4.0 :
+ * ajout du support multi utilisateur
+ */
+ @session_start();
+ # ------------------------------------------------------------------
+ # default config: initialisation
+ # ------------------------------------------------------------------
+ # you can modify this config before the include('auto_restrict.php');
+ if (!isset($auto_restrict['error_msg'])){ $auto_restrict['error_msg']='Erreur - impossible de se connecter.';}# utilisé si on ne veut pas rediriger
+ if (!isset($auto_restrict['cookie_name'])){ $auto_restrict['cookie_name']='BoZoN';}# nom du cookie
+ if (!isset($auto_restrict['session_expiration_delay'])){ $auto_restrict['session_expiration_delay']=90;}#minutes
+ if (!isset($auto_restrict['cookie_expiration_delay'])){ $auto_restrict['cookie_expiration_delay']=365;}#days
+ if (!isset($auto_restrict['IP_banned_expiration_delay'])){ $auto_restrict['IP_banned_expiration_delay']=90;}#seconds
+ if (!isset($auto_restrict['max_security_issues_before_ban'])){ $auto_restrict['max_security_issues_before_ban']=5;}
+ if (!isset($auto_restrict['just_die_on_errors'])){ $auto_restrict['just_die_on_errors']=true;}# end script immediately instead of include loginform in case of user not logged;
+ if (!isset($auto_restrict['just_die_if_not_logged'])){ $auto_restrict['just_die_if_not_logged']=false;}# end script immediately instead of include loginform in case of banished ip or referer problem;
+ if (!isset($auto_restrict['tokens_expiration_delay'])){ $auto_restrict['tokens_expiration_delay']=7200;}#seconds
+ if (!isset($auto_restrict['kill_tokens_after_use'])){ $auto_restrict['kill_tokens_after_use']=false;}#false to allow the token to survive after it was used (for a form with multiple submits, like a preview button)
+ if (!isset($auto_restrict['use_GET_tokens_too'])){ $auto_restrict['use_GET_tokens_too']=true;}
+ if (!isset($auto_restrict['use_ban_IP_on_token_errors'])){ $auto_restrict['use_ban_IP_on_token_errors']=false;}
+ if (!isset($auto_restrict['redirect_error'])){ $auto_restrict['redirect_error']='index.php';}# si précisé, pas de message d'erreur
+ if (!isset($auto_restrict['redirect_success'])){ $auto_restrict['redirect_success']='index.php?p=admin&token='.returnToken();}
+ if (!isset($auto_restrict['domain'])){ $auto_restrict['domain']=$_SERVER['SERVER_NAME'];}
+ if (!isset($auto_restrict['POST_striptags'])){ $auto_restrict['POST_striptags']=false;}# if true, all $_POST data will be strip_taged
+ if (!isset($auto_restrict['GET_striptags'])){ $auto_restrict['GET_striptags']=false;}# if true, all $_GET data will be strip_taged
+ if (!isset($auto_restrict['root'])){ $auto_restrict['root']='.';}
+ if (!isset($auto_restrict['path_from_root'])){ $auto_restrict['path_from_root']='';}
+ if (!isset($auto_restrict['add_remove_user_admin_only'])){ $auto_restrict['add_remove_user_admin_only']=true;}# only admin can add or remove a user (admin is the first user)
+ if (!empty($_SERVER['HTTP_REFERER'])){ $auto_restrict['referer']=returndomain($_SERVER['HTTP_REFERER']);}else{$auto_restrict['referer']='';}
+ $auto_restrict['path_to_my_folder']=$auto_restrict['root'].$auto_restrict['path_from_root'].'/';
+ $auto_restrict['path_to_files']=$auto_restrict['path_to_my_folder'].$default_private;
+ # ------------------------------------------------------------------
+ # secure $_POST & $_GET data
+ # ------------------------------------------------------------------
+ if ($auto_restrict['POST_striptags']){$_POST=array_map('strip_tags',$_POST);}
+ if ($auto_restrict['GET_striptags']){$_GET=array_map('strip_tags',$_GET);}
+
+ # ------------------------------------------------------------------
+ # create cookie token folder
+ # ------------------------------------------------------------------
+
+ if (!is_dir($auto_restrict['path_to_files'])){mkdir($auto_restrict['path_to_files'],0700);chmod($auto_restrict['path_to_files'],0700);}
+ if (!is_dir($auto_restrict['path_to_files'])){echo 'auto_restrict error: cannot create the '.$auto_restrict['path_to_files'].' folder
';}
+ elseif (!is_writable($auto_restrict['path_to_files'])){echo 'auto_restrict error: token folder is not writeable
';}
+ elseif (!is_file($auto_restrict['path_to_files'].'/.htaccess')){file_put_contents($auto_restrict['path_to_files'].'/.htaccess', 'deny from all');}
+
+ # ------------------------------------------------------------------
+ # checks auto_restrict's data file : include or create
+ # ------------------------------------------------------------------
+ if(file_exists($auto_restrict['path_to_files'].'/auto_restrict_data.php')){
+ include($auto_restrict['path_to_files'].'/auto_restrict_data.php');
+ }else{
+ $auto_restrict['system_salt']=generate_salt(512);
+ $ret="\n";
+ file_put_contents($auto_restrict['path_to_files'].'/auto_restrict_data.php', '');
+ }
+
+ # ------------------------------------------------------------------
+ # checks auto_restrict's users file : include or redirect to login page if no $_POST
+ # ------------------------------------------------------------------
+ if(file_exists($auto_restrict['path_to_files'].'/auto_restrict_users.php')){
+ # if file exists, include it
+ include($auto_restrict['path_to_files'].'/auto_restrict_users.php');
+ complete_if_needed();
+
+
+ }else if(!isset($_POST['pass'])){
+ # problem with files during a session
+ if (isset($_SESSION['login'])){
+ session_destroy();
+ }
+ # or redirect to login form
+ safe_redirect('index.php?p=login');
+ exit;
+ }
+
+
+ # ------------------------------------------------------------------
+ # Sets a global token to use it later
+ # ------------------------------------------------------------------
+ define('TOKEN',returnToken());
+
+ # ------------------------------------------------------------------
+ # New user request: add it, save and return to login page
+ # ------------------------------------------------------------------
+ if(!empty($_POST['pass'])&&!empty($_POST['confirm'])&&isset($_POST['creation'])&&!empty($_POST['login'])&&empty($_POST['admin_password'])){
+ if (!isset($auto_restrict['users'])){$auto_restrict['users']=array();}
+ $index=count($auto_restrict['users']);
+ $login=strip_tags($_POST['login']);
+ if (login_exists($login)){safe_redirect('index.php?p=login&newuser&error=1&token='.returnToken());}
+ if ($_POST['pass']!=$_POST['confirm']){safe_redirect('index.php?p=login&newuser&error=3&token='.returnToken());}
+ $auto_restrict['users'][$index]['login'] = $login;
+ $auto_restrict['users'][$index]['encryption_key'] = md5(uniqid('', true));
+ $auto_restrict['users'][$index]['salt'] = generate_salt(512);
+ $auto_restrict['users'][$index]['lang'] = $_SESSION['language'];
+ $auto_restrict['users'][$index]['status'] = '';
+ $auto_restrict['users'][$index]['pass'] = hash('sha512', $auto_restrict['users'][$index]['salt'].$_POST['pass']);
+
+ if (!save_users()){exit('auto_restrict: problem saving users
');}
+ safe_redirect('index.php?p=admin&msg='.e('Account created:',false).$login.'&token='.returnToken());
+ exit;
+ }
+
+
+ # ------------------------------------------------------------------
+ # Change password request
+ # ------------------------------------------------------------------
+ if(!empty($_POST['pass'])&&!empty($_POST['confirm'])&&!empty($_POST['admin_password'])){
+
+ if ($auto_restrict['users'][$_SESSION['login']]['pass']!==hash('sha512', $auto_restrict['users'][$_SESSION['login']]['salt'].$_POST['admin_password'])){
+ safe_redirect('index.php?p=login&change_password&error=4&token='.returnToken());
+ exit;
+ }
+ if ($_POST['pass']!=$_POST['confirm']){
+ safe_redirect('index.php?p=login&newuser&error=3&token='.returnToken());
+ exit;
+ }
+ $auto_restrict['users'][$_SESSION['login']]['pass']=hash('sha512', $auto_restrict['users'][$_SESSION['login']]['salt'].$_POST['pass']);
+ if (save_users()){safe_redirect('index.php?p=admin&msg='.e('New password saved for ',false).$_SESSION['login'].'&token='.returnToken());}
+ else{safe_redirect('index.php?p=admin&msg='.e('Error saving new password for ',false).$_SESSION['login'].'&token='.returnToken());}
+ }
+ # ------------------------------------------------------------------
+ # load banned ip
+ # ------------------------------------------------------------------
+ if (is_file($auto_restrict['path_to_files'].'/'.$auto_restrict["banned_ip_filename"])){include($auto_restrict['path_to_files'].'/'.$auto_restrict["banned_ip_filename"]);}
+ # ------------------------------------------------------------------
+
+ # ------------------------------------------------------------------
+ # user tries to login
+ # ------------------------------------------------------------------
+ if (isset($_POST['login'])&&isset($_POST['pass'])&&empty($_POST['confirm'])&&empty($_POST['creation'])){
+ $ok=log_user($_POST['login'],$_POST['pass']);
+ if (!$ok){safe_redirect('index.php?p=login&error=2');}
+ elseif (isset($_POST['cookie'])){
+ set_cookie();
+ }
+ # ------------------------------------------------------------------
+ # redirect if needed
+ # ------------------------------------------------------------------
+ if (!empty($auto_restrict['redirect_success'])){
+ if (strpos($auto_restrict['redirect_success'], '&token=')!==false){
+ safe_redirect($auto_restrict['redirect_success'].'&token='.returnToken());
+ }else{
+ safe_redirect($auto_restrict['redirect_success']);
+ }
+ }
+ }
+
+ # ------------------------------------------------------------------
+ # user wants to logout (?logout $_GET var)
+ # ------------------------------------------------------------------
+ if (isset($_GET['deconnexion'])||isset($_GET['logout'])){@session_destroy();delete_cookie();exit_redirect();}
+ # ------------------------------------------------------------------
+
+
+ # ------------------------------------------------------------------
+ # No admin connected -> login
+ # ------------------------------------------------------------------
+ if (empty($_SESSION['id_user'])||empty($_SESSION['login'])||empty($_SESSION['expire'])){
+ if (!empty($_GET['p'])&&$_GET['p']!='login'){safe_redirect('index.php?p=login');}
+ }
+
+ # ------------------------------------------------------------------
+ # if here, there's no login/logout process.
+ # Check referrer, ip
+ # session duration...
+ # on problem, out !
+ # ------------------------------------------------------------------
+ if (!is_ok()){
+ @session_destroy();
+ if (!$auto_restrict['just_die_if_not_logged']){
+ safe_redirect('index.php?p=login');
+ } else {
+ echo $auto_restrict['error_msg'];
+ }
+ exit();
+ }
+ # ------------------------------------------------------------------
+
+
+
+ # ------------------------------------------------------------------
+ # if here, there was no security problem.
+ # Now, if there is an admin password post data,
+ # it means that the submitted form is a secured one:
+ # check if password is correct (if not => ban ip and stop here)
+ # ------------------------------------------------------------------
+
+ if (isset($_POST['admin_password'])){
+ $pass=hash('sha512', $auto_restrict["salt"].$_POST['admin_password']);
+ if ($auto_restrict['pass']!=$pass){
+ add_banned_ip();
+ death('The admin password is wrong... too bad !');
+ }
+
+ }
+
+ # ------------------------------------------------------------------
+ # users list form requests
+ # ------------------------------------------------------------------
+ # Erase a user account
+ if (isset($_POST['user_key'])&&is_user_admin()){
+ foreach($_POST['user_key'] as $user_nb){
+ if (isset($auto_restrict['users'][$user_nb])){
+ unset($auto_restrict['users'][$user_nb]);
+ # ADDED FOR BOZON
+ rrmdir($_SESSION['upload_root_path'].$user_nb);
+ }
+ }
+ if (!empty($auto_restrict['users'])){
+ save_users();
+ # ADDED FOR BOZON
+ safe_redirect('index.php?p=users&token='.TOKEN.'&msg='.e('Changes saved',false));
+ exit;
+ }
+ else{
+ unlink($auto_restrict['path_to_files'].'/auto_restrict_users.php');
+ exit_redirect();
+ }
+ }
+
+
+ # ------------------------------------------------------------------
+ # change user status
+ # ------------------------------------------------------------------
+ if (isset($_POST['users_status'])&&is_user_admin()){
+ unset($_POST['users_status']);
+ unset($_POST['token']);
+ foreach($_POST as $user=>$status){
+ if (!empty($user)){$auto_restrict['users'][$user]['status']=$status;}
+ }
+ save_users();
+ # ADDED FOR BOZON
+ safe_redirect('index.php?p=users&token='.TOKEN.'&msg='.e('Changes saved',false));
+ }
+
+ # ------------------------------------------------------------------
+ # save user language if change BOZON CHANGE
+ # ------------------------------------------------------------------
+ if (empty($auto_restrict['users'][$_SESSION['login']]['lang'])||$_SESSION['language']!=$auto_restrict['users'][$_SESSION['login']]['lang']){
+ $auto_restrict['users'][$_SESSION['login']]['lang']=$_SESSION['language'];
+ save_users();
+ }
+
+
+ # ------------------------------------------------------------------
+ # crypt functions
+ # form http:#www.info-3000.com/phpmysql/cryptagedecryptage.php
+ # ------------------------------------------------------------------
+ function GenerationCle($Texte,$CleDEncryptage)
+ {
+ $CleDEncryptage = md5($CleDEncryptage);
+ $Compteur=0;
+ $VariableTemp = "";
+ for ($Ctr=0;$Ctr$user){
+ $data.= $ret.'# user : '.$user['login'].$ret
+ .'$auto_restrict["users"]["'.$user['login'].'"]["login"]='.var_export($user['login'],true).';'.$ret
+ .'$auto_restrict["users"]["'.$user['login'].'"]["encryption_key"]='.var_export($user['encryption_key'],true).';'.$ret
+ .'$auto_restrict["users"]["'.$user['login'].'"]["salt"] = '.var_export($user['salt'],true).';'.$ret
+ .'$auto_restrict["users"]["'.$user['login'].'"]["pass"] = '.var_export($user['pass'],true).';'.$ret
+ .'$auto_restrict["users"]["'.$user['login'].'"]["status"]='.var_export($user['status'],true).';'.$ret
+ .'$auto_restrict["users"]["'.$user['login'].'"]["lang"]='.var_export($user['lang'],true).';'.$ret;
+ }
+
+ $data.=$ret.'?>';
+ $r=file_put_contents($auto_restrict['path_to_files'].'/auto_restrict_users.php', $data);
+ sleep(0.5);
+ return $r;
+ }
+
+ function complete_if_needed(){
+ global $auto_restrict,$default_language;$save=false;
+ if (!$auto_restrict){return false;}
+ $indexes_to_check=array( # 'var' => 'default value',
+ 'lang'=>$default_language,
+ );
+ $first=first($auto_restrict['users']);
+ foreach ($auto_restrict['users'] as $user=>$data){
+ foreach ($indexes_to_check as $index=>$default_value){
+ if (empty($data[$index])){
+ $auto_restrict['users'][$user][$index]=$default_value;$save=true;
+ }
+ if (empty($data['status'])){
+ $auto_restrict['users'][$user]['status']=create_status($user,$first);$save=true;
+ }elseif($data['status']!='superadmin'&&$data['login']==$first['login']){
+ $auto_restrict['users'][$user]['status']='superadmin';$save=true;# force first status to superadmin
+ }
+ }
+ }
+
+ if ($save){save_users();return true;}
+ return false;
+ }
+ function create_status($user=null,$first=''){
+ global $auto_restrict;
+ if (!$user){return false;}
+ if (count($auto_restrict['users'])==1){ return 'superadmin';}
+ elseif ($user==$first['login']){ return 'superadmin';}
+ else{return 'user';}
+ }
+
+ function login_exists($login=null){
+ global $auto_restrict;
+ if (empty($login)){return false;}
+ foreach ($auto_restrict['users'] as $key=>$user){
+ if ($user['login']==$login){return true;}
+ }
+ return false;
+ }
+
+ function id_user(){
+ $id=$_SERVER['REMOTE_ADDR'];
+ $id.='-'.$_SERVER['HTTP_USER_AGENT'];
+ $id.='-'.session_id();
+ return $id;
+ }
+
+
+
+ function is_ok(){
+ # check tokens, session vars, ip, referrer, cookie etc
+ # in case of problem, destroy session and redirect
+ global $auto_restrict;
+ $expired=false;
+ if (!isset($_SESSION['id_user'])){return false;}
+ # fatal problem
+ if (!checkReferer()){return death('You are definitely NOT from here !
');}
+ if (!checkIP()){return death('Hey... you were banished, fuck off !
');}
+ if (!checkToken()){return death('Invalid token
');}
+
+ #
+ if (checkCookie()){return true;}
+
+ if ($_SESSION['expire']'.$msg.'
');}else{return false;}}
+ function is_user_admin(){
+ global $auto_restrict;
+ if ($auto_restrict['add_remove_user_admin_only']==false){return true;}
+ if (!empty($_SESSION['status'])){
+ if ($_SESSION['status']=='admin'||$_SESSION['status']=='superadmin'){return true;}
+ }else{
+ $first=first($auto_restrict['users']);
+ if (!empty($_SESSION['login'])&&$_SESSION['login']==$first['login']){return true;}
+ if (!empty($_SESSION['login'])&&isset($auto_restrict['users'][$_SESSION['login']]['status'])&&$auto_restrict['users'][$_SESSION['login']]['status']=='admin'){return true;}
+ }
+ return false;
+ }
+ function log_user($login_donne,$pass_donne){
+ # create session vars
+ $save=false;
+ global $auto_restrict,$default_language;
+ if (empty($default_language)){$default_language='en';}
+ session_destroy();session_start();
+ foreach ($auto_restrict['users'] as $key=>$user){
+ if ($user['login']===$login_donne && $user['pass']===hash('sha512', $user["salt"].$pass_donne)){
+ $_SESSION['id_user']=chiffre(id_user(),$user['encryption_key']);
+ $_SESSION['login']=$user['login'];
+ $_SESSION['expire']=time()+(60*$auto_restrict['session_expiration_delay']);
+ $admin=first($auto_restrict['users']);
+ $_SESSION['status']=$user['status'];
+ $_SESSION['language']=$user['lang'];
+ if ($save){save_users();}
+ return true;
+ }
+ }
+ if ($login_donne!='dis'&&$pass_donne!='connect'){
+ add_banned_ip();
+ }else{exit_redirect();}
+ return false;
+ }
+
+ function exit_redirect(){
+ global $auto_restrict;
+ @session_unset();
+ @session_destroy();
+ delete_cookie();
+ if ($auto_restrict['redirect_error']&&$auto_restrict['redirect_error']!=''){
+ safe_redirect($auto_restrict['redirect_error']);
+ }else{exit($auto_restrict['error_msg']);}
+ }
+ function generate_salt($length=256){
+ $salt='';
+ for($i=1;$i<=$length;$i++){
+ $salt.=chr(mt_rand(35,126));
+ }
+ return $salt;
+ }
+
+ function set_cookie(){
+ # create cookie and token file
+ global $auto_restrict;
+ $token_cookie=hash('sha512',$auto_restrict['system_salt'].md5(preg_replace('#[^a-zA-Z]#','',uniqid(true))));
+ $time=time()+$auto_restrict['cookie_expiration_delay']*1440;
+ setcookie($auto_restrict['cookie_name'],$token_cookie,$time);
+ file_put_contents($auto_restrict['path_to_files'].'/'.$token_cookie,$time,0666);
+ chmod($auto_restrict['path_to_files'].'/'.$token_cookie,0666);
+ }
+ function delete_cookie(){
+ # delete cookie and token cookie file
+ global $auto_restrict;
+ @$token_cookie_file=$_COOKIE[$auto_restrict['cookie_name']];
+ setcookie($auto_restrict['cookie_name'],'',time()+1);
+ @unlink($auto_restrict['path_to_files'].'/'.$token_cookie_file);
+ }
+ function checkCookie(){
+ # test cookie token file security access
+ global $auto_restrict;
+
+ if (!isset($_COOKIE[$auto_restrict['cookie_name']])){return false;} # no cookie ?
+ $cookie_token_file=$auto_restrict['path_to_files'].'/'.$_COOKIE[$auto_restrict['cookie_name']];
+ if (!is_file($cookie_token_file)){return false;} # no cookie token file ?
+ if (file_get_contents($cookie_token_file) ';}
+ else {echo $token;}
+ }
+ # create a token, and return it
+ function returnToken(){
+ global $auto_restrict;
+ $token=hash('sha512',uniqid('',true));
+ $_SESSION[$token]=@date('U')+$auto_restrict['tokens_expiration_delay'];
+ return $token;
+ }
+
+
+ # ------------------------------------------------------------------
+ # ADMIN ONLY PROTECTION
+ # ------------------------------------------------------------------
+ # echo a password input form to secure sensitive sections
+ # you can specify a label text and/or a placeholder text
+ function adminPassword($label='',$placeholder=''){
+ if (!empty($label)){$label=''.$label.' ';}
+ if (!empty($placeholder)){$placeholder=' placeholder="'.$placeholder.'" ';}
+ echo $label.' ';
+ }
+
+
+ # ------------------------------------------------------------------
+ # IP
+ # ------------------------------------------------------------------
+ # increment the IP counter in the banned IP file
+ function add_banned_ip($ip=null){
+ if(empty($ip)){$ip=$_SERVER['REMOTE_ADDR'];}
+ global $auto_restrict;
+
+ if (isset($auto_restrict["banned_ip"][$ip])){
+ $auto_restrict["banned_ip"][$ip]['nb']++;
+ }else{
+ $auto_restrict["banned_ip"][$ip]['nb']=1;
+ }
+
+ $auto_restrict["banned_ip"][$ip]['date']=@date('U')+$auto_restrict['IP_banned_expiration_delay'];
+ file_put_contents($auto_restrict['path_to_files'].'/'.$auto_restrict["banned_ip_filename"],'');
+ }
+
+ function remove_banned_ip($ip=null){
+ if(empty($ip)){$ip=$_SERVER['REMOTE_ADDR'];}
+ global $auto_restrict;
+ if (isset($auto_restrict["banned_ip"][$ip])){
+ unset($auto_restrict["banned_ip"][$ip]);
+ }
+ file_put_contents($auto_restrict['path_to_files'].'/'.$auto_restrict["banned_ip_filename"],'');
+ }
+
+ # check if user IP is banned or not
+ function checkIP($ip=null){
+ if(empty($ip)){$ip=$_SERVER['REMOTE_ADDR'];}
+ global $auto_restrict;
+
+ if (isset($auto_restrict["banned_ip"][$ip])){
+ if ($auto_restrict["banned_ip"][$ip]['nb']<$auto_restrict['max_security_issues_before_ban']){return true;} # below max login fails
+ else if ($auto_restrict["banned_ip"][$ip]['date']>=@date('U')){return false;} # active banishment
+ else if ($auto_restrict["banned_ip"][$ip]['date']<@date('U')){remove_banned_ip($ip);return true;} # old banishment
+ return false;
+ }else{return true;}# ip is ok
+ }
+
+ # ------------------------------------------------------------------
+ # Misc
+ # ------------------------------------------------------------------
+ # creates a form with the users list to erase
+ function generate_users_formlist($text='Check users to delete account and files'){
+ global $auto_restrict;
+ echo ''.$text.' ';
+ }
+ # creates a form with the users list to change status
+ function generate_users_status_formlist($text='Select new status for the users',$user_text='user',$admin_text='admin'){
+ global $auto_restrict,$PROFILES;
+ echo ''.$text.' ';
+ }
+
+ function safe_redirect($url=none){
+ if (!$url){return false;}
+ if (!headers_sent()){header('location: '.$url);}
+ else{echo '';}
+ exit;
+ }
+
+ # creates the secured link to the users list form
+ function generate_users_list_link($text='See users list'){
+ global $auto_restrict;
+ echo ' ';
+ }
+ # creates the secured link to new user form
+ function generate_new_users_link($text='Add a user'){
+ echo ' ';
+ }
+ # creates the secured link to new password form
+ function generate_new_password_link($text='Change password'){
+ echo ' ';
+ }
+ function first($array){
+ if (empty($array)){return false;}
+ $akeys=array_keys($array);
+ $key=array_shift($akeys);
+ return $array[$key];
+ }
+?>
diff --git a/sources/core/auto_thumb.php b/sources/core/auto_thumb.php
new file mode 100644
index 0000000..5359d5e
--- /dev/null
+++ b/sources/core/auto_thumb.php
@@ -0,0 +1,97 @@
+$src_height){
+ // paysage
+ $ratio=$src_width/$src_height;
+ $height=$width/$ratio;
+ }
+ }else{
+ // avec recadrage: on produit une image aux dimensions définies mais coupée
+ if ($src_width<$src_height){
+ // portrait
+ $recadrageY=round(($src_height-$src_width)/2);
+ $src_height=$src_width;
+ }else if ($src_width>$src_height){
+ // paysage
+ $recadrageX=round(($src_width-$src_height)/2);
+ $src_width=$src_height;
+ }
+ }
+
+
+
+ // en fonction de l'extension
+ $fichier = pathinfo($img);
+ $extension=str_ireplace('jpg','jpeg',$fichier['extension']);
+
+
+ $fonction='imagecreatefrom'.$extension;
+ if (!$src = $fonction($img)){return false;}
+
+ // création image
+ $thumb = imagecreatetruecolor($width,$height);
+
+ // gestion de la transparence
+ // (voir fonction de Seebz: http://code.seebz.net/p/imagethumb/)
+ if( $extension=='png' ){imagealphablending($thumb,false);imagesavealpha($thumb,true);}
+ if( $extension=='gif' && @imagecolortransparent($img)>=0 ){
+ $transparent_index = @imagecolortransparent($img);
+ $transparent_color = @imagecolorsforindex($img, $transparent_index);
+ $transparent_index = imagecolorallocate($thumb, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']);
+ imagefill($thumb, 0, 0, $transparent_index);
+ imagecolortransparent($thumb, $transparent_index);
+ }
+
+ imagecopyresampled($thumb,$src,0,0,$recadrageX,$recadrageY,$width,$height,$src_width,$src_height);
+
+ // gestion de la rotation
+ @$exif = exif_read_data($img);
+ if ($exif && array_key_exists('Orientation', $exif)) {
+ $orientation = $exif['Orientation'];
+ $angle = get_rotation_angle($orientation);
+ $thumb = imagerotate($thumb, $angle, 0);
+ }
+ imagepng($thumb, $thumb_name);
+ imagedestroy($thumb);
+
+ return $thumb_name;
+}
+
+
+?>
\ No newline at end of file
diff --git a/sources/core/commands_GET_vars.php b/sources/core/commands_GET_vars.php
new file mode 100644
index 0000000..72b0d56
--- /dev/null
+++ b/sources/core/commands_GET_vars.php
@@ -0,0 +1,132 @@
+
+ * like thumbnails request, users list, login/logout request, public share file/folder request...
+ * @author: Bronco (bronco@warriordudimanche.net)
+ **/
+
+
+ # thumbnail request
+ if(isset($_GET['thumbs'])&&!empty($_GET['f'])&&$_SESSION['GD']){
+ $f=get_thumbs_name(id2file($_GET['f']));
+ $type=_mime_content_type($f);
+ header('Content-type: '.$type.'; charset=utf-8');
+ header('Content-Transfer-Encoding: binary');
+ header('Content-Length: '.filesize($f));
+ readfile($f);
+ exit;
+ }
+ if(isset($_GET['gthumbs'])&&!empty($_GET['f'])&&$_SESSION['GD']){
+ $f=get_thumbs_name_gallery(id2file($_GET['f']));
+ $type=_mime_content_type($f);
+ header('Content-type: '.$type.'; charset=utf-8');
+ header('Content-Transfer-Encoding: binary');
+ header('Content-Length: '.filesize($f));
+ readfile($f);
+ exit;
+ }
+
+ # public share request
+ if (!empty($_GET['f'])){
+ require('core/share.php');
+ exit;
+ }
+
+ # Try to login or logout ? => auto_restrict
+ if (!empty($_POST['pass'])&&!empty($_POST['login'])||isset($_GET['logout'])||isset($_GET['deconnexion'])){
+ require_once('core/auto_restrict.php');
+ exit;
+ }
+
+ # ask for rss stats
+ if (isset($_GET['statrss'])&&!empty($_GET['key'])&&hash_user($_GET['key'])){
+ $rss=array('infos'=>'','items'=>'');
+ $rss['infos']=array(
+ 'title'=>'BoZoN - stats',
+ 'description'=>e('Rss feed of stats',false),
+ //'guid'=>$_SESSION['home'].'?f='.$id,
+ 'link'=>htmlentities($_SESSION['home']),
+ );
+
+ include('core/Array2feed.php');
+ $stats=load($_SESSION['stats_file']);
+ for ($index=0;$index<$_SESSION['stats_max_lines'];$index++){
+ if (!empty($stats[$index])){
+ $rss['items'][]=
+ array(
+ 'title'=>$stats[$index]['file'],
+ 'description'=>'[ip:'.$stats[$index]['ip'].'] '.'[referrer:'.$stats[$index]['referrer'].'] '.'[host:'.$stats[$index]['host'].'] ',
+ 'pubDate'=>makeRSSdate($stats[$index]['date']),
+ 'link'=>$_SESSION['home'].'?f='.$stats[$index]['id'],
+ 'guid'=>$_SESSION['home'].'?f='.$stats[$index]['id'],
+ );
+ }
+ }
+ array2feed($rss);
+ exit;
+ }
+
+
+ # ask for json format stats
+ if (isset($_GET['statjson'])&&!empty($_GET['key'])&&hash_user($_GET['key'])){
+ $stats=load($_SESSION['stats_file']);
+ exit(json_encode($stats));
+ }
+
+ # zip and download a folder from visitor's share page
+ if (!empty($_GET['zipfolder'])&&$_SESSION['zip']){
+ $folder=id2file($_GET['zipfolder']);
+ if (!is_dir($_SESSION['temp_folder'])){mkdir($_SESSION['temp_folder']);}
+ $zipfile=$_SESSION['temp_folder'].return_owner($_GET['zipfolder']).'-'._basename($folder).'.zip';
+ zip($folder,$zipfile);
+ header('location: '.$zipfile);
+ exit;
+ }
+
+ if (is_user_connected()){
+ # users list request
+ if (isset($_GET['users_list'])&&is_allowed('user page')){
+ $_GET['p']='users';unset($_GET['users_list']); # To avoid useless changes in auto_restrict
+ }
+ # if user is connected, use auto_restrict
+ require_once('core/auto_restrict.php');
+ $token=returnToken();
+
+ # complete list files ajax request button «load more»
+ if(isset($_GET['async'])){
+ include('core/listfiles.php');
+ exit;
+ }
+ if (empty($_GET['p'])&&!empty($_GET)||count($_GET)>2||!empty($_POST)){include('core/GET_POST_admin_data.php');}
+ if (!empty($_FILES)){
+ include('core/auto_dropzone.php');
+ exit();
+ }
+
+ # users share list request
+ if (isset($_GET['users_share_list'])){
+ $shared_id=$_GET['users_share_list'];
+ require_once('core/auto_restrict.php');
+ $shared_with=load_folder_share();
+ $users=$auto_restrict['users'];
+ unset($users[$_SESSION['login']]);
+ foreach($users as $login=>$data){
+ # creates a checkbox list of users (if the folder is already shared by logged user, checked)
+ if (isset($shared_with[$login][$shared_id]) && $shared_with[$login][$shared_id]['from']==$_SESSION['login']){
+ $check=' checked ';$class=' class="shared" ';
+ }else{$check='';$class='';}
+ echo ''.$login.' ';
+ }
+ exit;
+ }
+
+
+
+ }else{$token='';}
+ if (!empty($_GET['p'])){$page=$_GET['p'];}else{$page='';}
+ if (!empty($_GET['msg'])){$message=$_GET['msg'];}
+ if (!empty($_GET['lang'])){$_SESSION['language']=$_GET['lang'];header('location:index.php?p='.$page.'&token='.$token);}
+ if (!empty($_GET['aspect'])){$_SESSION['aspect']=$_GET['aspect'];header('location:index.php?p='.$page.'&token='.$token);}
+
+?>
\ No newline at end of file
diff --git a/sources/core/core.php b/sources/core/core.php
new file mode 100644
index 0000000..970a2f7
--- /dev/null
+++ b/sources/core/core.php
@@ -0,0 +1,1205 @@
+$_SESSION['temp_cleaned']+1800){
+ # clean temp once in a session
+ $zips=_glob($_SESSION['temp_folder'],'.zip');
+ foreach($zips as $zipfile){
+ if (time()>filectime($zipfile)+1800){unlink($zipfile);}
+ }
+ $_SESSION['temp_cleaned']=time();
+ }
+
+ # Check R/W rights for system folders
+ if (!is_writable($_SESSION['private_folder'])){echo ''.e('Private folder is not writable',false).'
';}
+ if (!is_readable($_SESSION['private_folder'])){echo ''.e('Private folder is not readable',false).'
';}
+ if (!is_writable($_SESSION['temp_folder'])){echo ''.e('Temp folder is not writable',false).'
';}
+ if (!is_readable($_SESSION['temp_folder'])){echo ''.e('Temp folder is not readable',false).'
';}
+ if (!is_readable($_SESSION['private_folder'].'trees')){$message.=''.e('Problem accessing tree folder: not readable',false).'
';}
+ if (!is_writable($_SESSION['private_folder'].'trees')){$message.=''.e('Problem accessing tree/folder file: not writable',false).'
';}
+ if (!empty($_SESSION['upload_user_path'])&&!is_readable($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$_SESSION['current_path'])){$message.=''.e('Problem accessing ',false).$_SESSION['current_path'].e(': folder not readable',false).'
';}
+ if (!empty($_SESSION['upload_user_path'])&&!is_writable($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$_SESSION['current_path'])){$message.=''.e('Problem accessing ',false).$_SESSION['current_path'].e(': folder not writable',false).'
';}
+
+ # Check necessary libs
+ if(!$disable_non_installed_libs_warning){
+ if (!$_SESSION['zip']){$message.='';}
+ if (!$_SESSION['GD']){$message.='';}
+ if (!$_SESSION['curl']){$message.='';}
+ }
+ # Check files
+ if (!is_file('thumbs/'.$_SESSION['upload_root_path'].'.htaccess')){file_put_contents('thumbs/'.$_SESSION['upload_root_path'].'.htaccess', 'deny from all');}
+ if (!is_file('thumbs/'.$_SESSION['upload_root_path'].'index.html')){file_put_contents('thumbs/'.$_SESSION['upload_root_path'].'index.html',' ');}
+ if (!is_file($_SESSION['temp_folder'].'.htaccess')){file_put_contents($_SESSION['temp_folder'].'htaccess', 'deny from all');}
+ if (!is_file($_SESSION['upload_root_path'].'index.html')){ file_put_contents($_SESSION['upload_root_path'].'index.html',' '); }
+ if (!is_file('thumbs/.htaccess')){file_put_contents('thumbs/.htaccess', 'deny from all');}
+ if (!is_file('thumbs/index.html')){file_put_contents('thumbs/index.html',' ');}
+ if (!empty($_SESSION['upload_user_path'])&&!is_file('thumbs/'.$_SESSION['upload_root_path'].$_SESSION['upload_user_path'].'.htaccess')){file_put_contents('thumbs/'.$_SESSION['upload_root_path'].$_SESSION['upload_user_path'].'.htaccess', 'deny from all');}
+ if (!empty($_SESSION['upload_user_path'])&&!is_file('thumbs/'.$_SESSION['upload_root_path'].$_SESSION['upload_user_path'].'index.html')){file_put_contents('thumbs/'.$_SESSION['upload_root_path'].$_SESSION['upload_user_path'].'index.html',' ');}
+
+ if (!is_file($_SESSION['private_folder'].'.htaccess')){file_put_contents($_SESSION['private_folder'].'/.htaccess', 'deny from all');}
+ if (!is_file($_SESSION['folder_share_file'])){save_folder_share(array());}
+ if (!is_file($_SESSION['private_folder'].'/salt.php')){ file_put_contents($_SESSION['private_folder'].'/salt.php',''); }
+ else{include($_SESSION['private_folder'].'/salt.php');}
+ if (!is_file($_SESSION['id_file'])){$ids=array();store($ids);}
+ if (!is_file($_SESSION['stats_file'])){save($_SESSION['stats_file'], array());}
+ if (!is_file($_SESSION['upload_root_path'].'.htaccess')){file_put_contents($_SESSION['upload_root_path'].'.htaccess', 'deny from all');}
+ if (!is_file($_SESSION['users_rights_file'])){save_users_rights(array());}
+ else{$users_rights=load_users_rights();}
+ if (!is_file($_SESSION['profiles_rights_file'])){
+ save($_SESSION['profiles_rights_file'],array());
+ }
+
+ if (is_file($_SESSION['id_file'])&&!is_readable($_SESSION['id_file'])){$message.=''.e('Problem accessing ID file: not readable',false).'
';}
+ if (is_file($_SESSION['id_file'])&&!is_writable($_SESSION['id_file'])){$message.=''.e('Problem accessing ID file: not writable',false).'
';}
+ if (is_file($_SESSION['stats_file'])&&!is_readable($_SESSION['stats_file'])){$message.=''.e('Problem accessing stats file: not readable',false).'
';}
+ if (is_file($_SESSION['stats_file'])&&!is_writable($_SESSION['stats_file'])){$message.=''.e('Problem accessing stats file: not writable',false).'
';}
+
+ # Libs configuration
+ # Files to echo in browser (secured)
+ $behaviour['FILES_TO_ECHO']=array('nfo','m3u','txt','js','html','php','SPHP','htm','shtml','shtm','css');
+ # Files to send to browser directly
+ $behaviour['FILES_TO_RETURN']=array('md','jpg','jpeg','gif','png','mp3','mp4','svg');
+ $auto_dropzone['destination_filepath']=$_SESSION['current_path'].'/';
+ $auto_thumb['default_width']='64';
+ $auto_thumb['default_height']='64';
+ $auto_thumb['dont_try_to_resize_thumbs_files']=true;
+
+ # CONSTANTS & GLOBALS
+ define('THEME_PATH','templates/'.$_SESSION['theme'].'/');
+ $ACTIONS=array('users page','add user','delete user','change user status','change folder size','change status rights','change passes','markdown editor','regen ID base','acces logfile','upload');
+ $RIGHTS=load($_SESSION['profiles_rights_file']);
+
+ if (empty($RIGHTS)){ #default profiles if not configured
+ $PROFILES=array('admin','user');
+ $RIGHTS['admin']=array('add user'=>1,'delete user'=>1,'change folder size'=>1,'markdown editor'=>1,'regen ID base'=>1,'access logfile'=>1,'upload'=>1);
+ $RIGHTS['user']=array('markdown editor'=>1,'upload'=>1);
+ save($_SESSION['profiles_rights_file'],$RIGHTS);
+ }else{$PROFILES=array_filter(array_keys($RIGHTS));}
+
+ include('core/templates.php');
+
+
+ #################################################
+ # Load IDS
+ #################################################
+ if (is_user_connected()&&$check_ID_base_on_page_load){
+ $ids=updateIDs();
+ }else{$ids=unstore();}
+ #################################################
+ #################################################
+ # Load current path tree
+ #################################################
+ if (is_user_connected()){
+ $tree=tree($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$_SESSION['current_path'],false,false,$allow_folder_size_stat);
+ }
+ #################################################
+
+
+
+
+
+ #################################################
+ # Functions
+ #################################################
+ # Data save/load & files
+ #################################################
+ function load($file){return (file_exists($file) ? unserialize(gzinflate(base64_decode(substr(file_get_contents($file),9,-strlen(6))))) : array() );}
+ function save($file,$data){return file_put_contents($file, '');}
+ function store($ids=null){if (!$ids){return false;}natcasesort($ids);return save($_SESSION['id_file'],$ids);}
+ function unstore(){return array_filter(load($_SESSION['id_file']));}
+ function save_folder_share($array=null){return save($_SESSION['folder_share_file'],$array);}
+ function load_folder_share(){return load($_SESSION['folder_share_file']);}
+ function save_users_rights($array=null){return save($_SESSION['users_rights_file'],$array);}
+ function load_users_rights(){return load($_SESSION['users_rights_file']);}
+ # Delete a file or a folder and apply changes in ids file
+ function delete_file_or_folder($id=null,$ids=null,$tree=array()){
+ global $ids,$tree;
+ if (empty($ids)){$ids=unstore();}
+ if (empty($id)){return false;}
+ if (empty($tree)){tree(null,$_SESSION['login'],false,false,$tree);}
+ $f=id2file($id);
+ if(is_file($f)){
+ # delete file & thumb
+ unlink($f);
+ $thumbfilename=get_thumbs_name($f);
+ if (is_file($thumbfilename)){unlink($thumbfilename);}
+ unset($ids[$id]);
+ store($ids);
+ return remove_branch($f,$id);
+ }else if (is_dir($f)){
+ $fthumbs=explode('/',$f); unset($fthumbs[0]);$fthumbs=implode('/',$fthumbs);
+ # delete dir
+ rrmdir($f);
+ rrmdir('thumbs/'.$fthumbs);
+ # remove all vanished sub files & folders from id file
+ foreach($ids as $id=>$path){
+ if (strpos($path, $f.'/')!==false){unset($ids[$id]);}
+ }
+ store($ids);
+ return remove_branch($f,$id);
+ }
+ return $tree;
+ }
+
+ # New folder in the current path
+ function new_folder($folder=null){
+ if (!$folder){return false;}
+ $thumbs_path='thumbs/'.$_SESSION['upload_user_path'].addslash_if_needed($_SESSION['current_path']);
+ $path=$_SESSION['upload_root_path'].$_SESSION['upload_user_path'].addslash_if_needed($_SESSION['current_path']);
+ $complete_path=$path.$folder;
+ $complete_thumbs=$thumbs_path.$folder;
+ if (is_dir($complete_path)&&is_dir($complete_thumbs)){
+ # Folder already exists, rename
+ $folder=rename_item($folder,$path);
+ $complete_path=$path.$folder;
+ $complete_thumbs=$thumbs_path.$folder;
+ }else if(!is_dir($complete_path)&&is_dir($complete_thumbs)){
+ rrmdir($complete_thumbs);
+ }
+ mkdir($complete_path, 0744, true);
+ mkdir($complete_thumbs, 0744, true);
+ return addID($complete_path);
+ }
+
+ # checks if dir is empty
+ function is_empty_dir($src){
+ # form https://openclassrooms.com/forum/sujet/savoir-si-un-dossier-est-vide-39930
+ if (!is_dir($src)){return 'no such dir';}
+ $h = opendir($src);
+ while (($o = readdir($h)) !== FALSE){
+ if (($o != '.') and ($o != '..')){$c++;}
+ }
+ closedir($h);
+ if($c==0){return true;}else {return false; }
+ }
+
+ # store all client access to a file
+ function store_access_stat($file=null,$id=null){
+ if (!$file||!$id){return false;}
+ $host=$ref='∅';
+ if (isset($_SERVER['REMOTE_HOST'])){$host=$_SERVER['REMOTE_HOST'];}
+ if (isset($_SERVER['HTTP_REFERER'])){$ref=$_SERVER['HTTP_REFERER'];}
+ $data=array(
+ 'ip'=>$_SERVER['REMOTE_ADDR'],
+ 'host'=>$host,
+ 'referrer'=>$ref,
+ 'date'=>date('D d M, H:i:s'),
+ 'file'=>$file,
+ 'id'=>$id,
+ );
+ //FIXME not very good when multi-call
+ $stats=load($_SESSION['stats_file']);
+ if (!is_array($stats)){$stats=array();}
+ if (count($stats)>$_SESSION['stats_max_entries']){
+ $stats=array_values($stats);
+ unset($stats[0]);
+ }
+ $stats[]=$data;
+ save($_SESSION['stats_file'], $stats);
+ }
+ function addslash_if_needed($chaine){
+ if (substr($chaine,strlen($chaine)-1,1)!='/'&&!empty($chaine)){return $chaine.'/';}else{return $chaine;}
+ }
+ function rename_item($file=null,$folder=''){
+ if (!$file){return false;}
+ if (strpos($file, '/')!==false){$file=_basename($file);}
+ $folder=addslash_if_needed($folder);
+ $destination=$folder.$file;
+ $nb=1;
+ $extension=pathinfo($file,PATHINFO_EXTENSION);
+ $file2=$file;
+ while (is_file($destination) || is_dir($destination)){
+ $nb++;
+ $add='('.$nb.')';
+ if (is_file($destination)) {$file2=str_replace('.'.$extension,$add.'.'.$extension,$file);}
+ else{$file2=$file.$add;}
+ $destination=$folder.$file2;
+ }
+ return $file2;
+ }
+ function no_special_char($string){return preg_replace('/[\"*\/\:<>\?|]/','',$string);}
+ function file_curl_contents($url,$pretend=true){
+ # distant version of file_get_contents
+ $ch = curl_init();
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept-Charset: UTF-8'));
+ curl_setopt($ch, CURLOPT_HEADER, 0);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($ch, CURLOPT_URL, $url);
+ if (!ini_get("safe_mode") && !ini_get('open_basedir') ) {curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);}
+ curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
+ if ($pretend){curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0');}
+ curl_setopt($ch, CURLOPT_REFERER, 'http://noreferer.com');// notez le referer "custom"
+ $data = curl_exec($ch);
+ $response_headers = curl_getinfo($ch);
+ curl_close($ch);
+ return $data;
+ }
+ function getUrl() {
+ $url = @( $_SERVER["HTTPS"] != 'on' ) ? 'http://'.$_SERVER["SERVER_NAME"] : 'https://'.$_SERVER["SERVER_NAME"];
+ $url .= $_SERVER["SCRIPT_NAME"];
+ return $url;
+ }
+ function rrmdir($dir) {
+ # delete a folder and its content
+ if (is_dir($dir)) {
+ $objects = scandir($dir);
+ foreach ($objects as $object) {
+ if ($object != "." && $object != "..") {
+ if (filetype($dir."/".$object) == "dir") rrmdir($dir."/".$object); else unlink($dir."/".$object);
+ }
+ }
+ reset($objects);
+ rmdir($dir);
+ }
+ }
+ function _glob($path,$pattern='') {
+ # glob function fallback by Cyril MAGUIRE (thx bro' ;-)
+ if($path=='/'){
+ $path='';
+ }
+ $liste = array();
+ $pattern=str_replace('*','',$pattern);
+ if ($handle = opendir($path)) {
+ while (false !== ($file = readdir($handle))) {
+ if(stripos($file, $pattern)!==false || $pattern=='' && $file!='.' && $file!='..' && $file!='.htaccess') {
+ $liste[] = $path.$file;
+ }
+ }
+ closedir($handle);
+ }
+ natcasesort($liste);
+ return $liste;
+
+ }
+ function _basename($file){$array=explode('/',$file);if (is_array($array)){return end($array);}else{return $file;}}
+ function only_type($tree=null, $ext=null){
+ if (empty($tree)||empty($ext)){return false;}
+ if (is_string($tree)){
+ $extension=pathinfo($tree,PATHINFO_EXTENSION);
+ if (stripos($ext, $extension)===false||empty($extension)){return false;}
+ return true;
+ }elseif (is_array($tree)){
+ $tree=unset_first_element($tree);
+ if (empty($tree)){return false;}
+ foreach($tree as $file){
+ if (is_file($file)||is_dir($file)){
+ $extension=pathinfo($file,PATHINFO_EXTENSION);
+ if (stripos($ext, $extension)===false||empty($extension)){return false;}
+ }
+ }
+ return true;
+ }
+
+ }
+ function unset_first_element($array=null){
+ if (!$array){return false;}
+ $first=array_keys($array);$first=$first[0];
+ unset($array[$first]);
+ return $array;
+ }
+ function unzip($file, $destination){
+ if (!class_exists('ZipArchive')){return false;}
+ $zip = new ZipArchive() ;
+ if ($zip->open($file) !== TRUE) { return false;}
+ $zip->extractTo($destination);
+ $zip->close();
+ return true;
+ }
+
+ function zip($source, $destination)
+ {
+ if (!extension_loaded('zip')){return false;}
+ $zip = new ZipArchive();
+ if (is_file($destination)){unlink($destination);}
+ if (!$zip->open($destination, ZIPARCHIVE::CREATE)) {return false;}
+ if (is_string($source)){$source=array($source);}
+ foreach($source as $item){
+ if (is_dir($item) === true){
+ $files = array_keys(iterator_to_array(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($item), RecursiveIteratorIterator::SELF_FIRST)));
+ $files[0]=dirname($files[1]);
+ foreach ($files as $key=>$file){
+ # Ignore "." and ".." folders
+ if( in_array(substr($file, strrpos($file, '/')+1), array('.', '..')) ){continue;}
+ $file_short=utf8_decode(str_replace(addslash_if_needed($_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$_SESSION['current_path']),'',$file));
+ if (is_dir($file) === true){
+ $zip->addEmptyDir($file_short);
+ }else if (is_file($file) === true){
+ $zip->addFromString($file_short, file_get_contents($file));
+ }
+ }
+ }
+ else if (is_file($item) === true){
+ $zip->addFromString(_basename($item), file_get_contents($item));
+ }
+
+ }
+
+ }
+
+ function check_path($path){
+ return (strpos($path, '//')===false && strpos($path, '..')===false && ( empty($path[0]) || (!empty($path[0]) && $path[0]!='/') ) );
+ }
+
+ function get_thumbs_name($file){
+ global $auto_thumb;
+ if($file[0]=='/'){
+ $file=substr($file,1);
+ }
+ return 'thumbs/'.preg_replace('#\.(jpe?g|png|gif)#i','_THUMB_'.$auto_thumb['default_width'].'x'.$auto_thumb['default_height'].'.$1',$file);
+ }
+
+ function get_thumbs_name_gallery($file){
+ global $gallery_thumbs_width;
+ if($file[0]=='/'){
+ $file=substr($file,1);
+ }
+ return 'thumbs/'.preg_replace('#\.(jpe?g|png|gif)#i','_THUMBGALLERY_'.$gallery_thumbs_width.'x'.$gallery_thumbs_width.'.$1',$file);
+ }
+
+ function recursive_glob($dir='.',$files=true){
+ # scann a folder and subfolders and return the tree
+ if (!isset($dossiers[0]) || $dossiers[0]!=$dir){$dossiers[0]=$dir;}
+ if (!is_dir($dir)&&$files){ return array($dir); }
+ elseif (!is_dir($dir)&&!$files){return array();}
+ $list=_glob(addslash_if_needed($dir));
+ foreach ($list as $dossier) {
+ $dossiers=array_merge($dossiers,recursive_glob($dossier,$files));
+ }
+ return $dossiers;
+ }
+
+ ############################################
+ # IDS functions
+ ############################################
+ # Delete the id if it's a burn one
+ function burned($id){
+ if ($id[0]=='*'&&!isset($_GET['thumbs'])){
+ if (!is_user_connected() || !is_owner($id)){removeID($id);}
+ }
+ }
+ # Create an ID for a file/folder
+ function addID($path,$ids=null){# $path must be complete upload path
+ global $ids;
+ if (!$ids){$ids=unstore();}
+ if ($id=array_search($path, $ids)){return $id;}
+ $item_id=uniqid(true);
+ $ids[$item_id]=$path;
+ store($ids);
+ return $item_id;
+ }
+
+ # remove an id from id file
+ function removeID($id){
+ $ids=unstore();
+ if (!empty($ids[$id])){unset ($ids[$id]);}
+ store($ids);
+ }
+
+ # remove unused ids, add new ids for current user
+ function updateIDs($ids=null,$folder_id=null){
+ if (!$ids){$ids=unstore();}
+ $sdi=array_flip($ids);$saveid=$savetree=false;
+ $ids=array_flip($sdi); # here, all the redundant ids have gone ^^
+ # scann all uploads folder (can be long but it's important)
+ # or only the requested folder
+ if (!empty($folder_id)){
+ $tree=recursive_glob(id2file($folder_id),true);
+ }else{
+ $tree=recursive_glob($_SESSION['upload_root_path'],true);
+ }
+ unset($tree[0]);
+ # add missing ids
+ foreach($tree as $index=>$file){
+ if (!isset($sdi[$file])){
+ $saveid=true;
+ $id=uniqid(true);
+ $ids[$id]=$file;
+ }else{unset($sdi[$file]);}
+ }
+ if (empty($folder_id)){
+ # remove ids with no file (not required for single folder update)
+ if (!empty($sdi)){
+ $saveid=true;
+ foreach ($sdi as $file=>$id){
+ if (!is_dir($file)&&!is_file($file)){
+ unset($ids[$id]);
+ if ($remove=array_search($file, $tree)){
+ unset($tree[$remove]);
+ }
+ }
+ }
+ }
+ }
+ if ($saveid){
+ store($ids);
+ regen_tree($_SESSION['login'],$ids);
+ }
+ return $ids;
+ }
+
+ function is_in($ext,$type){
+ global $behaviour;
+ if (!empty($behaviour[$type])){return array_search($ext,$behaviour[$type]);}else{return false;}
+ }
+ function id2file($id){
+ global $ids;
+ if (isset($ids[$id])){
+ return $ids[$id];
+ }else{
+ return false;
+ }
+ }
+ function file2id($file){
+ global $ids;
+ $sdi=array_flip($ids);
+ if (isset($sdi[$file])){return $sdi[$file];}else{return false;}
+ }
+ function only_folders($array=null){
+ if (empty($array)){return false;}
+ $tree=array();
+ foreach($array as $key=>$value){
+ if (is_dir($value)){$tree[]=$value;}
+
+ }
+ return $tree;
+ }
+ function add_branch($path=null,$id=null,$user=null,$tree=array()){
+ global $ids;
+ if (empty($path)){return false;}
+ if (empty($id)&&empty($ids)){return false;}
+ if (empty($id)){$id=file2id($path);}
+ if (empty($user)&&!empty($_SESSION['login'])){$user=$_SESSION['login'];}
+ if (empty($tree)){$tree=loadtree($user);}
+ $tree[$id]=$path;
+ natcasesort($tree);
+ savetree($user,$tree);
+ return $tree;
+ }
+ function remove_branch($path=null,$id=null,$user=null,$tree=array()){
+ global $ids;
+ if (empty($path)){return false;}
+ if (empty($id)&&empty($ids)){return false;}
+ if (empty($id)){$id=file2id($path);}
+ if (empty($user)&&!empty($_SESSION['login'])){$user=$_SESSION['login'];}
+ if (empty($tree)){$tree=loadtree($user);}
+ if (isset($tree[$id])||$id=array_search($path, $tree)){
+ unset($tree[$id]);
+ }
+ return $tree;
+ }
+ function rename_branch($new=null,$old=null,$id=null,$user=null,$tree=array()){
+ global $ids;
+ if (empty($new)||empty($old)||$new==$old){return false;}
+ if (empty($id)&&empty($ids)){return false;}
+ if (empty($id)){$id=file2id($old);}
+ if (empty($user)&&!empty($_SESSION['login'])){$user=$_SESSION['login'];}
+ if (empty($tree)){$tree=loadtree($user);}
+ if (isset($tree[$id])||$id=array_search($old, $tree)){
+ $tree[$id]=$new;
+ }
+ return $tree;
+ }
+ function savetree($user=null,$tree=array()){
+ if (empty($tree)){return false;}
+ if (empty($user)&&!empty($_SESSION['login'])){$user=$_SESSION['login'];}
+ save($_SESSION['private_folder'].'trees/'.$user.'.php',$tree);
+ }
+ function loadtree($user=null){
+ if (empty($user)&&!empty($_SESSION['login'])){$user=$_SESSION['login'];}
+ if (empty($_SESSION['private_folder'])){return false;}
+ $path=$_SESSION['private_folder'].'trees/'.$user.'.php';
+ if (is_file($path)){return load($path);}
+ return false;
+ }
+
+ # Creates the user's folder tree (for ids file) to reduce all actions to this folder and not to all upload dir
+ # if path, only regen a subfolder, return it
+ function regen_tree($user='',$ids=null,$path=null){
+ global $ids;
+ if (!$ids){$ids=unstore();}
+ if (empty($user)){$user=$_SESSION['login'];}
+ if (empty($path)){$path=$_SESSION['upload_root_path'].$user.'/';
+ /*if (!empty($user)){$path=$_SESSION['upload_root_path'].$user.'/';}
+ elseif (!empty($_SESSION['upload_user_path'])){
+ $path=$_SESSION['upload_root_path'].$_SESSION['upload_user_path'];
+ $user=$_SESSION['login'];
+ }else{$path=$_SESSION['upload_root_path'];}*/
+ }
+
+ $tree=array();
+ foreach($ids as $id=>$value){
+ if (strpos($value,$path)!==false){$tree[$id]=$value;}
+ }
+ return $tree;
+ }
+
+ # regen recursive folder tree if needed
+ function user_folder_tree($user=null){
+ if (!$user&&!empty($_SESSION['login'])){$user=$_SESSION['login'];}
+ if (isset($_SESSION['regenfolder'])||!is_file($_SESSION['private_folder'].$user.'.php')){
+ # regen folder tree
+ $tree=tree($_SESSION['upload_root_path'].$_SESSION['upload_user_path'],$user,true,true);
+ savetree($user,$tree);
+ unset($_SESSION['regenfolder']);
+ return $tree;
+ }else{
+ return loadtree($user);
+ }
+ }
+
+ # build folder content from the user's tree file to avoid excessive _glob access
+ function tree($folder=null,$user=false,$folders_only=false,$recursive=false,$tree=null){
+ global $current_tree,$ids;
+ if (!empty($current_tree)&&!$folders_only&&!$recursive){return $current_tree;}
+ $dir=array();
+ if (!$user){$user=$_SESSION['login'];}
+ if (!$tree){$tree=regen_tree($user);}
+ if (!empty($current_tree)&&$folders_only){$tree=only_folders($current_tree);}
+ elseif($folders_only){$tree=only_folders($tree);}
+
+ if (empty($folder)){$folder=$_SESSION['upload_root_path'].$_SESSION['upload_user_path'].$_SESSION['current_path'];}
+ if (!empty($tree)){
+ foreach ($tree as $id=>$path){
+ if ($recursive){
+ $p=addslash_if_needed($path);
+ $f=addslash_if_needed($folder);
+ $match=(strpos($p, $f)===0);
+ }else{
+ $match=(addslash_if_needed(dirname($path))===addslash_if_needed($folder));
+ }
+ if (!empty($_SESSION['filter'])){
+ $match=$match&&(strpos(_basename($path),$_SESSION['filter'])!==false);
+ }
+ if ($match===true){
+ $dir[$id]=$path;
+ }
+ }
+ }else{$dir=array();}
+ unset($_SESSION['filter']);
+ return $dir;
+
+ }
+ function deep_strip_tags($var){if (is_string($var)){return strip_tags($var);}if (is_array($var)){return array_map('deep_strip_tags',$var);}return $var; }
+ function visualizeIcon($extension){
+ global $behaviour;
+ $array=array_merge(array_flip($behaviour['FILES_TO_RETURN']),array_flip($behaviour['FILES_TO_ECHO']));
+ return isset($array[$extension]);
+ }
+ function generate_bozon_salt($length=512){
+ $salt='';
+ for($i=1;$i<=$length;$i++){
+ $salt.=chr(mt_rand(35,126));
+ }
+ return $salt;
+ }
+ function blur_password($pw){
+ if (!empty($pw)){return hash('sha512', BOZON_SALT.$pw);}
+ return false;
+ }
+ # to solve some problems on mime detection, fallback
+ if (function_exists('mime_content_type')){
+ function _mime_content_type($filename) {return mime_content_type($filename);}
+ }elseif (function_exists('finfo_file')){
+ function _mime_content_type($filename) {return finfo_file( finfo_open( FILEINFO_MIME_TYPE ), $filename );}
+ }else{
+ function _mime_content_type($filename){
+ #inspired by http://stackoverflow.com/questions/8225644/php-mime-type-checking-alternative-way-of-doing-it
+ $mime_types = array(
+ 'txt' => 'text/plain',
+ 'md' => 'text/plain',
+ 'nfo' => 'text/plain',
+ 'htm' => 'text/html',
+ 'html' => 'text/html',
+ 'php' => 'text/html',
+ 'css' => 'text/css',
+ 'js' => 'application/javascript',
+ 'json' => 'application/json',
+ 'xml' => 'application/xml',
+ 'swf' => 'application/x-shockwave-flash',
+ 'flv' => 'video/x-flv',
+
+ // images
+ 'png' => 'image/png',
+ 'jpe' => 'image/jpeg',
+ 'jpeg' => 'image/jpeg',
+ 'jpg' => 'image/jpeg',
+ 'gif' => 'image/gif',
+ 'bmp' => 'image/bmp',
+ 'ico' => 'image/vnd.microsoft.icon',
+ 'tiff' => 'image/tiff',
+ 'tif' => 'image/tiff',
+ 'svg' => 'image/svg+xml',
+ 'svgz' => 'image/svg+xml',
+
+ // archives
+ 'zip' => 'application/zip',
+ 'rar' => 'application/x-rar-compressed',
+ 'exe' => 'application/x-msdownload',
+ 'msi' => 'application/x-msdownload',
+ 'cab' => 'application/vnd.ms-cab-compressed',
+
+ // audio/video
+ 'mp3' => 'audio/mpeg',
+ 'qt' => 'video/quicktime',
+ 'mov' => 'video/quicktime',
+ 'm3u' => 'audio/x-mpegurl',
+
+ // adobe
+ 'pdf' => 'application/pdf',
+ 'psd' => 'image/vnd.adobe.photoshop',
+ 'ai' => 'application/postscript',
+ 'eps' => 'application/postscript',
+ 'ps' => 'application/postscript',
+
+ // ms office
+ 'doc' => 'application/msword',
+ 'rtf' => 'application/rtf',
+ 'xls' => 'application/vnd.ms-excel',
+ 'ppt' => 'application/vnd.ms-powerpoint',
+ 'docx' => 'application/msword',
+ 'xlsx' => 'application/vnd.ms-excel',
+ 'pptx' => 'application/vnd.ms-powerpoint',
+
+
+ // open office
+ 'odt' => 'application/vnd.oasis.opendocument.text',
+ 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
+ );
+
+ $ext=strtolower(pathinfo($filename,PATHINFO_EXTENSION));
+ if (array_key_exists($ext, $mime_types)) {return $mime_types[$ext];}
+ else {return 'application/octet-stream';}
+ }
+ }
+
+ # counts how much levels to go back (to close correctly)
+ function count_back($previous,$current){
+ $max=max(count($previous),count($current));
+ for($c=0; $c<$max;$c++){
+ if (!isset($previous[$c]) || !isset($current[$c]) || $previous[$c]!=$current[$c]){break;}
+ }
+ $c++;
+ return $max-$c;
+ }
+ function draw_tree($tree=null){
+ if (!$tree){return false;}
+ $first=array_keys($tree);
+ $second=$first[1];$first=$first[0];
+ $image_only=only_type($tree,'.jpg .jpeg .gif .png');
+ $sound_only=only_type($tree,'.mp3 .ogg');
+
+ if (!$image_only&&!$sound_only){
+ # file list tree
+ echo '';
+ $tree=array_map(function($i){return $i.'/';}, $tree);
+ natcasesort($tree);
+ echo ''._basename(rtrim($tree[$first], '/\\')).' ';
+ unset($tree[$first]);
+ if (empty($tree)){return false;}
+
+ $previous_branch=explode('/',$tree[$second]);
+ $previous_level=$current_level=count($previous_branch);
+
+ foreach ($tree as $id=>$branch){
+ if (!is_dir($branch)){$branch=rtrim($branch, '/\\');}
+ $current_branch=explode('/',$branch);
+ $current_level=count($current_branch);
+
+ if (is_dir($branch)&&$previous_level==$current_level){echo ' ';}
+ if ($current_level<$previous_level){
+ $nb=count_back($previous_branch,$current_branch);
+ echo str_repeat('',$nb);
+ }
+ if (is_dir($branch)){
+ echo ' '._basename(rtrim($branch, '/\\')).' ';
+ echo '';
+ }elseif (is_file($branch)){
+ $extension=strtolower(pathinfo($branch,PATHINFO_EXTENSION));
+ echo ''.$extension.' '._basename($branch).' ';
+ }
+ $previous_level=$current_level;$previous_branch=$current_branch;
+ }
+
+ echo ' ';
+ echo '';
+ }elseif($image_only){
+ # image gallery
+ if (!function_exists('auto_thumb')){include('core/auto_thumb.php');}
+ global $gallery_thumbs_width;
+ $title=explode('/',$tree[$first]);$title=$title[count($title)-1];unset($tree[$first]);
+ echo ' ';
+ echo ''.$title.' ';
+
+ foreach($tree as $id=>$image){
+ if (is_file($image)){
+ $link='index.php?f='.$id;
+ $file=_basename($image);
+ $filesize = sizeconvert(filesize($image));
+ $ext=strtolower(pathinfo($image,PATHINFO_EXTENSION));
+ if ($ext!='mp4'){
+ $size = getimagesize($image);
+ $size=$size[0].'x'.$size[1];
+ auto_thumb($image,$width=$gallery_thumbs_width,$height=$gallery_thumbs_width,$add_to_thumb_filename='_THUMBGALLERY_',$crop_image=true);
+ echo ''.$file.' '.$size.' '.$filesize.' ';
+
+ }else{
+ $size = sizeconvert(filesize($image));
+ echo ''.$file.' '.$size.' ';
+ }
+ }
+ }
+ echo ' ';
+ echo '
+
+ ';
+
+ }elseif($sound_only){
+ # music player
+ $title=explode('/',$tree[$first]);$title=$title[count($title)-1];unset($tree[$first]);
+
+ echo ''.$title.' ';
+ echo '';
+ echo ' ';
+ echo '';
+ $mult=3;
+ for ($vol=1;$vol<11;$vol++){
+ if ($vol<10){echo ' ';}
+ else{echo ' ';}
+
+ }
+
+ echo '
';
+
+ foreach($tree as $id=>$sound){
+ if (is_file($image)){
+ $link='index.php?f='.$id;
+ $file=_basename($sound);
+ $ext=strtolower(pathinfo($sound,PATHINFO_EXTENSION));
+ $size = sizeconvert(filesize($sound));
+ echo ''.$file.' '.$size.' ';
+ }
+ }
+ echo ' ';
+ echo '
+
+ ';
+ }
+ }
+
+ /*function template($key,$array){
+ global $templates;
+ if (isset($templates[$key])){
+ $tpl= str_replace(array_keys($array),array_values($array),$templates[$key]);
+ return $tpl;
+ }else{return false;}
+ }*/
+ function template($key,$array){
+ global $templates;
+
+ if (isset($templates[$key])){
+ $tpl=$templates[$key];
+ foreach($array as $key=>$value){
+ $tpl= str_replace($key,$value,$tpl);
+ }
+ return $tpl;
+ }else{return false;}
+ }
+
+ function navigatorLanguage(){
+ if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
+ $language = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
+ return $language{0}.$language{1};
+ }else{return 'fr';}
+ }
+
+
+
+ # locales functions
+ function e($txt,$echo=true){
+ global $lang;
+ if (isset($lang[$txt])){$t= $lang[$txt];}else{$t= $txt;}
+ if ($echo){echo $t;}else{return $t;}
+ }
+ function available_languages(){
+ $l=_glob('locale/','php');
+ foreach($l as $key=>$lang){
+ $l[$key]=str_replace('.php','',_basename($lang));
+ }
+
+ return $l;
+ }
+ # Links functions
+ # create language links
+ function make_lang_link($pattern='#LANG '){
+ $langs=available_languages();
+ if (!empty($_GET['p'])){$page=$_GET['p'];}else{$page='';}
+ if(function_exists('returntoken')){$token=returnToken();}else{$token='';}
+ foreach($langs as $lang){
+ if ($_SESSION['language']==$lang){$class=' class="active'.$lang.'" ';}else{$class='class="'.$lang.'" ';}
+ echo str_replace(array('#CLASS','#LANG','#TOKEN','#PAGE'),array($class,$lang,$token,$page),$pattern);
+ }
+
+ }
+
+ # create the connection/admin button
+ function make_connect_link($label_admin=' ',$label_logout=' ',$label_login=' '){
+ $status='';
+ if (is_user_connected()){
+ if (!empty($_SESSION['login'])&&$label_admin==' '){$label_admin= $_SESSION['login'];}
+ if (!empty($_SESSION['status'])){$status= $_SESSION['status'];}
+ if(function_exists('returntoken')){$token=returnToken();}else{$token='';}
+ echo ' '.$label_admin.' ';
+ echo ' ';
+
+ }
+ else{echo ' ';}
+ }
+
+ # create the menu link (to change view)
+ function make_menu_link($pattern=''){
+ if(function_exists('returntoken')){$token=returnToken();}else{$token='';}
+ if (!empty($_GET['p'])){$page=$_GET['p'];}else{$page='';}
+ if ($_SESSION['aspect']=='icon'){$class=' active';}else{$class='';}
+ echo str_replace(array('#MENU','#THEME','#TOKEN','#PAGE','#CLASS','#TITLE'),array('icon',THEME_PATH,$token,$page,$class,e('See as icon',false)),$pattern);
+ if ($_SESSION['aspect']=='list'){$class=' active';}else{$class='';}
+ echo str_replace(array('#MENU','#THEME','#TOKEN','#PAGE','#CLASS','#TITLE'),array('list',THEME_PATH,$token,$page,$class,e('See as file list',false)),$pattern);
+ }
+
+ # create the mode links (to change access mode)
+ function make_mode_link($pattern=' '){
+ if(function_exists('returntoken')){$token=returnToken();}else{$token='';}
+ if ($_SESSION['mode']=='view'){$class='active';}else{$class='';}
+ echo str_replace(array('#MODE','#TITLE','#TOKEN','#CLASS'),array('view',e('Manage files',false),$token,$class),$pattern);
+ if ($_SESSION['mode']=='links'){$class='active';}else{$class='';}
+ echo str_replace(array('#MODE','#TITLE','#TOKEN','#CLASS'),array('links',e('Manage links',false),$token,$class),$pattern);
+ }
+
+ # Checks auto_restrict's session vars to know if a user is connected
+ function is_user_connected(){
+ if (empty($_SESSION['id_user'])||empty($_SESSION['login'])||empty($_SESSION['expire'])){
+ return false;
+ }
+ return true;
+ }
+
+ # echo some classes depending on filemode, pages etc
+ function body_classes(){
+ if (isset($_GET['users_list'])){echo 'users_list ';}
+ if (!empty($_GET['p'])){echo $_GET['p'].' ';}else{echo 'home ';}
+ if (!empty($_SESSION['language'])){echo 'body_'.$_SESSION['language'].' ';}
+ if (!empty($_SESSION['mode'])){echo $_SESSION['mode'].' ';}
+ if (!empty($_SESSION['aspect'])&&empty($_GET['f'])){echo $_SESSION['aspect'].' ';}
+ }
+
+
+ # Users functions
+ # return the user's name hashed or the user's name corresponding to a hash
+ function hash_user($user_or_hash){
+ if (!is_file('private/auto_restrict_users.php')){return false;}
+ include ('private/auto_restrict_users.php');
+ if (strlen($user_or_hash)>100){
+ # hash > user
+ foreach ($auto_restrict['users'] as $user=>$data){
+ $hash=hash('sha512',$data['salt'].$user);
+ if ($hash==$user_or_hash){return $user;}
+ }
+
+ return false;
+ }else{
+ # user > hash
+ if (!empty($auto_restrict['users'][$user_or_hash])){
+ return hash('sha512',$auto_restrict['users'][$user_or_hash]['salt'].$user_or_hash);
+ }
+ return false;
+ }
+ }
+
+ # Check if current user is the id's owner
+ function is_owner($id=null){
+ if (!$id || empty($_SESSION['login']) || !$f=id2file($id)){return false;}
+ $file=explode('/',$f);$owner=$file[1];
+ return $_SESSION['login']==$owner;
+ }
+ # Return id's owner
+ function return_owner($id=null){
+ if (!$id){return false;}
+ $file=explode('/',id2file($id));
+ if (!empty($file[1])){$owner=$file[1];}
+ else{$owner=e('Deleted',false);}
+
+ return $owner;
+ }
+
+ function is_allowed($action,$profile=null){
+ global $RIGHTS;
+ if (!is_user_connected()){return false;}
+ if (!isset($RIGHTS)){return false;}
+ if (!$profile&&!empty($_SESSION['status'])){$profile=$_SESSION['status'];}elseif (!$profile){return false;}
+ if ($profile=='superadmin'){return true;}
+ if (isset($RIGHTS[$profile][$action])){return true;}else{return false;}
+ }
+ /*
+ function is_admin(){
+ global $auto_restrict;
+ if (empty($_SESSION['login'])){return false;}
+ if (!empty($_SESSION['status'])){
+ if ($_SESSION['status']=='admin'||$_SESSION['status']=='superadmin'){return true;}
+ }else{
+ $first=first($auto_restrict['users']);
+ if ($_SESSION['login']==$first['login']){return true;}
+ if (isset($auto_restrict['users'][$_SESSION['login']]['status'])&&$auto_restrict['users'][$_SESSION['login']]['status']=='admin'){return true;}
+ }
+ return false;
+ }*/
+ function is_superadmin(){if (!empty($_SESSION['status'])&&$_SESSION['status']=='superadmin'){return true;}return false;}
+ function load_users_list(){
+ global $auto_restrict;
+ if (empty($auto_restrict["users"])){
+ $auto_restrict_users=$_SESSION['private_folder'].'auto_restrict_users.php';
+ if (!is_file($auto_restrict_users)){return false;}
+ include($auto_restrict_users);
+ }
+ return $auto_restrict["users"];
+ }
+
+ # Complete users rights
+ function complete_users_rights($users_rights=null){
+ global $auto_restrict,$default_profile_folder_max_size;
+ $save=false;
+ $users=$auto_restrict["users"];
+ if (empty($users)){return false;}
+ if (!$users_rights){$users_rights=load_users_rights();}
+ foreach ($users as $key=>$user){ # add missing
+ if (!isset($users_rights[$user['login']])){
+ $users_rights[$user['login']]=$default_profile_folder_max_size;
+ $save=true;
+ }
+ }
+ foreach ($users_rights as $user=>$size){ # remove deleted profiles
+ if (!isset($users[$user])){
+ unset($users_rights[$user]);
+ $save=true;
+ }
+ }
+ if ($save){save_users_rights($users_rights);}
+ return $users_rights;
+ }
+
+ # creates a form with the users list
+ function generate_users_folder_space_formlist($text='Check users to delete account and files'){
+ global $auto_restrict,$default_profile_folder_max_size;
+ $users_rights=complete_users_rights();
+ echo ''.$text.' ';
+ }
+
+
+ # Folder functions
+ # folder_size % functions
+ function sizeconvert( $bytes ){
+ $label = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB' );
+ for( $i = 0; $bytes >= 1024 && $i < ( count( $label ) -1 ); $bytes /= 1024, $i++ );
+ return( round( $bytes, 2 ) . " " . $label[$i] );
+ }
+ function folder_size($folder,$convert=true){
+ $tree=tree($folder,null,false,true);$size=0;
+ foreach($tree as $branch){
+ if (is_file(($branch))){$size+=filesize($branch);}
+ }
+ if ($convert){return sizeconvert($size);}
+ return $size;
+ }
+ function folder_free($folder,$mode=false){
+ if (empty($_SESSION['profile_folder_max_size'])){return false;}
+ $max=($_SESSION['profile_folder_max_size']*1048576);
+ $size=round($max-strval(folder_size($folder,false)),2);
+ if ($size<=0){return false;}
+ if (!$mode){ # converted size
+ return sizeconvert($size);
+ }elseif ($mode=1){ # oct
+ return $size;
+ }else{ # %
+ return round((100*$size)/$max,1);
+ }
+ }
+ function folder_fit($file=null,$size=null,$profile=null){
+ if (!$file&&!$size||!$profile){return false;}
+ $is_admin=is_superadmin();
+ if (empty($_SESSION['profile_folder_max_size'])&&!$is_admin){return false;}
+ $folder=$_SESSION['upload_root_path'].$profile;
+ $max=$_SESSION['profile_folder_max_size']*1048576;
+ if (!empty($file)){
+ if (!is_file($file)){return false;}
+ $size=filesize($file);
+ }
+ if (folder_size($folder,false)+$size>$max&&!$is_admin){return false;}
+ return true;
+ }
+
+ function folder_usage_draw($profile,$mode=1){
+
+ $folder=$_SESSION['upload_root_path'].$profile;
+ if (!is_dir($folder)){return false;}
+ if (empty($_SESSION['profile_folder_max_size'])){return false;}
+ if (is_admin()){return false;}
+ $free=folder_free($folder,1);
+ $user_size=$_SESSION['profile_folder_max_size']*1048576;
+ $used=round($user_size-$free,1);
+ $usedpc=round($used*100/$user_size,1);
+ $freepc=round($free*100/$user_size,1);
+ if (empty($free)){$free=0;}
+
+ if ($mode==1){echo ''.$usedpc.'% '.$freepc.'%
';}
+ if ($mode==2){echo '
';}
+ if ($mode==3){echo ''.$freepc.'% '.e('free',false).' ('.sizeconvert($free).')
';}
+ }
+
+ function draw_lb_link($file,$alt=null,$text_link=' ',$group='',$type='iframe'){
+ if(@is_array(getimagesize($file))){$type='img';}
+ if (!empty($group)){$group='data-group="'.$group.'"';}
+ echo ''.$text_link.' ';
+ }
+
+ function start_session(){if (!session_id()){session_start();}}
+
+ function extract_config_vars(){
+ preg_match_all("#\$([^';=]*?)=#", file_get_contents('config.php'), $vars);aff($vars);
+ $conf=array();
+ foreach($vars[1] as $index=>$varname){echo $varname;
+ if (!isset($$varname)){global $$varname;}
+ $conf[$$varname]=$$varname;
+ }
+ return $conf;
+ }
+
+
+
+
+ #################################################
+ # Debug functions
+ #################################################
+ function aff($var,$stop=true){
+ $dat=debug_backtrace();$origin='';
+ echo 'Arret ligne '.$dat[0]['line'].' dans le fichier '.$dat[0]['file'].'
';
+ echo '';var_dump($var);echo '
';
+ foreach (array_reverse($dat) as $data){
+ $dir=dirname($data['file']).'/';
+ $fil=_basename($data['file']);
+ $origin.=''.$dir.' '.$fil.' '.$data['function'].'() '.$data['line'].' ';
+ }
+ $origin.='
';
+ echo ''.$origin.'
';
+ if ($stop){exit();}
+ }
+ function li($string){echo ''.$string.' ';}
+ function debug_log($str){file_put_contents('debug.html', $str,FILE_APPEND);}
+ function chrono($name='chrono',$delete=false){
+ if ($delete){@unlink('debug.html');}
+ global $debug_mode;
+ if (!$debug_mode){return false;}
+ if (!isset($_SESSION[$name])){$_SESSION[$name]=microtime(true);}
+ else{
+ $count=round(microtime(true)-$_SESSION[$name],2);
+ if ($count<1){$color='lightgreen';$color2='black';}
+ if ($count>1&&$count<=2){$color='yellow';$color2='maroon';}
+ if ($count>2&&$count<=5){$color='orange';$color2='maroon';}
+ if ($count>5){$color='red';$color2='pink';}
+ $debug= ' '.date('h:i:s').' '.$name.':'.$count.'sec '; unset($_SESSION[$name]);
+ $dat=debug_backtrace();
+ foreach (array_reverse($dat) as $data){
+ $dir=dirname($data['file']).'/';
+ $fil=_basename($data['file']);
+ $debug.= ''.$fil.' '.$data['function'].'() l.'.$data['line'].' ';
+ }
+ $debug.=' ';
+ debug_log($debug);
+ unset($_SESSION[$name]);
+ }
+
+ }
+?>
\ No newline at end of file
diff --git a/sources/core/core.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Z1w8`A3yi*9K0H?$%SyuFNQv@7n!+3s#
zo@3ti)8uLH@p&r=#`m5&U?kF3=f^jvoMqEdwD#Q
z(YQ(NU|+-F7^U&Nc>4Glszdi!vst$F4QjcLNmcUp*Wml9@cneS2-#;TH`O9_pk2CF
z>p7X%@2N^n>Nl|5S5c;kd;V;BV?TB`-)bm^5ovTZo_= 0)
+ classes.splice(existingIndex, 1)
+ else
+ classes.push(cl);
+ el.className = classes.join(' ')
+ }
+ }
+ function _acl(el,cl){
+ if (el.classList){ el.classList.add(cl);}
+ else {el.className += ' ' + cl; }
+ }
+ function _rcl(el,cl){
+ if (el.classList)
+ el.classList.remove(cl)
+ else
+ el.className = el.className.replace(new RegExp('(^| )' + cl.split(' ').join('|') + '( |$)', 'gi'), ' ')
+ }
+ function _adev(obj,ev,funct){if (obj.addEventListener){obj.addEventListener(ev, funct);}}
+ function _tglval(valToTgl,val1,val2){if (valToTgl==val1){return val2;}else{return val1;}}
+
+
+ // parcours du DOM ----------------------------------------------------
+ function all(tag){return document.querySelectorAll(tag);}
+ function first(tag){return document.querySelector(tag);}
+ function allIn(obj,selector){
+ obj=_(obj,1);if (!obj){return false}
+ return obj.querySelectorAll(selector);
+ }
+ function firstIn(obj,selector){
+ obj=_(obj,1);if (!obj){return false}
+ if (selector) {return obj.querySelector(selector);}else{return obj.children[0];}
+ }
+ function lastIn(obj,selector){
+ if (typeof obj=='string'){obj=first(obj);}
+ if (!obj){return false}
+ if (selector) {
+ childs=obj.querySelectorAll(selector);
+ if (!childs){return false;}
+ if (!childs.length){return childs;}
+ return childs[childs.length-1];
+ }else{return obj.lastElementChild;}
+ }
+ function parent(obj,degree){
+ obj=_(obj,1);if (!obj){return false}
+ if (!degree||degree==1){return obj.parentNode;}
+ else{
+ for (i=1;i<=degree;i++){
+ obj=obj.parentNode;
+ console.log(obj.getAttribute('class'))
+ }
+ return obj;
+ }
+
+ }
+ function next(obj){
+ obj=_(obj,1);if (!obj){return false}
+ return obj.nextElementSibling;
+ }
+
+
+
+ // contenu ----------------------------------------------------
+ function remove(obj,callback){
+ obj=_(obj);if (!obj){return false}
+ if (!obj.length){obj.parentNode.removeChild(obj);return true;}
+ if (obj.length){
+ [].forEach.call(obj, function(el) {el.parentNode.removeChild(el);});
+ }
+ if (callback) {callback();}
+ }
+ function prepend(obj,content,callback){
+ obj=_(obj);if (!obj){return false}
+ if (!obj.length){obj.innerHTML=content+obj.innerHTML;return true;}
+ if (obj.length){
+ [].forEach.call(obj, function(el) {el.innerHTML=content+el.innerHTML;});
+ }
+ if (callback) {callback();}
+ }
+ function append(obj,content,callback){
+ obj=_(obj);if (!obj){return false}
+ if (!obj.length){obj.innerHTML+=content;return true;}
+ if (obj.length){
+ [].forEach.call(obj, function(el) {el.innerHTML+=content;});
+ }
+ if (callback) {callback();}
+ }
+ function before(obj, content,callback){
+ obj=_(obj);if (!obj){return false}
+ if (!obj.length){obj.insertAdjacentHTML('beforebegin', content);return true;}
+ if (obj.length){
+ [].forEach.call(obj, function(el) {el.insertAdjacentHTML('beforebegin', content);});
+ }
+ if (callback) {callback();}
+ }
+ function after(obj, content,callback){
+ obj=_(obj);if (!obj){return false}
+ if (!obj.length){obj.insertAdjacentHTML('afterend', content);return true;}
+ if (obj.length){
+ [].forEach.call(obj, function(el) {el.insertAdjacentHTML('afterend', content);});
+ }
+ if (callback) {callback();}
+ }
+ function clear(obj,callback){
+ obj=_(obj);if (!obj){return false}
+ if (!obj.length){obj.innerHTML='';return true;}
+ if (obj.length){
+ [].forEach.call(obj, function(el) {el.innerHTML='';});
+ }
+ if (callback) {callback();}
+ }
+
+
+
+ // Ajax ----------------------------------------------------
+ function ajax(url,data,method,target,callback){
+ if (!target){target ='';}
+ if (!method){method='GET';}
+ if (!data){data='';}
+ // Envoi de la requête
+ request = new XMLHttpRequest;
+ request.open(method, url, true);
+ if (method=='POST'){request.setRequestHeader("Content-type","application/x-www-form-urlencoded");}
+ request.send(data);
+
+ // Gestion de la réponse du serveur
+ request.onreadystatechange=function(){
+ if (request.readyState==4 && request.status==200){
+ rep=request.responseText;
+ if (target){
+ if (typeof target=='string'){target=all(target);}
+ if (!target.length){target.innerHTML=rep;return true;}
+ if (target.length){ [].forEach.call(target, function(el) {el.innerHTML=rep;}); }
+ }else{return rep;}
+
+ }
+ }
+ if (callback) {callback();}
+ }
+ function onProgress(e) {
+ var percentComplete = (e.position / e.totalSize)*100;
+ return percentComplete;
+ }
+
+ function appendAjax(url,data,method,target,onload){
+ if (!target){target ='';}
+ if (!method){method='GET';}
+ if (!data){data='';}
+ // Envoi de la requête
+ request = new XMLHttpRequest;
+ request.onprogress=onProgress;
+ request.onload=onload;
+ request.onerror=function(){return 'Error loading !';}
+ request.open(method, url, true);
+ if (method=='POST'){request.setRequestHeader("Content-type","application/x-www-form-urlencoded");}
+ request.send(data);
+
+ // Gestion de la réponse du serveur
+ request.onreadystatechange=function(){
+ if (request.readyState==4 && request.status==200){
+ rep=request.responseText;
+ if (target){
+ if (typeof target=='string'){target=all(target);}
+ append(target,rep);
+
+ return true;
+ }else{
+
+ return rep;
+ }
+
+ }
+ }
+
+ }
+ function get(url){
+ request = new XMLHttpRequest();request.open('GET', url, true);request.send();
+ request.onreadystatechange=function(){
+ if (request.readyState==4 && request.status==200){return request.responseText;}
+ }
+ }
+ function post(url){
+ request = new XMLHttpRequest();request.open('POST', url, true);request.send();
+ request.onreadystatechange=function(){
+ if (this.readyState==4){return request.responseText;}
+ }
+ }
+
+ // Classes ----------------------------------------------------
+ function addClass(obj,classname,callback){
+ obj=_(obj);if (!obj){return false}
+ if (!obj.length){_acl(obj,classname);return true;}
+ if (obj.length){
+ [].forEach.call(obj, function(el) {_acl(el,classname);});
+ }
+ if (callback) {callback();}
+ }
+ function removeClass(obj,classname,callback){
+ obj=_(obj);if (!obj){return false}
+ if (!obj.length){_rcl(obj,classname);return true;}
+ if (obj.length){
+ [].forEach.call(obj, function(el) {_rcl(el,classname);});
+ }
+ if (callback) {callback();}
+ }
+ function toggleClass(obj,classname,callback){
+ obj=_(obj);if (!obj||obj.length==0){return false}
+ if (!obj.length){_tcl(obj,classname);}
+ if (obj.length){
+ [].forEach.call(obj, function(el) {_tcl(el,classname)});
+ }
+ if (callback){callback();}
+ }
+ function hasClass(obj,classname,callback){
+ obj=_(obj,1);if (!obj){return false}
+ return obj.className && new RegExp("(\\s|^)" + classname + "(\\s|$)").test(obj.className);
+ }
+
+ // visibilité ----------------------------------------------------
+ function show(obj){
+ obj=_(obj);if (!obj){return false}
+ if (!obj.length){obj.style.display ='';}
+ if (obj.length){
+ [].forEach.call(obj, function(el) {el.style.display ='';});
+ }
+ if (callback) {callback();}
+ }
+ function hide(obj,callback){
+ obj=_(obj);if (!obj){return false}
+ if (!obj.length){obj.style.display ='none';}
+ if (obj.length){
+ [].forEach.call(obj, function(el) {el.style.display ='none';});
+ }
+ if (callback) {callback();}
+ }
+ function toggle(obj,callback){
+ obj=_(obj);if (!obj){return false}
+ if (!obj.length){obj.style.display=_tglval(obj.style.display, 'none' ,'');}
+ if (obj.length){
+ [].forEach.call(obj, function(el) {el.style.display=_tglval(el.style.display, 'none' ,'');});
+ }
+ if (callback) {callback();}
+ }
+ function fadeTo(obj,opacity,callback){return style(obj,'opacity:'+opacity+';');}
+
+
+ // attributs ----------------------------------------------------
+ function attr(obj,attr,value){
+ obj=_(obj);if (!obj){return false}
+ if (!obj.length){
+ if (value){obj.setAttribute(attr,value);}
+ else{
+ return obj.getAttribute(attr);
+ }
+ }
+ if (obj.length){
+ if (value){
+ [].forEach.call(obj, function(el) {el.setAttribute(attr,value);});
+ }else{return obj[0].getAttribute(attr);}
+ }
+ }
+ function removeAttr(obj,attr,value){
+ obj=_(obj);if (!obj){return false}
+ [].forEach.call(obj, function(el) {el.removeAttribute(attr,value);});
+ }
+ function style(obj,css,callback){return attr(obj,'style',css); }
+ function id(obj){return attr(obj,'id');}
+ function href(obj){return attr(obj,'href');}
+
+
+
+ // Evènement ----------------------------------------------------
+ function on(ev,obj,funct,callback){
+ obj=_(obj);
+ if (!obj){obj=window.document;}
+ if (!obj[0]){_adev(obj,ev,funct);}
+ else{[].forEach.call(obj, function(el) {_adev(el,ev,funct);});}
+ if (callback) {callback();}
+ }
+ function onDomChange(funct,callback){on("DOMSubtreeModified",'',funct);if (callback) {callback();} }
+
+ // divers ----------------------------------------------------
+ function isInViewport(obj) {
+ obj=_(obj,1);if (!obj){return false}
+ var rect = obj.getBoundingClientRect();
+ var html = document.documentElement;
+ return (
+ rect.top >= 0 &&
+ rect.left >= 0 &&
+ rect.bottom <= (window.innerHeight || html.clientHeight) &&
+ rect.right <= (window.innerWidth || html.clientWidth)
+ );
+ }
+ function each(obj,funct,callback){
+ obj=_(obj);if (!obj){return false}
+ if (obj.length){Array.prototype.forEach.call(obj,funct);}
+ if (callback) {callback();}
+ }
+ function numVal(obj){
+ obj=_(obj,1);if (!obj){return false}
+ if (val=attr(obj,"value")){return parseInt(val);}else{return parseInt(obj.innerHTML);}
+ }
+ function value(obj){
+ obj=_(obj,1);if (!obj){return false}
+ if (val=attr(obj,"value")){return val;}else{return obj.innerHTML;}
+ }
+
+function refresh(){location.reload();}
+
+
+
diff --git a/sources/core/js/audio.js b/sources/core/js/audio.js
new file mode 100644
index 0000000..e5fde2b
--- /dev/null
+++ b/sources/core/js/audio.js
@@ -0,0 +1,24 @@
+(function(h,o,g){var p=function(){for(var b=/audio(.min)?.js.*/,a=document.getElementsByTagName("script"),c=0,d=a.length;c ',settings:{autoplay:false,loop:false,preload:true,imageLocation:p+"player-graphics.gif",swfLocation:p+"audiojs.swf",useFlash:function(){var b=document.createElement("audio");return!(b.canPlayType&&b.canPlayType("audio/mpeg;").replace(/no/,""))}(),hasFlash:function(){if(navigator.plugins&&navigator.plugins.length&&navigator.plugins["Shockwave Flash"])return true;else if(navigator.mimeTypes&&navigator.mimeTypes.length){var b=
+navigator.mimeTypes["application/x-shockwave-flash"];return b&&b.enabledPlugin}else try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");return true}catch(a){}return false}(),createPlayer:{markup:' 00:00 /00:00
',
+playPauseClass:"play-pause",scrubberClass:"scrubber",progressClass:"progress",loaderClass:"loaded",timeClass:"time",durationClass:"duration",playedClass:"played",errorMessageClass:"error-message",playingClass:"playing",loadingClass:"loading",errorClass:"error"},css:' .audiojs audio { position: absolute; left: -1px; } .audiojs { width: 460px; height: 36px; background: #404040; overflow: hidden; font-family: monospace; font-size: 12px; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #444), color-stop(0.5, #555), color-stop(0.51, #444), color-stop(1, #444)); background-image: -moz-linear-gradient(center top, #444 0%, #555 50%, #444 51%, #444 100%); -webkit-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); -moz-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); -o-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); } .audiojs .play-pause { width: 25px; height: 40px; padding: 4px 6px; margin: 0px; float: left; overflow: hidden; border-right: 1px solid #000; } .audiojs p { display: none; width: 25px; height: 40px; margin: 0px; cursor: pointer; } .audiojs .play { display: block; } .audiojs .scrubber { position: relative; float: left; width: 280px; background: #5a5a5a; height: 14px; margin: 10px; border-top: 1px solid #3f3f3f; border-left: 0px; border-bottom: 0px; overflow: hidden; } .audiojs .progress { position: absolute; top: 0px; left: 0px; height: 14px; width: 0px; background: #ccc; z-index: 1; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ccc), color-stop(0.5, #ddd), color-stop(0.51, #ccc), color-stop(1, #ccc)); background-image: -moz-linear-gradient(center top, #ccc 0%, #ddd 50%, #ccc 51%, #ccc 100%); } .audiojs .loaded { position: absolute; top: 0px; left: 0px; height: 14px; width: 0px; background: #000; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #222), color-stop(0.5, #333), color-stop(0.51, #222), color-stop(1, #222)); background-image: -moz-linear-gradient(center top, #222 0%, #333 50%, #222 51%, #222 100%); } .audiojs .time { float: left; height: 36px; line-height: 36px; margin: 0px 0px 0px 6px; padding: 0px 6px 0px 12px; border-left: 1px solid #000; color: #ddd; text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5); } .audiojs .time em { padding: 0px 2px 0px 0px; color: #f9f9f9; font-style: normal; } .audiojs .time strong { padding: 0px 0px 0px 2px; font-weight: normal; } .audiojs .error-message { float: left; display: none; margin: 0px 10px; height: 36px; width: 400px; overflow: hidden; line-height: 36px; white-space: nowrap; color: #fff; text-overflow: ellipsis; -o-text-overflow: ellipsis; -icab-text-overflow: ellipsis; -khtml-text-overflow: ellipsis; -moz-text-overflow: ellipsis; -webkit-text-overflow: ellipsis; } .audiojs .error-message a { color: #eee; text-decoration: none; padding-bottom: 1px; border-bottom: 1px solid #999; white-space: wrap; } .audiojs .play { background: url("$1") -2px -1px no-repeat; } .audiojs .loading { background: url("$1") -2px -31px no-repeat; } .audiojs .error { background: url("$1") -2px -61px no-repeat; } .audiojs .pause { background: url("$1") -2px -91px no-repeat; } .playing .play, .playing .loading, .playing .error { display: none; } .playing .pause { display: block; } .loading .play, .loading .pause, .loading .error { display: none; } .loading .loading { display: block; } .error .time, .error .play, .error .pause, .error .scrubber, .error .loading { display: none; } .error .error { display: block; } .error .play-pause p { cursor: auto; } .error .error-message { display: block; }',
+trackEnded:function(){},flashError:function(){var b=this.settings.createPlayer,a=j(b.errorMessageClass,this.wrapper),c='Missing flash player plugin.';if(this.mp3)c+=' Download audio file .';g[h].helpers.removeClass(this.wrapper,b.loadingClass);g[h].helpers.addClass(this.wrapper,b.errorClass);a.innerHTML=c},loadError:function(){var b=this.settings.createPlayer,a=j(b.errorMessageClass,this.wrapper);g[h].helpers.removeClass(this.wrapper,
+b.loadingClass);g[h].helpers.addClass(this.wrapper,b.errorClass);a.innerHTML='Error loading: "'+this.mp3+'"'},init:function(){g[h].helpers.addClass(this.wrapper,this.settings.createPlayer.loadingClass)},loadStarted:function(){var b=this.settings.createPlayer,a=j(b.durationClass,this.wrapper),c=Math.floor(this.duration/60),d=Math.floor(this.duration%60);g[h].helpers.removeClass(this.wrapper,b.loadingClass);a.innerHTML=(c<10?"0":"")+c+":"+(d<10?"0":"")+d},loadProgress:function(b){var a=this.settings.createPlayer,
+c=j(a.scrubberClass,this.wrapper);j(a.loaderClass,this.wrapper).style.width=c.offsetWidth*b+"px"},playPause:function(){this.playing?this.settings.play():this.settings.pause()},play:function(){g[h].helpers.addClass(this.wrapper,this.settings.createPlayer.playingClass)},pause:function(){g[h].helpers.removeClass(this.wrapper,this.settings.createPlayer.playingClass)},updatePlayhead:function(b){var a=this.settings.createPlayer,c=j(a.scrubberClass,this.wrapper);j(a.progressClass,this.wrapper).style.width=
+c.offsetWidth*b+"px";a=j(a.playedClass,this.wrapper);c=this.duration*b;b=Math.floor(c/60);c=Math.floor(c%60);a.innerHTML=(b<10?"0":"")+b+":"+(c<10?"0":"")+c}},create:function(b,a){a=a||{};return b.length?this.createAll(a,b):this.newInstance(b,a)},createAll:function(b,a){var c=a||document.getElementsByTagName("audio"),d=[];b=b||{};for(var e=0,i=c.length;ea.loadedPercent)){a.updatePlayhead.call(a,[c]);a.element.skipTo(c)}};a.updatePlayhead=function(c){a.settings.updatePlayhead.apply(a,[c])};a.play=function(){if(!a.settings.preload){a.settings.preload=true;a.element.init(a.mp3)}a.playing=true;a.element.pplay();a.settings.play.apply(a)};a.pause=function(){a.playing=false;a.element.ppause();a.settings.pause.apply(a)};a.setVolume=function(c){a.element.setVolume(c)};a.loadStarted=function(){a.swfReady=
+true;a.settings.preload&&a.element.init(a.mp3);a.settings.autoplay&&a.play.apply(a)}},injectFlash:function(b,a){var c=this.flashSource.replace(/\$1/g,a);c=c.replace(/\$2/g,b.settings.swfLocation);c=c.replace(/\$3/g,+new Date+Math.random());var d=b.wrapper.innerHTML,e=document.createElement("div");e.innerHTML=c+d;b.wrapper.innerHTML=e.innerHTML;b.element=this.helpers.getSwf(a)},helpers:{merge:function(b,a){for(attr in a)if(b.hasOwnProperty(attr)||a.hasOwnProperty(attr))b[attr]=a[attr]},clone:function(b){if(b==
+null||typeof b!=="object")return b;var a=new b.constructor,c;for(c in b)a[c]=arguments.callee(b[c]);return a},addClass:function(b,a){RegExp("(\\s|^)"+a+"(\\s|$)").test(b.className)||(b.className+=" "+a)},removeClass:function(b,a){b.className=b.className.replace(RegExp("(\\s|^)"+a+"(\\s|$)")," ")},injectCss:function(b,a){for(var c="",d=document.getElementsByTagName("style"),e=a.replace(/\$1/g,b.settings.imageLocation),i=0,f=d.length;i1?b[b.length-1]:b}},events:{memoryLeaking:false,listeners:[],addListener:function(b,a,c){if(b.addEventListener)b.addEventListener(a,c,false);else if(b.attachEvent){this.listeners.push(b);if(!this.memoryLeaking){window.attachEvent("onunload",function(){if(this.listeners)for(var d=0,e=this.listeners.length;d-1)d||b.init.apply(b);if(b.element.readyState>1){b.settings.autoplay&&b.play.apply(b);clearInterval(a);c=setInterval(function(){b.loadProgress.apply(b);b.loadedPercent>=1&&clearInterval(c)})}},10);b.readyTimer=a;b.loadTimer=c}},purge:function(b){var a=b.attributes,c;if(a)for(c=0;cthis.loadedPercent)){this.element.currentTime=this.duration*b;this.updatePlayhead()}},load:function(b){this.loadStartedCalled=false;this.source.setAttribute("src",b);this.element.load();this.mp3=b;g[h].events.trackLoadProgress(this)},
+loadError:function(){this.settings.loadError.apply(this)},init:function(){this.settings.init.apply(this)},loadStarted:function(){if(!this.element.duration)return false;this.duration=this.element.duration;this.updatePlayhead();this.settings.loadStarted.apply(this)},loadProgress:function(){if(this.element.buffered!=null&&this.element.buffered.length){if(!this.loadStartedCalled)this.loadStartedCalled=this.loadStarted();this.loadedPercent=this.element.buffered.end(this.element.buffered.length-1)/this.duration;
+this.settings.loadProgress.apply(this,[this.loadedPercent])}},playPause:function(){this.playing?this.pause():this.play()},play:function(){/(ipod|iphone|ipad)/i.test(navigator.userAgent)&&this.element.readyState==0&&this.init.apply(this);if(!this.settings.preload){this.settings.preload=true;this.element.setAttribute("preload","auto");g[h].events.trackLoadProgress(this)}this.playing=true;this.element.play();this.settings.play.apply(this)},pause:function(){this.playing=false;this.element.pause();this.settings.pause.apply(this)},
+setVolume:function(b){this.element.volume=b},trackEnded:function(){this.skipTo.apply(this,[0]);this.settings.loop||this.pause.apply(this);this.settings.trackEnded.apply(this)}};var j=function(b,a){var c=[];a=a||document;if(a.getElementsByClassName)c=a.getElementsByClassName(b);else{var d,e,i=a.getElementsByTagName("*"),f=RegExp("(^|\\s)"+b+"(\\s|$)");d=0;for(e=i.length;d1?c:c[0]}})("audiojs","audiojsInstance",this);
diff --git a/sources/core/js/audiojs.swf b/sources/core/js/audiojs.swf
new file mode 100644
index 0000000000000000000000000000000000000000..483599fc8273d0ccaaa935aa115a65e05ffe27ec
GIT binary patch
literal 1644
zcmV-y29x<|i+I>}9ZyU!Io|(N2xxDB?iMA-oqAl4<6iTFI$B7h~i6YUC
zRM{(t3J?S^%+c{MW6dGj0))A=xcx$#VP^P_dew}^u;~1OWo3(X)2B&S4o$y7=
zVL^AjeghOap&dHBxnX*Ty!z7NXVqubjhp-gok9fIylJ#~YfL7xmkh60@B5w^8PJmj
zR7vvf6hYCC4jnt_a=#h5$F6spmbi%ujNx+@dUp|5F|qD2_b6gVyxDq_tX=y_k1XWP
zEpAko8@1|6W4V#GA)@Q`->5x^zy>za*6^>=I@%;3K79CIlVFEc_{#Y2O_Y58@TbLp
z)L_Sd)L3NN-VXu#>)4MJAqXMMXFa}*hS3rt;J(QvN-y=eX|sIWi(GTF%UqW`NIvmw
zGoLQ=6R~^Rf!*VNOW1`y-#hYo5G0=34t?7_%5Uo}-}h34`X=ffa$iXtI%uSj(wTP9
zci6ew?)!GgGw+PFq!NhwO43EfjQnIScwwCoDBM
zw)+R3mbBV(O>P$3`nPYk-fily_jX$ctzl-G$;`WU5OSCM0||q3aC@0HHzFAN953XU
z<9MfAUXR(X?0a6QiOOP9%Y!M!K84&59u5xg&B5JhKdrAc8qe#8k?n-GJ9bCZwN%u(
zyTPsWzkc`wH^NO1UTPa!o4E_xcA+3MLi>cLz{&qZGIjf8tR)kRbru@%YN#m&FBJ!<
zGhlX^GtwFuNhymNJO^@Zf)a9u*uqy|l*U#+j>#z1(?RLrMJ@16y*^q47lgmTx+x^{r{`-grVP;!@
z*V^CL_mzX~*R6de5S6tM%0PRGp;i6ji6G`hco4RIO6=Aypqyb(X4g
zlsu;73C(;&$pR&xP*S60F6Is%DhzWhODo
zPGO`?W0ZRUR5KX35H8}ZjDZg0Oje2;uONh>rW!Y5EB6g_B*8|Efp^Jr5b0#BYHZEu
z4+$V88IT^Vy&Ze}Z#;)~#z?mmZ==qm+Q<4VjyrSKW9x}EU;FfZcc}AGZ92B@>mL)a
z9>mr}YCVdr>C{?{t;y6{i>;~DnvJaoi4|KzwJ+Z53mD4ElAP6E#Er{Q4WZZ?w?2u6
zWnm3R(Jw#6R`DYG=g)Jv2(dXVOjHEnQjW>@KkEykcSVu1+J>0Rs$E)(v6Z)$E-qLR
zY=~R{(KQ2@s93sUn0hZtJpPql=nE1MsRRVd2qJw#bVp_I9U<*s#E<*3;OkfY7&+gj4EB*0b0ur;h$9
zf|?nzNyWI4b~rQ8DJ#MDOh6~V0OGuSj-l8SHgcV&5dcgk01#1>O?sVAA$0-CiNjD9
z(~OM5k&N{zlxVF_iq*WRTT5mYiJ;5np9RgxC>+h(Wz(Fp$SK_Eb$ifjk-!0*jT;=e.left&&g.bottom>=e.top&&g.left<=e.right&&g.top<=e.bottom||n(d,b.options.successClass))b.load(d),c.elements.splice(a,1),c.count--,a--}0===c.count&&b.destroy()}function q(b,c,a){if(!n(b,a.successClass)&&(c||a.loadInvisible||0=window.screen.width)return p=a.src,!1});k(a)}});
\ No newline at end of file
diff --git a/sources/core/js/lightbox.js b/sources/core/js/lightbox.js
new file mode 100644
index 0000000..cc3f45d
--- /dev/null
+++ b/sources/core/js/lightbox.js
@@ -0,0 +1,72 @@
+/*
+ Minimalist Lightbox by Bronco (bronco@warriordudimanche.net)
+*/
+var lb_hide=function(){
+ var lb_nav=document.getElementById("lb_nav");
+ var lb_overlay=document.getElementById("lb_overlay");
+
+ lb_overlay.style.height=0;
+ lb_overlay.style.opacity=0;
+ lb_nav.style.height=0;
+ lb_nav.style.opacity=0;
+ event.preventDefault();
+ event.stopPropagation();
+}
+
+var lb_show=function(obj){
+ var lb_overlay=document.getElementById("lb_overlay");
+ var lb_content=document.getElementById("lb_content");
+ var lb_img=document.getElementById("lb_img");
+ var lb_info=document.getElementById("lb_content-info");
+ var lb_nav=document.getElementById("lb_nav");
+ var lb_prev=document.getElementById("lb_prev");
+ var lb_next=document.getElementById("lb_next");
+ var type=obj.getAttribute("data-type");
+ var path=obj.getAttribute("href");
+ var alt=obj.getAttribute("alt");
+ var group=obj.getAttribute("data-group");
+ if (group==null&&path!="prev"&&path!="next"){
+ lb_prev.style.display="none";
+ lb_next.style.display="none";
+ }else{
+ group_set=document.querySelectorAll("a[data-group="+group+"]");
+ if (group_set.length>0){
+ for (var index=0; index0){
+ prev=group_set[index-1];
+ lb_prev.style.display="block";
+ lb_next.setAttribute("style","margin-left:0");
+ }else{
+ prev=null;
+ lb_prev.setAttribute("style","display:none;");
+ lb_next.setAttribute("style","margin-left:32px");
+ }
+ if (index[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]||""});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&(cap[1]==="pre"||cap[1]==="script"||cap[1]==="style"),text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.text(escape(this.smartypants(cap[0])));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){if(!this.options.mangle)return text;var out="",l=text.length,i=0,ch;for(;i.5){ch="x"+ch.toString(16)}out+=""+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return""+(escaped?code:escape(code,true))+"\n
"}return''+(escaped?code:escape(code,true))+"\n
\n"};Renderer.prototype.blockquote=function(quote){return"\n"+quote+" \n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"\n"};Renderer.prototype.hr=function(){return this.options.xhtml?" \n":" \n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+""+type+">\n"};Renderer.prototype.listitem=function(text){return""+text+" \n"};Renderer.prototype.paragraph=function(text){return""+text+"
\n"};Renderer.prototype.table=function(header,body){return"\n"+"\n"+header+" \n"+"\n"+body+" \n"+"
\n"};Renderer.prototype.tablerow=function(content){return"\n"+content+" \n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+""+type+">\n"};Renderer.prototype.strong=function(text){return""+text+" "};Renderer.prototype.em=function(text){return""+text+" "};Renderer.prototype.codespan=function(text){return""+text+"
"};Renderer.prototype.br=function(){return this.options.xhtml?" ":" "};Renderer.prototype.del=function(text){return""+text+""};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='"+text+" ";return out};Renderer.prototype.image=function(href,title,text){var out=' ":">";return out};Renderer.prototype.text=function(text){return text};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i /g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occured:
"+escape(e.message+"",true)+" "}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}());
diff --git a/sources/core/js/micromarkdown.js b/sources/core/js/micromarkdown.js
new file mode 100644
index 0000000..ad19061
--- /dev/null
+++ b/sources/core/js/micromarkdown.js
@@ -0,0 +1,10 @@
+/* * * * * * * * * * * *
+ * micromarkdown .js *
+ * Version 0.3.4 *
+ * License: MIT *
+ * Simon Waldherr *
+ * * * * * * * * * * * */
+
+var micromarkdown={useajax:!1,regexobject:{headline:/^(\#{1,6})([^\#\n]+)$/m,code:/\s\`\`\`\n?([^`]+)\`\`\`/g,hr:/^(?:([\*\-_] ?)+)\1\1$/gm,lists:/^((\s*((\*|\-)|\d(\.|\))) [^\n]+)\n)+/gm,bolditalic:/(?:([\*_~]{1,3}))([^\*_~\n]+[^\*_~\s])\1/g,links:/!?\[([^\]<>]+)\]\(([^ \)<>]+)( "[^\(\)\"]+")?\)/g,reflinks:/\[([^\]]+)\]\[([^\]]+)\]/g,smlinks:/\@([a-z0-9]{3,})\@(t|gh|fb|gp|adn)/gi,mail:/<(([a-z0-9_\-\.])+\@([a-z0-9_\-\.])+\.([a-z]{2,7}))>/gim,tables:/\n(([^|\n]+ *\| *)+([^|\n]+\n))((:?\-+:?\|)+(:?\-+:?)*\n)((([^|\n]+ *\| *)+([^|\n]+)\n)+)/g,include:/[\[<]include (\S+) from (https?:\/\/[a-z0-9\.\-]+\.[a-z]{2,9}[a-z0-9\.\-\?\&\/]+)[\]>]/gi,url:/<([a-zA-Z0-9@:%_\+.~#?&\/=]{2,256}\.[a-z]{2,4}\b(\/[\-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)?)>/g,url2:/[ \t\n]([a-zA-Z]{2,16}:\/\/[a-zA-Z0-9@:%_\+.~#?&=]{2,256}.[a-z]{2,4}\b(\/[\-a-zA-Z0-9@:%_\+.~#?&\/\/=]*)?)[ \t\n]/g},codeblocks:{},parse:function(a,b){"use strict";var c,d,e,f,g,h,i,j,k,l,m,n=0,o=[],p=0,q=0,r=0,s="";for(a="\n"+a+"\n",b!==!0&&(micromarkdown.regexobject.lists=/^((\s*(\*|\d\.) [^\n]+)\n)+/gm),a=a.replace("$&","$&");null!==(m=micromarkdown.regexobject.code.exec(a));)s=micromarkdown.crc32(m[0]),micromarkdown.codeblocks[s]="\n"+micromarkdown.htmlEncode(m[1]).replace(/\n/gm," ").replace(/\ /gm," ")+"
\n",a=a.replace(m[0]," §§§"+s+"§§§ ");for(;null!==(m=micromarkdown.regexobject.headline.exec(a));)k=m[1].length,a=a.replace(m[0],""+m[2]+" \n");for(;null!==(m=micromarkdown.regexobject.lists.exec(a));){for(p=0,l="*"===m[0].trim().substr(0,1)||"-"===m[0].trim().substr(0,1)?"":"",h=m[0].split("\n"),i=[],d=0,g=!1,q=0;qn;)l+=i.pop(),d--,p--;for(;n>d;)"*"===c[0].trim().substr(0,1)||"-"===c[0].trim().substr(0,1)?(l+="")):(l+="",i.push(" ")),d++,p++;l+=""+c[6]+" \n"}for(;p>0;)l+=" ",p--;l+="*"===m[0].trim().substr(0,1)||"-"===m[0].trim().substr(0,1)?"":"",a=a.replace(m[0],l+"\n")}for(;null!==(m=micromarkdown.regexobject.tables.exec(a));){for(l="",h=m[1].split("|"),f=m[4].split("|"),q=0;q",'',' ',' '],q=0;q";for(l+=" ",e=["",' ',' ',' '],i=m[7].split("\n"),q=0;q",r=0;r";l+="\n"}l+="
",a=a.replace(m[0],l)}for(q=0;3>q;q++)for(;null!==(m=micromarkdown.regexobject.bolditalic.exec(a));)if(l=[],"~~"===m[1])a=a.replace(m[0],""+m[2]+"");else{switch(m[1].length){case 1:l=[""," "];break;case 2:l=[""," "];break;case 3:l=[""," "]}a=a.replace(m[0],l[0]+m[2]+l[1])}for(;null!==(m=micromarkdown.regexobject.links.exec(a));)a="!"===m[0].substr(0,1)?a.replace(m[0],' \n'):a.replace(m[0],"'+m[1]+" \n");for(;null!==(m=micromarkdown.regexobject.mail.exec(a));)a=a.replace(m[0],''+m[1]+" ");for(;null!==(m=micromarkdown.regexobject.url.exec(a));)l=m[1],-1===l.indexOf("://")&&(l="http://"+l),a=a.replace(m[0],"'+l.replace(/(https:\/\/|http:\/\/|mailto:|ftp:\/\/)/gim,"")+" ");for(;null!==(m=micromarkdown.regexobject.reflinks.exec(a));)i=new RegExp("\\["+m[2]+"\\]: ?([^ \n]+)","gi"),null!==(h=i.exec(a))&&(a=a.replace(m[0],"'+m[1]+" "),o.push(h[0]));for(q=0;q'+m[1]+"")}for(;null!==(m=micromarkdown.regexobject.url2.exec(a));)l=m[1],a=a.replace(m[0],"'+l+" ");for(;null!==(m=micromarkdown.regexobject.hr.exec(a));)a=a.replace(m[0],"\n \n");if(micromarkdown.useajax!==!1&&b!==!0)for(;null!==(m=micromarkdown.regexobject.include.exec(a));)if(h=m[2].replace(/[\.\:\/]+/gm,""),i="",document.getElementById(h)?i=document.getElementById(h).innerHTML.trim():micromarkdown.ajax(m[2]),"csv"===m[1]&&""!==i){for(j={";":[]," ":[],",":[],"|":[]},j[0]=[";"," ",",","|"],i=i.split("\n"),r=0;r0&&j[j[0][r]]!==!1&&(j[j[0][r]][q]!==j[j[0][r]][q-1]||1===j[j[0][r]][q])&&(j[j[0][r]]=!1);if(j[";"]!==!1||j[" "]!==!1||j[","]!==!1||j["|"]!==!1){for(j[";"]!==!1?j=";":j[" "]?j=" ":j[","]?j=",":j["|"]&&(j="|"),l="",q=0;q",r=0;r"+micromarkdown.htmlEncode(h[r])+"";l+=""}l+="
",a=a.replace(m[0],l)}else a=a.replace(m[0],""+i.join("\n")+"
")}else a=a.replace(m[0],"");a=a.replace(/ {2,}[\n]{1,}/gim," "),a=a.replace(/[\n]{2,}/gim," ");for(var t in micromarkdown.codeblocks)micromarkdown.codeblocks.hasOwnProperty(t)&&(a=a.replace("§§§"+t+"§§§",micromarkdown.codeblocks[t]));return a=a.replace("$&","$&")},ajax:function(a){"use strict";var b;if(document.getElementById(a.replace(/[\.\:\/]+/gm,"")))return!1;if(window.ActiveXObject)try{b=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){return b=null,c}else b=new XMLHttpRequest;b.onreadystatechange=function(){if(4===b.readyState){var c=document.createElement("code");c.innerHTML=b.responseText,c.id=a.replace(/[\.\:\/]+/gm,""),c.style.display="none",document.getElementsByTagName("body")[0].appendChild(c),micromarkdown.useajax()}},b.open("GET",a,!0),b.setRequestHeader("Content-type","application/x-www-form-urlencoded"),b.send()},crc32:function(a){"use strict";var b,c,d,e,f=0,g=["00000000","77073096","EE0E612C","990951BA","076DC419","706AF48F","E963A535","9E6495A3","0EDB8832","79DCB8A4","E0D5E91E","97D2D988","09B64C2B","7EB17CBD","E7B82D07","90BF1D91","1DB71064","6AB020F2","F3B97148","84BE41DE","1ADAD47D","6DDDE4EB","F4D4B551","83D385C7","136C9856","646BA8C0","FD62F97A","8A65C9EC","14015C4F","63066CD9","FA0F3D63","8D080DF5","3B6E20C8","4C69105E","D56041E4","A2677172","3C03E4D1","4B04D447","D20D85FD","A50AB56B","35B5A8FA","42B2986C","DBBBC9D6","ACBCF940","32D86CE3","45DF5C75","DCD60DCF","ABD13D59","26D930AC","51DE003A","C8D75180","BFD06116","21B4F4B5","56B3C423","CFBA9599","B8BDA50F","2802B89E","5F058808","C60CD9B2","B10BE924","2F6F7C87","58684C11","C1611DAB","B6662D3D","76DC4190","01DB7106","98D220BC","EFD5102A","71B18589","06B6B51F","9FBFE4A5","E8B8D433","7807C9A2","0F00F934","9609A88E","E10E9818","7F6A0DBB","086D3D2D","91646C97","E6635C01","6B6B51F4","1C6C6162","856530D8","F262004E","6C0695ED","1B01A57B","8208F4C1","F50FC457","65B0D9C6","12B7E950","8BBEB8EA","FCB9887C","62DD1DDF","15DA2D49","8CD37CF3","FBD44C65","4DB26158","3AB551CE","A3BC0074","D4BB30E2","4ADFA541","3DD895D7","A4D1C46D","D3D6F4FB","4369E96A","346ED9FC","AD678846","DA60B8D0","44042D73","33031DE5","AA0A4C5F","DD0D7CC9","5005713C","270241AA","BE0B1010","C90C2086","5768B525","206F85B3","B966D409","CE61E49F","5EDEF90E","29D9C998","B0D09822","C7D7A8B4","59B33D17","2EB40D81","B7BD5C3B","C0BA6CAD","EDB88320","9ABFB3B6","03B6E20C","74B1D29A","EAD54739","9DD277AF","04DB2615","73DC1683","E3630B12","94643B84","0D6D6A3E","7A6A5AA8","E40ECF0B","9309FF9D","0A00AE27","7D079EB1","F00F9344","8708A3D2","1E01F268","6906C2FE","F762575D","806567CB","196C3671","6E6B06E7","FED41B76","89D32BE0","10DA7A5A","67DD4ACC","F9B9DF6F","8EBEEFF9","17B7BE43","60B08ED5","D6D6A3E8","A1D1937E","38D8C2C4","4FDFF252","D1BB67F1","A6BC5767","3FB506DD","48B2364B","D80D2BDA","AF0A1B4C","36034AF6","41047A60","DF60EFC3","A867DF55","316E8EEF","4669BE79","CB61B38C","BC66831A","256FD2A0","5268E236","CC0C7795","BB0B4703","220216B9","5505262F","C5BA3BBE","B2BD0B28","2BB45A92","5CB36A04","C2D7FFA7","B5D0CF31","2CD99E8B","5BDEAE1D","9B64C2B0","EC63F226","756AA39C","026D930A","9C0906A9","EB0E363F","72076785","05005713","95BF4A82","E2B87A14","7BB12BAE","0CB61B38","92D28E9B","E5D5BE0D","7CDCEFB7","0BDBDF21","86D3D2D4","F1D4E242","68DDB3F8","1FDA836E","81BE16CD","F6B9265B","6FB077E1","18B74777","88085AE6","FF0F6A70","66063BCA","11010B5C","8F659EFF","F862AE69","616BFFD3","166CCF45","A00AE278","D70DD2EE","4E048354","3903B3C2","A7672661","D06016F7","4969474D","3E6E77DB","AED16A4A","D9D65ADC","40DF0B66","37D83BF0","A9BCAE53","DEBB9EC5","47B2CF7F","30B5FFE9","BDBDF21C","CABAC28A","53B39330","24B4A3A6","BAD03605","CDD70693","54DE5729","23D967BF","B3667A2E","C4614AB8","5D681B02","2A6F2B94","B40BBE37","C30C8EA1","5A05DF1B","2D02EF8D"];for(b=0,c=0,e=a.length,f=-1^f,d=0;e>d;d++)b=255&(f^a.charCodeAt(d)),c="0x"+g[b],f=f>>>8^c;return-1^f},countingChars:function(a,b){"use strict";return a=a.split(b),"object"==typeof a?a.length-1:0},htmlEncode:function(a){"use strict";var b=document.createElement("div");return b.appendChild(document.createTextNode(a)),a=b.innerHTML,b=void 0,a},mmdCSSclass:function(a,b){"use strict";var c;return-1!==a.indexOf("/")&&b!==!0?(c=a.split("/"),c=0===c[1].length?c[2].split("."):c[0].split("."),'class="mmd_'+c[c.length-2].replace(/[^\w\d]/g,"")+c[c.length-1]+'" '):""}};!function(a,b){"use strict";"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.returnExports=b()}(this,function(){"use strict";return micromarkdown});
+
+/* /micromarkdown */
\ No newline at end of file
diff --git a/sources/core/js/playlist.js b/sources/core/js/playlist.js
new file mode 100644
index 0000000..154d879
--- /dev/null
+++ b/sources/core/js/playlist.js
@@ -0,0 +1,40 @@
+function play(song_link) {
+ removeClass(document.querySelectorAll(".sound"),"playing");
+ addClass(song_link,"playing");
+
+ player=document.querySelector("audio");
+ player.setAttribute("src",song_link.getAttribute("data-src"));
+ event.preventDefault();
+ event.stopPropagation();
+ return false;
+}
+
+// Setup the player to autoplay the next track (personal change in vanilla js)
+audiojs.events.ready(function() {
+ var a = audiojs.createAll(
+ {
+ trackEnded: function() {
+ var current = document.querySelector(".playing");
+ next=next(current);
+ removeClass(current,"playing");
+ addClass(next,"playing");
+ audio.load(next.getAttribute("data-src"));
+ audio.play();
+ },
+ css:false}
+ );
+ audio=a[0];
+ on ("click","span[data-volume]",function(){
+ audio.setVolume(this.getAttribute("data-volume"));
+ removeClass("span[data-volume]","active");
+ toggleClass(this,"active");
+ event.preventDefault();
+ return false;
+ });
+ // Load in the first track
+ var audio = a[0];
+ first_link=first(".sound");
+ first = first_link.getAttribute("data-src");
+ addClass(first_link,"playing");
+ audio.load(first);
+});
\ No newline at end of file
diff --git a/sources/core/js/qr.js b/sources/core/js/qr.js
new file mode 100644
index 0000000..32da312
--- /dev/null
+++ b/sources/core/js/qr.js
@@ -0,0 +1,760 @@
+/* qr.js -- QR code generator in Javascript (revision 2011-01-19)
+ * Written by Kang Seonghoon .
+ *
+ * This source code is in the public domain; if your jurisdiction does not
+ * recognize the public domain the terms of Creative Commons CC0 license
+ * apply. In the other words, you can always do what you want.
+ */
+
+var QRCode = (function(){
+
+/* Quick overview: QR code composed of 2D array of modules (a rectangular
+ * area that conveys one bit of information); some modules are fixed to help
+ * the recognition of the code, and remaining data modules are further divided
+ * into 8-bit code words which are augumented by Reed-Solomon error correcting
+ * codes (ECC). There could be multiple ECCs, in the case the code is so large
+ * that it is helpful to split the raw data into several chunks.
+ *
+ * The number of modules is determined by the code's "version", ranging from 1
+ * (21x21) to 40 (177x177). How many ECC bits are used is determined by the
+ * ECC level (L/M/Q/H). The number and size (and thus the order of generator
+ * polynomial) of ECCs depend to the version and ECC level.
+ */
+
+// per-version information (cf. JIS X 0510:2004 pp. 30--36, 71)
+//
+// [0]: the degree of generator polynomial by ECC levels
+// [1]: # of code blocks by ECC levels
+// [2]: left-top positions of alignment patterns
+//
+// the number in this table (in particular, [0]) does not exactly match with
+// the numbers in the specficiation. see augumenteccs below for the reason.
+var VERSIONS = [
+ null,
+ [[10, 7,17,13], [ 1, 1, 1, 1], []],
+ [[16,10,28,22], [ 1, 1, 1, 1], [4,16]],
+ [[26,15,22,18], [ 1, 1, 2, 2], [4,20]],
+ [[18,20,16,26], [ 2, 1, 4, 2], [4,24]],
+ [[24,26,22,18], [ 2, 1, 4, 4], [4,28]],
+ [[16,18,28,24], [ 4, 2, 4, 4], [4,32]],
+ [[18,20,26,18], [ 4, 2, 5, 6], [4,20,36]],
+ [[22,24,26,22], [ 4, 2, 6, 6], [4,22,40]],
+ [[22,30,24,20], [ 5, 2, 8, 8], [4,24,44]],
+ [[26,18,28,24], [ 5, 4, 8, 8], [4,26,48]],
+ [[30,20,24,28], [ 5, 4,11, 8], [4,28,52]],
+ [[22,24,28,26], [ 8, 4,11,10], [4,30,56]],
+ [[22,26,22,24], [ 9, 4,16,12], [4,32,60]],
+ [[24,30,24,20], [ 9, 4,16,16], [4,24,44,64]],
+ [[24,22,24,30], [10, 6,18,12], [4,24,46,68]],
+ [[28,24,30,24], [10, 6,16,17], [4,24,48,72]],
+ [[28,28,28,28], [11, 6,19,16], [4,28,52,76]],
+ [[26,30,28,28], [13, 6,21,18], [4,28,54,80]],
+ [[26,28,26,26], [14, 7,25,21], [4,28,56,84]],
+ [[26,28,28,30], [16, 8,25,20], [4,32,60,88]],
+ [[26,28,30,28], [17, 8,25,23], [4,26,48,70,92]],
+ [[28,28,24,30], [17, 9,34,23], [4,24,48,72,96]],
+ [[28,30,30,30], [18, 9,30,25], [4,28,52,76,100]],
+ [[28,30,30,30], [20,10,32,27], [4,26,52,78,104]],
+ [[28,26,30,30], [21,12,35,29], [4,30,56,82,108]],
+ [[28,28,30,28], [23,12,37,34], [4,28,56,84,112]],
+ [[28,30,30,30], [25,12,40,34], [4,32,60,88,116]],
+ [[28,30,30,30], [26,13,42,35], [4,24,48,72,96,120]],
+ [[28,30,30,30], [28,14,45,38], [4,28,52,76,100,124]],
+ [[28,30,30,30], [29,15,48,40], [4,24,50,76,102,128]],
+ [[28,30,30,30], [31,16,51,43], [4,28,54,80,106,132]],
+ [[28,30,30,30], [33,17,54,45], [4,32,58,84,110,136]],
+ [[28,30,30,30], [35,18,57,48], [4,28,56,84,112,140]],
+ [[28,30,30,30], [37,19,60,51], [4,32,60,88,116,144]],
+ [[28,30,30,30], [38,19,63,53], [4,28,52,76,100,124,148]],
+ [[28,30,30,30], [40,20,66,56], [4,22,48,74,100,126,152]],
+ [[28,30,30,30], [43,21,70,59], [4,26,52,78,104,130,156]],
+ [[28,30,30,30], [45,22,74,62], [4,30,56,82,108,134,160]],
+ [[28,30,30,30], [47,24,77,65], [4,24,52,80,108,136,164]],
+ [[28,30,30,30], [49,25,81,68], [4,28,56,84,112,140,168]]];
+
+// mode constants (cf. Table 2 in JIS X 0510:2004 p. 16)
+var MODE_TERMINATOR = 0;
+var MODE_NUMERIC = 1, MODE_ALPHANUMERIC = 2, MODE_OCTET = 4, MODE_KANJI = 8;
+
+// validation regexps
+var NUMERIC_REGEXP = /^\d*$/;
+var ALPHANUMERIC_REGEXP = /^[A-Za-z0-9 $%*+\-./:]*$/;
+var ALPHANUMERIC_OUT_REGEXP = /^[A-Z0-9 $%*+\-./:]*$/;
+
+// ECC levels (cf. Table 22 in JIS X 0510:2004 p. 45)
+var ECCLEVEL_L = 1, ECCLEVEL_M = 0, ECCLEVEL_Q = 3, ECCLEVEL_H = 2;
+
+// GF(2^8)-to-integer mapping with a reducing polynomial x^8+x^4+x^3+x^2+1
+// invariant: GF256_MAP[GF256_INVMAP[i]] == i for all i in [1,256)
+var GF256_MAP = [], GF256_INVMAP = [-1];
+for (var i = 0, v = 1; i < 255; ++i) {
+ GF256_MAP.push(v);
+ GF256_INVMAP[v] = i;
+ v = (v * 2) ^ (v >= 128 ? 0x11d : 0);
+}
+
+// generator polynomials up to degree 30
+// (should match with polynomials in JIS X 0510:2004 Appendix A)
+//
+// generator polynomial of degree K is product of (x-\alpha^0), (x-\alpha^1),
+// ..., (x-\alpha^(K-1)). by convention, we omit the K-th coefficient (always 1)
+// from the result; also other coefficients are written in terms of the exponent
+// to \alpha to avoid the redundant calculation. (see also calculateecc below.)
+var GF256_GENPOLY = [[]];
+for (var i = 0; i < 30; ++i) {
+ var prevpoly = GF256_GENPOLY[i], poly = [];
+ for (var j = 0; j <= i; ++j) {
+ var a = (j < i ? GF256_MAP[prevpoly[j]] : 0);
+ var b = GF256_MAP[(i + (prevpoly[j-1] || 0)) % 255];
+ poly.push(GF256_INVMAP[a ^ b]);
+ }
+ GF256_GENPOLY.push(poly);
+}
+
+// alphanumeric character mapping (cf. Table 5 in JIS X 0510:2004 p. 19)
+var ALPHANUMERIC_MAP = {};
+for (var i = 0; i < 45; ++i) {
+ ALPHANUMERIC_MAP['0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:'.charAt(i)] = i;
+}
+
+// mask functions in terms of row # and column #
+// (cf. Table 20 in JIS X 0510:2004 p. 42)
+var MASKFUNCS = [
+ function(i,j) { return (i+j) % 2 == 0; },
+ function(i,j) { return i % 2 == 0; },
+ function(i,j) { return j % 3 == 0; },
+ function(i,j) { return (i+j) % 3 == 0; },
+ function(i,j) { return (((i/2)|0) + ((j/3)|0)) % 2 == 0; },
+ function(i,j) { return (i*j) % 2 + (i*j) % 3 == 0; },
+ function(i,j) { return ((i*j) % 2 + (i*j) % 3) % 2 == 0; },
+ function(i,j) { return ((i+j) % 2 + (i*j) % 3) % 2 == 0; }];
+
+// returns true when the version information has to be embeded.
+var needsverinfo = function(ver) { return ver > 6; };
+
+// returns the size of entire QR code for given version.
+var getsizebyver = function(ver) { return 4 * ver + 17; };
+
+// returns the number of bits available for code words in this version.
+var nfullbits = function(ver) {
+ /*
+ * |<--------------- n --------------->|
+ * | |<----- n-17 ---->| |
+ * +-------+ ///+-------+ ----
+ * | | ///| | ^
+ * | 9x9 | @@@@@ ///| 9x8 | |
+ * | | # # # @5x5@ # # # | | |
+ * +-------+ @@@@@ +-------+ |
+ * # ---|
+ * ^ |
+ * # |
+ * @@@@@ @@@@@ @@@@@ | n
+ * @5x5@ @5x5@ @5x5@ n-17
+ * @@@@@ @@@@@ @@@@@ | |
+ * # | |
+ * ////// v |
+ * //////# ---|
+ * +-------+ @@@@@ @@@@@ |
+ * | | @5x5@ @5x5@ |
+ * | 8x9 | @@@@@ @@@@@ |
+ * | | v
+ * +-------+ ----
+ *
+ * when the entire code has n^2 modules and there are m^2-3 alignment
+ * patterns, we have:
+ * - 225 (= 9x9 + 9x8 + 8x9) modules for finder patterns and
+ * format information;
+ * - 2n-34 (= 2(n-17)) modules for timing patterns;
+ * - 36 (= 3x6 + 6x3) modules for version information, if any;
+ * - 25m^2-75 (= (m^2-3)(5x5)) modules for alignment patterns
+ * if any, but 10m-20 (= 2(m-2)x5) of them overlaps with
+ * timing patterns.
+ */
+ var v = VERSIONS[ver];
+ var nbits = 16*ver*ver + 128*ver + 64; // finder, timing and format info.
+ if (needsverinfo(ver)) nbits -= 36; // version information
+ if (v[2].length) { // alignment patterns
+ nbits -= 25 * v[2].length * v[2].length - 10 * v[2].length - 55;
+ }
+ return nbits;
+};
+
+// returns the number of bits available for data portions (i.e. excludes ECC
+// bits but includes mode and length bits) in this version and ECC level.
+var ndatabits = function(ver, ecclevel) {
+ var nbits = nfullbits(ver) & ~7; // no sub-octet code words
+ var v = VERSIONS[ver];
+ nbits -= 8 * v[0][ecclevel] * v[1][ecclevel]; // ecc bits
+ return nbits;
+}
+
+// returns the number of bits required for the length of data.
+// (cf. Table 3 in JIS X 0510:2004 p. 16)
+var ndatalenbits = function(ver, mode) {
+ switch (mode) {
+ case MODE_NUMERIC: return (ver < 10 ? 10 : ver < 27 ? 12 : 14);
+ case MODE_ALPHANUMERIC: return (ver < 10 ? 9 : ver < 27 ? 11 : 13);
+ case MODE_OCTET: return (ver < 10 ? 8 : 16);
+ case MODE_KANJI: return (ver < 10 ? 8 : ver < 27 ? 10 : 12);
+ }
+};
+
+// returns the maximum length of data possible in given configuration.
+var getmaxdatalen = function(ver, mode, ecclevel) {
+ var nbits = ndatabits(ver, ecclevel) - 4 - ndatalenbits(ver, mode); // 4 for mode bits
+ switch (mode) {
+ case MODE_NUMERIC:
+ return ((nbits/10) | 0) * 3 + (nbits%10 < 4 ? 0 : nbits%10 < 7 ? 1 : 2);
+ case MODE_ALPHANUMERIC:
+ return ((nbits/11) | 0) * 2 + (nbits%11 < 6 ? 0 : 1);
+ case MODE_OCTET:
+ return (nbits/8) | 0;
+ case MODE_KANJI:
+ return (nbits/13) | 0;
+ }
+};
+
+// checks if the given data can be encoded in given mode, and returns
+// the converted data for the further processing if possible. otherwise
+// returns null.
+//
+// this function does not check the length of data; it is a duty of
+// encode function below (as it depends on the version and ECC level too).
+var validatedata = function(mode, data) {
+ switch (mode) {
+ case MODE_NUMERIC:
+ if (!data.match(NUMERIC_REGEXP)) return null;
+ return data;
+
+ case MODE_ALPHANUMERIC:
+ if (!data.match(ALPHANUMERIC_REGEXP)) return null;
+ return data.toUpperCase();
+
+ case MODE_OCTET:
+ if (typeof data === 'string') { // encode as utf-8 string
+ var newdata = [];
+ for (var i = 0; i < data.length; ++i) {
+ var ch = data.charCodeAt(i);
+ if (ch < 0x80) {
+ newdata.push(ch);
+ } else if (ch < 0x800) {
+ newdata.push(0xc0 | (ch >> 6),
+ 0x80 | (ch & 0x3f));
+ } else if (ch < 0x10000) {
+ newdata.push(0xe0 | (ch >> 12),
+ 0x80 | ((ch >> 6) & 0x3f),
+ 0x80 | (ch & 0x3f));
+ } else {
+ newdata.push(0xf0 | (ch >> 18),
+ 0x80 | ((ch >> 12) & 0x3f),
+ 0x80 | ((ch >> 6) & 0x3f),
+ 0x80 | (ch & 0x3f));
+ }
+ }
+ return newdata;
+ } else {
+ return data;
+ }
+ }
+};
+
+// returns the code words (sans ECC bits) for given data and configurations.
+// requires data to be preprocessed by validatedata. no length check is
+// performed, and everything has to be checked before calling this function.
+var encode = function(ver, mode, data, maxbuflen) {
+ var buf = [];
+ var bits = 0, remaining = 8;
+ var datalen = data.length;
+
+ // this function is intentionally no-op when n=0.
+ var pack = function(x, n) {
+ if (n >= remaining) {
+ buf.push(bits | (x >> (n -= remaining)));
+ while (n >= 8) buf.push((x >> (n -= 8)) & 255);
+ bits = 0;
+ remaining = 8;
+ }
+ if (n > 0) bits |= (x & ((1 << n) - 1)) << (remaining -= n);
+ };
+
+ var nlenbits = ndatalenbits(ver, mode);
+ pack(mode, 4);
+ pack(datalen, nlenbits);
+
+ switch (mode) {
+ case MODE_NUMERIC:
+ for (var i = 2; i < datalen; i += 3) {
+ pack(parseInt(data.substring(i-2,i+1), 10), 10);
+ }
+ pack(parseInt(data.substring(i-2), 10), [0,4,7][datalen%3]);
+ break;
+
+ case MODE_ALPHANUMERIC:
+ for (var i = 1; i < datalen; i += 2) {
+ pack(ALPHANUMERIC_MAP[data.charAt(i-1)] * 45 +
+ ALPHANUMERIC_MAP[data.charAt(i)], 11);
+ }
+ if (datalen % 2 == 1) {
+ pack(ALPHANUMERIC_MAP[data.charAt(i-1)], 6);
+ }
+ break;
+
+ case MODE_OCTET:
+ for (var i = 0; i < datalen; ++i) {
+ pack(data[i], 8);
+ }
+ break;
+ };
+
+ // final bits. it is possible that adding terminator causes the buffer
+ // to overflow, but then the buffer truncated to the maximum size will
+ // be valid as the truncated terminator mode bits and padding is
+ // identical in appearance (cf. JIS X 0510:2004 sec 8.4.8).
+ pack(MODE_TERMINATOR, 4);
+ if (remaining < 8) buf.push(bits);
+
+ // the padding to fill up the remaining space. we should not add any
+ // words when the overflow already occurred.
+ while (buf.length + 1 < maxbuflen) buf.push(0xec, 0x11);
+ if (buf.length < maxbuflen) buf.push(0xec);
+ return buf;
+};
+
+// calculates ECC code words for given code words and generator polynomial.
+//
+// this is quite similar to CRC calculation as both Reed-Solomon and CRC use
+// the certain kind of cyclic codes, which is effectively the division of
+// zero-augumented polynomial by the generator polynomial. the only difference
+// is that Reed-Solomon uses GF(2^8), instead of CRC's GF(2), and Reed-Solomon
+// uses the different generator polynomial than CRC's.
+var calculateecc = function(poly, genpoly) {
+ var modulus = poly.slice(0);
+ var polylen = poly.length, genpolylen = genpoly.length;
+ for (var i = 0; i < genpolylen; ++i) modulus.push(0);
+ for (var i = 0; i < polylen; ) {
+ var quotient = GF256_INVMAP[modulus[i++]];
+ if (quotient >= 0) {
+ for (var j = 0; j < genpolylen; ++j) {
+ modulus[i+j] ^= GF256_MAP[(quotient + genpoly[j]) % 255];
+ }
+ }
+ }
+ return modulus.slice(polylen);
+};
+
+// auguments ECC code words to given code words. the resulting words are
+// ready to be encoded in the matrix.
+//
+// the much of actual augumenting procedure follows JIS X 0510:2004 sec 8.7.
+// the code is simplified using the fact that the size of each code & ECC
+// blocks is almost same; for example, when we have 4 blocks and 46 data words
+// the number of code words in those blocks are 11, 11, 12, 12 respectively.
+var augumenteccs = function(poly, nblocks, genpoly) {
+ var subsizes = [];
+ var subsize = (poly.length / nblocks) | 0, subsize0 = 0;
+ var pivot = nblocks - poly.length % nblocks;
+ for (var i = 0; i < pivot; ++i) {
+ subsizes.push(subsize0);
+ subsize0 += subsize;
+ }
+ for (var i = pivot; i < nblocks; ++i) {
+ subsizes.push(subsize0);
+ subsize0 += subsize+1;
+ }
+ subsizes.push(subsize0);
+
+ var eccs = [];
+ for (var i = 0; i < nblocks; ++i) {
+ eccs.push(calculateecc(poly.slice(subsizes[i], subsizes[i+1]), genpoly));
+ }
+
+ var result = [];
+ var nitemsperblock = (poly.length / nblocks) | 0;
+ for (var i = 0; i < nitemsperblock; ++i) {
+ for (var j = 0; j < nblocks; ++j) {
+ result.push(poly[subsizes[j] + i]);
+ }
+ }
+ for (var j = pivot; j < nblocks; ++j) {
+ result.push(poly[subsizes[j+1] - 1]);
+ }
+ for (var i = 0; i < genpoly.length; ++i) {
+ for (var j = 0; j < nblocks; ++j) {
+ result.push(eccs[j][i]);
+ }
+ }
+ return result;
+};
+
+// auguments BCH(p+q,q) code to the polynomial over GF(2), given the proper
+// genpoly. the both input and output are in binary numbers, and unlike
+// calculateecc genpoly should include the 1 bit for the highest degree.
+//
+// actual polynomials used for this procedure are as follows:
+// - p=10, q=5, genpoly=x^10+x^8+x^5+x^4+x^2+x+1 (JIS X 0510:2004 Appendix C)
+// - p=18, q=6, genpoly=x^12+x^11+x^10+x^9+x^8+x^5+x^2+1 (ibid. Appendix D)
+var augumentbch = function(poly, p, genpoly, q) {
+ var modulus = poly << q;
+ for (var i = p - 1; i >= 0; --i) {
+ if ((modulus >> (q+i)) & 1) modulus ^= genpoly << i;
+ }
+ return (poly << q) | modulus;
+};
+
+// creates the base matrix for given version. it returns two matrices, one of
+// them is the actual one and the another represents the "reserved" portion
+// (e.g. finder and timing patterns) of the matrix.
+//
+// some entries in the matrix may be undefined, rather than 0 or 1. this is
+// intentional (no initialization needed!), and putdata below will fill
+// the remaining ones.
+var makebasematrix = function(ver) {
+ var v = VERSIONS[ver], n = getsizebyver(ver);
+ var matrix = [], reserved = [];
+ for (var i = 0; i < n; ++i) {
+ matrix.push([]);
+ reserved.push([]);
+ }
+
+ var blit = function(y, x, h, w, bits) {
+ for (var i = 0; i < h; ++i) {
+ for (var j = 0; j < w; ++j) {
+ matrix[y+i][x+j] = (bits[i] >> j) & 1;
+ reserved[y+i][x+j] = 1;
+ }
+ }
+ };
+
+ // finder patterns and a part of timing patterns
+ // will also mark the format information area (not yet written) as reserved.
+ blit(0, 0, 9, 9, [0x7f, 0x41, 0x5d, 0x5d, 0x5d, 0x41, 0x17f, 0x00, 0x40]);
+ blit(n-8, 0, 8, 9, [0x100, 0x7f, 0x41, 0x5d, 0x5d, 0x5d, 0x41, 0x7f]);
+ blit(0, n-8, 9, 8, [0xfe, 0x82, 0xba, 0xba, 0xba, 0x82, 0xfe, 0x00, 0x00]);
+
+ // the rest of timing patterns
+ for (var i = 9; i < n-8; ++i) {
+ matrix[6][i] = matrix[i][6] = ~i & 1;
+ reserved[6][i] = reserved[i][6] = 1;
+ }
+
+ // alignment patterns
+ var aligns = v[2], m = aligns.length;
+ for (var i = 0; i < m; ++i) {
+ var minj = (i==0 || i==m-1 ? 1 : 0), maxj = (i==0 ? m-1 : m);
+ for (var j = minj; j < maxj; ++j) {
+ blit(aligns[i], aligns[j], 5, 5, [0x1f, 0x11, 0x15, 0x11, 0x1f]);
+ }
+ }
+
+ // version information
+ if (needsverinfo(ver)) {
+ var code = augumentbch(ver, 6, 0x1f25, 12);
+ var k = 0;
+ for (var i = 0; i < 6; ++i) {
+ for (var j = 0; j < 3; ++j) {
+ matrix[i][(n-11)+j] = matrix[(n-11)+j][i] = (code >> k++) & 1;
+ reserved[i][(n-11)+j] = reserved[(n-11)+j][i] = 1;
+ }
+ }
+ }
+
+ return {matrix: matrix, reserved: reserved};
+};
+
+// fills the data portion (i.e. unmarked in reserved) of the matrix with given
+// code words. the size of code words should be no more than available bits,
+// and remaining bits are padded to 0 (cf. JIS X 0510:2004 sec 8.7.3).
+var putdata = function(matrix, reserved, buf) {
+ var n = matrix.length;
+ var k = 0, dir = -1;
+ for (var i = n-1; i >= 0; i -= 2) {
+ if (i == 6) --i; // skip the entire timing pattern column
+ var jj = (dir < 0 ? n-1 : 0);
+ for (var j = 0; j < n; ++j) {
+ for (var ii = i; ii > i-2; --ii) {
+ if (!reserved[jj][ii]) {
+ // may overflow, but (undefined >> x)
+ // is 0 so it will auto-pad to zero.
+ matrix[jj][ii] = (buf[k >> 3] >> (~k&7)) & 1;
+ ++k;
+ }
+ }
+ jj += dir;
+ }
+ dir = -dir;
+ }
+ return matrix;
+};
+
+// XOR-masks the data portion of the matrix. repeating the call with the same
+// arguments will revert the prior call (convenient in the matrix evaluation).
+var maskdata = function(matrix, reserved, mask) {
+ var maskf = MASKFUNCS[mask];
+ var n = matrix.length;
+ for (var i = 0; i < n; ++i) {
+ for (var j = 0; j < n; ++j) {
+ if (!reserved[i][j]) matrix[i][j] ^= maskf(i,j);
+ }
+ }
+ return matrix;
+}
+
+// puts the format information.
+var putformatinfo = function(matrix, reserved, ecclevel, mask) {
+ var n = matrix.length;
+ var code = augumentbch((ecclevel << 3) | mask, 5, 0x537, 10) ^ 0x5412;
+ for (var i = 0; i < 15; ++i) {
+ var r = [0,1,2,3,4,5,7,8,n-7,n-6,n-5,n-4,n-3,n-2,n-1][i];
+ var c = [n-1,n-2,n-3,n-4,n-5,n-6,n-7,n-8,7,5,4,3,2,1,0][i];
+ matrix[r][8] = matrix[8][c] = (code >> i) & 1;
+ // we don't have to mark those bits reserved; always done
+ // in makebasematrix above.
+ }
+ return matrix;
+};
+
+// evaluates the resulting matrix and returns the score (lower is better).
+// (cf. JIS X 0510:2004 sec 8.8.2)
+//
+// the evaluation procedure tries to avoid the problematic patterns naturally
+// occuring from the original matrix. for example, it penaltizes the patterns
+// which just look like the finder pattern which will confuse the decoder.
+// we choose the mask which results in the lowest score among 8 possible ones.
+//
+// note: zxing seems to use the same procedure and in many cases its choice
+// agrees to ours, but sometimes it does not. practically it doesn't matter.
+var evaluatematrix = function(matrix) {
+ // N1+(k-5) points for each consecutive row of k same-colored modules,
+ // where k >= 5. no overlapping row counts.
+ var PENALTY_CONSECUTIVE = 3;
+ // N2 points for each 2x2 block of same-colored modules.
+ // overlapping block does count.
+ var PENALTY_TWOBYTWO = 3;
+ // N3 points for each pattern with >4W:1B:1W:3B:1W:1B or
+ // 1B:1W:3B:1W:1B:>4W, or their multiples (e.g. highly unlikely,
+ // but 13W:3B:3W:9B:3W:3B counts).
+ var PENALTY_FINDERLIKE = 40;
+ // N4*k points for every (5*k)% deviation from 50% black density.
+ // i.e. k=1 for 55~60% and 40~45%, k=2 for 60~65% and 35~40%, etc.
+ var PENALTY_DENSITY = 10;
+
+ var evaluategroup = function(groups) { // assumes [W,B,W,B,W,...,B,W]
+ var score = 0;
+ for (var i = 0; i < groups.length; ++i) {
+ if (groups[i] >= 5) score += PENALTY_CONSECUTIVE + (groups[i]-5);
+ }
+ for (var i = 5; i < groups.length; i += 2) {
+ var p = groups[i];
+ if (groups[i-1] == p && groups[i-2] == 3*p && groups[i-3] == p &&
+ groups[i-4] == p && (groups[i-5] >= 4*p || groups[i+1] >= 4*p)) {
+ // this part differs from zxing...
+ score += PENALTY_FINDERLIKE;
+ }
+ }
+ return score;
+ };
+
+ var n = matrix.length;
+ var score = 0, nblacks = 0;
+ for (var i = 0; i < n; ++i) {
+ var row = matrix[i];
+ var groups;
+
+ // evaluate the current row
+ groups = [0]; // the first empty group of white
+ for (var j = 0; j < n; ) {
+ var k;
+ for (k = 0; j < n && row[j]; ++k) ++j;
+ groups.push(k);
+ for (k = 0; j < n && !row[j]; ++k) ++j;
+ groups.push(k);
+ }
+ score += evaluategroup(groups);
+
+ // evaluate the current column
+ groups = [0];
+ for (var j = 0; j < n; ) {
+ var k;
+ for (k = 0; j < n && matrix[j][i]; ++k) ++j;
+ groups.push(k);
+ for (k = 0; j < n && !matrix[j][i]; ++k) ++j;
+ groups.push(k);
+ }
+ score += evaluategroup(groups);
+
+ // check the 2x2 box and calculate the density
+ var nextrow = matrix[i+1] || [];
+ nblacks += row[0];
+ for (var j = 1; j < n; ++j) {
+ var p = row[j];
+ nblacks += p;
+ // at least comparison with next row should be strict...
+ if (row[j-1] == p && nextrow[j] === p && nextrow[j-1] === p) {
+ score += PENALTY_TWOBYTWO;
+ }
+ }
+ }
+
+ score += PENALTY_DENSITY * ((Math.abs(nblacks / n / n - 0.5) / 0.05) | 0);
+ return score;
+};
+
+// returns the fully encoded QR code matrix which contains given data.
+// it also chooses the best mask automatically when mask is -1.
+var generate = function(data, ver, mode, ecclevel, mask) {
+ var v = VERSIONS[ver];
+ var buf = encode(ver, mode, data, ndatabits(ver, ecclevel) >> 3);
+ buf = augumenteccs(buf, v[1][ecclevel], GF256_GENPOLY[v[0][ecclevel]]);
+
+ var result = makebasematrix(ver);
+ var matrix = result.matrix, reserved = result.reserved;
+ putdata(matrix, reserved, buf);
+
+ if (mask < 0) {
+ // find the best mask
+ maskdata(matrix, reserved, 0);
+ putformatinfo(matrix, reserved, ecclevel, 0);
+ var bestmask = 0, bestscore = evaluatematrix(matrix);
+ maskdata(matrix, reserved, 0);
+ for (mask = 1; mask < 8; ++mask) {
+ maskdata(matrix, reserved, mask);
+ putformatinfo(matrix, reserved, ecclevel, mask);
+ var score = evaluatematrix(matrix);
+ if (bestscore > score) {
+ bestscore = score;
+ bestmask = mask;
+ }
+ maskdata(matrix, reserved, mask);
+ }
+ mask = bestmask;
+ }
+
+ maskdata(matrix, reserved, mask);
+ putformatinfo(matrix, reserved, ecclevel, mask);
+ return matrix;
+};
+
+// the public interface is trivial; the options available are as follows:
+//
+// - version: an integer in [1,40]. when omitted (or -1) the smallest possible
+// version is chosen.
+// - mode: one of 'numeric', 'alphanumeric', 'octet'. when omitted the smallest
+// possible mode is chosen.
+// - ecclevel: one of 'L', 'M', 'Q', 'H'. defaults to 'L'.
+// - mask: an integer in [0,7]. when omitted (or -1) the best mask is chosen.
+//
+// for generate{HTML,PNG}:
+//
+// - modulesize: a number. this is a size of each modules in pixels, and
+// defaults to 5px.
+// - margin: a number. this is a size of margin in *modules*, and defaults to
+// 4 (white modules). the specficiation mandates the margin no less than 4
+// modules, so it is better not to alter this value unless you know what
+// you're doing.
+var QRCode = {
+ 'generate': function(data, options) {
+ var MODES = {'numeric': MODE_NUMERIC, 'alphanumeric': MODE_ALPHANUMERIC,
+ 'octet': MODE_OCTET};
+ var ECCLEVELS = {'L': ECCLEVEL_L, 'M': ECCLEVEL_M, 'Q': ECCLEVEL_Q,
+ 'H': ECCLEVEL_H};
+
+ options = options || {};
+ var ver = options.version || -1;
+ var ecclevel = ECCLEVELS[(options.ecclevel || 'L').toUpperCase()];
+ var mode = options.mode ? MODES[options.mode.toLowerCase()] : -1;
+ var mask = 'mask' in options ? options.mask : -1;
+
+ if (mode < 0) {
+ if (typeof data === 'string') {
+ if (data.match(NUMERIC_REGEXP)) {
+ mode = MODE_NUMERIC;
+ } else if (data.match(ALPHANUMERIC_OUT_REGEXP)) {
+ // while encode supports case-insensitive
+ // encoding, we restrict the data to be
+ // uppercased when auto-selecting the mode.
+ mode = MODE_ALPHANUMERIC;
+ } else {
+ mode = MODE_OCTET;
+ }
+ } else {
+ mode = MODE_OCTET;
+ }
+ } else if (!(mode == MODE_NUMERIC || mode == MODE_ALPHANUMERIC ||
+ mode == MODE_OCTET)) {
+ throw 'invalid or unsupported mode';
+ }
+
+ data = validatedata(mode, data);
+ if (data === null) throw 'invalid data format';
+
+ if (ecclevel < 0 || ecclevel > 3) throw 'invalid ECC level';
+
+ if (ver < 0) {
+ for (ver = 1; ver <= 40; ++ver) {
+ if (data.length <= getmaxdatalen(ver, mode, ecclevel)) break;
+ }
+ if (ver > 40) throw 'too large data';
+ } else if (ver < 1 || ver > 40) {
+ throw 'invalid version';
+ }
+
+ if (mask != -1 && (mask < 0 || mask > 8)) throw 'invalid mask';
+
+ return generate(data, ver, mode, ecclevel, mask);
+ },
+
+ 'generateHTML': function(data, options) {
+ options = options || {};
+ var matrix = QRCode['generate'](data, options);
+ var modsize = Math.max(options.modulesize || 5, 0.5);
+ var margin = Math.max(options.margin || 4, 0.0);
+
+ var e = document.createElement('div');
+ var n = matrix.length;
+ var html = [''];
+ for (var i = 0; i < n; ++i) {
+ html.push('');
+ for (var j = 0; j < n; ++j) {
+ html.push(' ');
+ }
+ html.push(' ');
+ }
+ e.className = 'qrcode';
+ e.innerHTML = html.join('') + '
';
+ return e;
+ },
+
+ 'generatePNG': function(data, options) {
+ options = options || {};
+ var matrix = QRCode['generate'](data, options);
+ var modsize = Math.max(options.modulesize || 5, 0.5);
+ var margin = Math.max(options.margin || 4, 0.0);
+ var n = matrix.length;
+ var size = modsize * (n + 2 * margin);
+
+ var canvas = document.createElement('canvas'), context;
+ canvas.width = canvas.height = size;
+ context = canvas.getContext('2d');
+ if (!context) throw 'canvas support is needed for PNG output';
+
+ context.fillStyle = '#fff';
+ context.fillRect(0, 0, size, size);
+ context.fillStyle = '#000';
+ for (var i = 0; i < n; ++i) {
+ for (var j = 0; j < n; ++j) {
+ if (matrix[i][j]) {
+ context.fillRect(modsize * (margin + j),
+ modsize * (margin + i),
+ modsize, modsize);
+ }
+ }
+ }
+ //context.fillText('evaluation: ' + evaluatematrix(matrix), 10, 10);
+ return canvas.toDataURL();
+ }
+};
+
+return QRCode;
+})();
diff --git a/sources/core/js/scrolltotop.js b/sources/core/js/scrolltotop.js
new file mode 100644
index 0000000..03495d8
--- /dev/null
+++ b/sources/core/js/scrolltotop.js
@@ -0,0 +1,94 @@
+/*
+# ------------------ BEGIN LICENSE BLOCK ------------------
+#
+# Copyright (c) 2009 - 2014 Cyril MAGUIRE
+# Licensed under the CeCILL v2.1 license.
+# See http://www.cecill.info/licences.fr.html
+#
+# ------------------- END LICENSE BLOCK -------------------
+*/
+;(function(window,undefined) {
+
+ 'use_strict';
+
+ var timeOut;
+ var isIE = isIE();
+ var bodyTag = first('body');
+ var idOfBody = id(bodyTag);
+ if (idOfBody == null) {
+ idOfBody = 'top';
+ bodyTag.setAttribute('id', 'top');
+ }
+
+ function isIE() {
+ var nav = navigator.userAgent.toLowerCase();
+ return (nav.indexOf('msie') != -1) ? parseInt(nav.split('msie')[1]) : false;
+ }
+
+ function backToTop() {
+ if (document.body.scrollTop!=0 || document.documentElement.scrollTop!=0){
+ window.scrollBy(0,-50);
+ timeOut=setTimeout('backToTop()',10);
+ }
+ else {
+ clearTimeout(timeOut);
+ }
+ }
+
+ function getScrollPosition() {
+ return Array((document.documentElement && document.documentElement.scrollLeft) || window.pageXOffset || self.pageXOffset || document.body.scrollLeft,(document.documentElement && document.documentElement.scrollTop) || window.pageYOffset || self.pageYOffset || document.body.scrollTop);
+ }
+
+ function Remove(idOfParent,idToRemove) {
+ if (isIE) {
+ document.getElementById(idToRemove).removeNode(true);
+ } else {
+ var Node1 = document.getElementById(idOfParent);
+ var len = Node1.childNodes.length;
+
+ for(var i = 0; i < len; i++){
+ if (Node1.childNodes[i] != undefined && Node1.childNodes[i].id != undefined && Node1.childNodes[i].id == idToRemove){
+ Node1.removeChild(Node1.childNodes[i]);
+ }
+ }
+ }
+ }
+
+ function addElement(idOfParent,idToAdd,htmlToInsert) {
+ var DomParent = document.getElementById(idOfParent);//id of body
+ var newdiv = document.createElement('div');
+
+ newdiv.setAttribute('id',idToAdd);
+ newdiv.innerHTML = htmlToInsert;
+
+ DomParent.appendChild(newdiv);
+ }
+
+ function displayBackButton() {
+ var pos = [];
+ var fleche = '▲';
+
+ if (isIE) {
+ fleche = '▲';
+ }
+ pos = getScrollPosition();
+ var topLink = document.getElementById('toplink');
+ if (pos[1] > 150) {
+ if (topLink == null) {
+ addElement(idOfBody,'toplink',''+fleche+' ');
+ }
+ } else {
+ if (topLink != null) {
+ Remove(idOfBody,'toplink');
+ }
+ }
+ }
+
+ //add to global namespace
+ window.onscroll = displayBackButton;
+ window.displayBackButton = displayBackButton;
+ window.backToTop = backToTop;
+
+
+})(window);
+
\ No newline at end of file
diff --git a/sources/core/js/sorttable.js b/sources/core/js/sorttable.js
new file mode 100644
index 0000000..38b0fc6
--- /dev/null
+++ b/sources/core/js/sorttable.js
@@ -0,0 +1,495 @@
+/*
+ SortTable
+ version 2
+ 7th April 2007
+ Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/
+
+ Instructions:
+ Download this file
+ Add to your HTML
+ Add class="sortable" to any table you'd like to make sortable
+ Click on the headers to sort
+
+ Thanks to many, many people for contributions and suggestions.
+ Licenced as X11: http://www.kryogenix.org/code/browser/licence.html
+ This basically means: do what you want with it.
+*/
+
+
+var stIsIE = /*@cc_on!@*/false;
+
+sorttable = {
+ init: function() {
+ // quit if this function has already been called
+ if (arguments.callee.done) return;
+ // flag this function so we don't do the same thing twice
+ arguments.callee.done = true;
+ // kill the timer
+ if (_timer) clearInterval(_timer);
+
+ if (!document.createElement || !document.getElementsByTagName) return;
+
+ sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/;
+
+ forEach(document.getElementsByTagName('table'), function(table) {
+ if (table.className.search(/\bsortable\b/) != -1) {
+ sorttable.makeSortable(table);
+ }
+ });
+
+ },
+
+ makeSortable: function(table) {
+ if (table.getElementsByTagName('thead').length == 0) {
+ // table doesn't have a tHead. Since it should have, create one and
+ // put the first table row in it.
+ the = document.createElement('thead');
+ the.appendChild(table.rows[0]);
+ table.insertBefore(the,table.firstChild);
+ }
+ // Safari doesn't support table.tHead, sigh
+ if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0];
+
+ if (table.tHead.rows.length != 1) return; // can't cope with two header rows
+
+ // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as
+ // "total" rows, for example). This is B&R, since what you're supposed
+ // to do is put them in a tfoot. So, if there are sortbottom rows,
+ // for backwards compatibility, move them to tfoot (creating it if needed).
+ sortbottomrows = [];
+ for (var i=0; i5' : ' ▴';
+ this.appendChild(sortrevind);
+ return;
+ }
+ if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) {
+ // if we're already sorted by this column in reverse, just
+ // re-reverse the table, which is quicker
+ sorttable.reverse(this.sorttable_tbody);
+ this.className = this.className.replace('sorttable_sorted_reverse',
+ 'sorttable_sorted');
+ this.removeChild(document.getElementById('sorttable_sortrevind'));
+ sortfwdind = document.createElement('span');
+ sortfwdind.id = "sorttable_sortfwdind";
+ sortfwdind.innerHTML = stIsIE ? ' 6 ' : ' ▾';
+ this.appendChild(sortfwdind);
+ return;
+ }
+
+ // remove sorttable_sorted classes
+ theadrow = this.parentNode;
+ forEach(theadrow.childNodes, function(cell) {
+ if (cell.nodeType == 1) { // an element
+ cell.className = cell.className.replace('sorttable_sorted_reverse','');
+ cell.className = cell.className.replace('sorttable_sorted','');
+ }
+ });
+ sortfwdind = document.getElementById('sorttable_sortfwdind');
+ if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); }
+ sortrevind = document.getElementById('sorttable_sortrevind');
+ if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); }
+
+ this.className += ' sorttable_sorted';
+ sortfwdind = document.createElement('span');
+ sortfwdind.id = "sorttable_sortfwdind";
+ sortfwdind.innerHTML = stIsIE ? ' 6 ' : ' ▾';
+ this.appendChild(sortfwdind);
+
+ // build an array to sort. This is a Schwartzian transform thing,
+ // i.e., we "decorate" each row with the actual sort key,
+ // sort based on the sort keys, and then put the rows back in order
+ // which is a lot faster because you only do getInnerText once per row
+ row_array = [];
+ col = this.sorttable_columnindex;
+ rows = this.sorttable_tbody.rows;
+ for (var j=0; j 12) {
+ // definitely dd/mm
+ return sorttable.sort_ddmm;
+ } else if (second > 12) {
+ return sorttable.sort_mmdd;
+ } else {
+ // looks like a date, but we can't tell which, so assume
+ // that it's dd/mm (English imperialism!) and keep looking
+ sortfn = sorttable.sort_ddmm;
+ }
+ }
+ }
+ }
+ return sortfn;
+ },
+
+ getInnerText: function(node) {
+ // gets the text we want to use for sorting for a cell.
+ // strips leading and trailing whitespace.
+ // this is *not* a generic getInnerText function; it's special to sorttable.
+ // for example, you can override the cell text with a customkey attribute.
+ // it also gets .value for fields.
+
+ if (!node) return "";
+
+ hasInputs = (typeof node.getElementsByTagName == 'function') &&
+ node.getElementsByTagName('input').length;
+
+ if (node.getAttribute("sorttable_customkey") != null) {
+ return node.getAttribute("sorttable_customkey");
+ }
+ else if (typeof node.textContent != 'undefined' && !hasInputs) {
+ return node.textContent.replace(/^\s+|\s+$/g, '');
+ }
+ else if (typeof node.innerText != 'undefined' && !hasInputs) {
+ return node.innerText.replace(/^\s+|\s+$/g, '');
+ }
+ else if (typeof node.text != 'undefined' && !hasInputs) {
+ return node.text.replace(/^\s+|\s+$/g, '');
+ }
+ else {
+ switch (node.nodeType) {
+ case 3:
+ if (node.nodeName.toLowerCase() == 'input') {
+ return node.value.replace(/^\s+|\s+$/g, '');
+ }
+ case 4:
+ return node.nodeValue.replace(/^\s+|\s+$/g, '');
+ break;
+ case 1:
+ case 11:
+ var innerText = '';
+ for (var i = 0; i < node.childNodes.length; i++) {
+ innerText += sorttable.getInnerText(node.childNodes[i]);
+ }
+ return innerText.replace(/^\s+|\s+$/g, '');
+ break;
+ default:
+ return '';
+ }
+ }
+ },
+
+ reverse: function(tbody) {
+ // reverse the rows in a tbody
+ newrows = [];
+ for (var i=0; i=0; i--) {
+ tbody.appendChild(newrows[i]);
+ }
+ delete newrows;
+ },
+
+ /* sort functions
+ each sort function takes two parameters, a and b
+ you are comparing a[0] and b[0] */
+ sort_numeric: function(a,b) {
+ aa = parseFloat(a[0].replace(/[^0-9.-]/g,''));
+ if (isNaN(aa)) aa = 0;
+ bb = parseFloat(b[0].replace(/[^0-9.-]/g,''));
+ if (isNaN(bb)) bb = 0;
+ return aa-bb;
+ },
+ sort_alpha: function(a,b) {
+ if (a[0]==b[0]) return 0;
+ if (a[0] 0 ) {
+ var q = list[i]; list[i] = list[i+1]; list[i+1] = q;
+ swap = true;
+ }
+ } // for
+ t--;
+
+ if (!swap) break;
+
+ for(var i = t; i > b; --i) {
+ if ( comp_func(list[i], list[i-1]) < 0 ) {
+ var q = list[i]; list[i] = list[i-1]; list[i-1] = q;
+ swap = true;
+ }
+ } // for
+ b++;
+
+ } // while(swap)
+ }
+}
+
+/* ******************************************************************
+ Supporting functions: bundled here to avoid depending on a library
+ ****************************************************************** */
+
+// Dean Edwards/Matthias Miller/John Resig
+
+/* for Mozilla/Opera9 */
+if (document.addEventListener) {
+ document.addEventListener("DOMContentLoaded", sorttable.init, false);
+}
+
+/* for Internet Explorer */
+/*@cc_on @*/
+/*@if (@_win32)
+ document.write("
+
+ ';
+ $m3u='
+
+
+
+
+ ';
+ if(!empty($f)){
+ set_time_limit (0);
+ store_access_stat($f,$id);
+ $call_qrcode=' ';
+
+ # password mode
+ if (isset($_POST['password'])){
+ # the file id is a md5 password.original id
+ $blured=blur_password($_POST['password']);
+ $sub_id=str_replace($blured,'',$id); # here we try to recover the original id to compare
+ }
+ if (strlen($id)>23 && empty($_POST['password'])){
+ require(THEME_PATH.'/header.php');
+ echo '
+
+
'.e('This share is protected, please type the correct password:',false).'
+
+
+ ';
+ require(THEME_PATH.'/footer.php');
+ }else if(empty($_POST['password'])||!empty($_POST['password']) && $blured.$sub_id==$id){
+ # normal mode or access granted
+ if ($f && is_file($f)){
+
+ # file request => return file according to $behaviour var (see core.php)
+ $type=_mime_content_type($f);
+ $ext=strtolower(pathinfo($f,PATHINFO_EXTENSION));
+ if ($ext=='md'){
+ include('core/markdown.php');
+ require(THEME_PATH.'/header_markdown.php');
+ echo $qrcode;
+ echo parse(url2link(file_get_contents($f)));
+ echo $call_qrcode;
+ require(THEME_PATH.'/footer_markdown.php');
+
+ }else if ($ext=='m3u'){
+ require(THEME_PATH.'/header.php');
+ echo $qrcode;
+ echo str_replace('index.php?f='.$id,'#m3u_link',$templates['dialog_share']);
+ echo $call_qrcode;
+ require(THEME_PATH.'/footer.php');
+
+ }else if (is_in($ext,'FILES_TO_ECHO')!==false){
+ require(THEME_PATH.'/header.php');
+ echo $qrcode;
+ echo ''.htmlspecialchars(file_get_contents($f)).' ';
+ echo $call_qrcode;
+ require(THEME_PATH.'/footer.php');
+ }else if (is_in($ext,'FILES_TO_RETURN')!==false||$type=='text/plain'&&empty($ext)){
+ header('Content-type: '.$type.'; charset=utf-8');
+ header('Content-Transfer-Encoding: binary');
+ header('Content-Length: '.filesize($f));
+ readfile($f);
+ }else{
+ header('Content-type: '.$type);
+ header('Content-Transfer-Encoding: binary');
+ header('Content-Length: '.filesize($f));
+ # lance le téléchargement des fichiers non affichables
+ header('Content-Disposition: attachment; filename="'._basename($f).'"');
+ readfile($f);
+ }
+ # burn access ?
+ burned($id);
+ exit();
+
+ }else if ($f && is_dir($f)){
+ # folder request: return the folder & subfolders tree
+ $tree=tree($f,return_owner($id),false,true);
+ if (!isset($_GET['rss'])&&!isset($_GET['json'])){ # no html, header etc for rss feed & json data
+ require(THEME_PATH.'/header.php');
+ echo $qrcode;
+ echo ' ';
+ draw_tree($tree);
+ echo '
';
+ echo '
+ '.$call_qrcode;
+ if ($allow_shared_folder_RSS_feed||$allow_shared_folder_JSON_feed){
+ echo '
'.e('This page in',false);
+ }
+ if ($allow_shared_folder_RSS_feed){
+ echo ' ';
+ }
+ if ($allow_shared_folder_JSON_feed){
+ echo '
Json ';
+ }
+ if ($allow_shared_folder_download){
+ echo '
+
'.e('Download a zip from this folder',false).'';
+ }
+ echo '
';
+ require(THEME_PATH.'/footer.php');
+ }
+
+ }else{
+ require(THEME_PATH.'/header.php');
+ echo '
+
+ '.e('This link is no longer available, sorry.',false).'
+
+
';
+ require(THEME_PATH.'/footer.php');
+ }
+
+ # json format of a shared folder (but not for a locked one)
+ if (isset($_GET['json']) && !empty($tree) && strlen($id)<=23){
+ $upload_path_size=strlen($_SESSION['upload_root_path']);
+ foreach ($tree as $branch){
+ $id_tree[file2id($branch)]=$branch;
+ }
+ # burn access ?
+ burned($id);
+ exit(json_encode($id_tree));
+ }
+
+ # RSS format of a shared folder (but not for a locked one)
+ if (isset($_GET['rss']) && !empty($tree) && strlen($id)<=23){
+ $rss=array('infos'=>'','items'=>'');
+ $rss['infos']=array(
+ 'title'=>_basename($f),
+ 'description'=>e('Rss feed of ',false)._basename($f),
+ //'guid'=>$_SESSION['home'].'?f='.$id,
+ 'link'=>htmlentities($_SESSION['home'].'?f='.$id.'&rss'),
+ );
+
+ include('core/Array2feed.php');
+ $upload_path_size=strlen($_SESSION['upload_root_path']);
+ foreach ($tree as $branch){
+ $id_branch=file2id($branch);
+ $rss['items'][]=array(
+ 'title'=>_basename($branch),
+ 'description'=>'',
+ 'pubDate'=>makeRSSdate(date("d-m-Y H:i:s.",filemtime($branch))),
+ 'link'=>$_SESSION['home'].'?f='.$id_branch,
+ 'guid'=>$_SESSION['home'].'?f='.$id_branch,
+ );
+ }
+ array2feed($rss);
+ # burn access ?
+ burned($id);
+ exit();
+ }
+ }
+
+ }else{
+ require(THEME_PATH.'/header.php');
+ echo '
+
+ '.e('This link is no longer available, sorry.',false).'
+
+
';
+ require(THEME_PATH.'/footer.php');
+ }
+
+
+
+?>
\ No newline at end of file
diff --git a/sources/core/templates.php b/sources/core/templates.php
new file mode 100644
index 0000000..952f6fd
--- /dev/null
+++ b/sources/core/templates.php
@@ -0,0 +1,71 @@
+e('Delete this file',false),
+ '#tooltip_link'=>e('Get the share link',false),
+ '#tooltip_qrcode'=>e('Get the qrcode of this link',false),
+ '#tooltip_rename'=>e('Rename this file (share link will not change)',false),
+ '#tooltip_lock'=>e('Put a password on this share',false),
+ '#tooltip_burn'=>e('Turn this share into a burn after access share',false),
+ '#tooltip_renew'=>e('Regen the share link',false),
+ '#tooltip_zipfolder'=>e('Download a zip from this folder',false),
+ '#Move_file_or_folder'=>e('Move file or folder',false),
+ '#Move_to'=>e('Move to',false),
+ '#Move'=>e('Move',false),
+ '#To'=>e('To',false),
+ '#Lock_access'=>e('Lock access',false),
+ '#Please_give_a_password'=>e('Please give a password to lock access to this file',false),
+ '#Rename_file'=>e('Rename this file?',false),
+ '#Rename_item'=>e('Rename this item?',false),
+ '#Rename'=>e('Rename',false),
+ '#Delete_item'=>e('Delete this item?',false),
+ '#Delete'=>e('Delete',false),
+ '#Share_folder'=>e('Share folder',false),
+ '#Share_link'=>e('Share link',false),
+ '#share_text'=>e('Select the users you want to share with',false),
+ '#Copy_link'=>e('Copy this share link',false),
+ '#theme'=>THEME_PATH,
+ '#YES'=>e('Yes',false),
+ '#Move_to'=>e('Move this file to another directory',false),
+ '#Create_new_folder'=>e('Create a subfolder',false),
+ '#Create_folder_title'=>e('Create a subfolder in this folder',false),
+ '#New_folder'=>e('New folder',false),
+ '#paste_url'=>e('Paste a file\'s URL',false),
+ '#paste_url_title'=>e('Paste a file\'s URL to get it on this server',false),
+ '#Read_m3u_playlist'=>e('Read m3u playlist',false),
+ '#local_filename'=>e('Force local filename (leave empty=no change)',false),
+ '#filename'=>e('filename (optionnal)',false),
+
+);
+if (!empty($token)){
+ $replacement['#TOKEN']=$token;
+}
+function load_templates($tpl_array=null){
+ global $replacement;
+ $k=array_keys($replacement);
+ $r=array_values($replacement);
+ $path=THEME_PATH.'/templates/';
+ if (empty($tpl_array)){
+ $tpl_array=_glob($path,$pattern='html');
+ }
+ foreach($tpl_array as $key=>$tpl){
+ $tpl=_basename($tpl);
+ $tpl_name=substr($tpl,0,strlen($tpl)-5);
+ $templates[$tpl_name]=str_replace($k,$r,file_get_contents($path.$tpl));
+ }
+ return $templates;
+}
+
+$templates=load_templates();
+
+
+
+?>
diff --git a/sources/core/test.html b/sources/core/test.html
new file mode 100644
index 0000000..b018b40
--- /dev/null
+++ b/sources/core/test.html
@@ -0,0 +1,2298 @@
+
+
+Bédés
+ #One Shot
+
+ 0 à 9
+
+ 4 Princes De Ganahan (Les)
+
+ 9-11
+
+ 28 jours plus tard
+
+ 42 agents intergalactiques
+
+ 100 âmes
+
+ 666
+
+
+ A
+
+ Abymes
+
+ Achile Talon
+
+ Acriborea
+
+ ADN
+
+ Aigles de Rome (Les)
+
+ Aigles Décapités (Les)
+
+ Ailes Du Phaeton (Les)
+
+ Akira
+
+ Alcyon
+
+ Alim Le Tanneur
+
+ Alpha
+
+ Alter Ego
+
+ Alzéor Mondraggo
+
+ Ames d'Hélios (Les)
+
+ Amulet
+
+ Anachron
+
+ Anahire
+
+ Angor
+
+ Anita Bomba
+
+ Apocalypse Mania
+
+ Aquablue
+
+ Arawn
+
+ Arcanes
+
+ Arcanes d'Alya (Les)
+
+ Arcanes du Minuit Midi (Les)
+
+ Arctica
+
+ Aria
+
+ Asceltis
+
+ Ash
+
+ Asphodèle
+
+ Aspic
+
+ Assassin
+
+ Astérix
+
+ Atalante
+
+ Atalante - L'odyssée
+
+ Attila Mon Amour
+
+ Auberge du bout du monde (L)
+
+ Au delà des Nuages
+
+ Avant l'Incal
+
+ Aventure rocambolesque (Une)
+
+ Aventures d'Alef Thau (Les)
+
+ Awrah
+
+ Azur
+
+
+ B
+
+ Back World
+
+ Balade Au Bout du Monde
+
+ Balle dans la tête (Une)
+
+ Barracuda
+
+ Beauté
+
+ Bidochons (Les)
+
+ Black Op
+
+ Black Sad
+
+ Blake Et Mortimer
+
+ Blast
+
+ Bleu Lézard
+
+ Block 109
+
+ Blondes (Les)
+
+ Blueberry
+
+ Boche (Le)
+
+ Bone
+
+ Borderline
+
+ Boule et Bill
+
+ Bouncer
+
+
+ C
+
+ Canardo
+
+ Cape et de Crocs (De)
+
+ Carmen Mc Callum
+
+ Carnets de Darwin (Les)
+
+ Carême
+
+ Casse (Le)
+
+ Cassio
+
+ Castaka
+
+ Caste Des Méta-barons (La)
+
+ Cellule Poison
+
+ Ce qui est à Nous
+
+ Cercle de Minsk (Le)
+
+ Cercles d'Akamoth (Les)
+
+ Chambres Noires
+
+ Champs d'Azur (Les)
+
+ Chant d'excalibur (Le)
+
+ Chant Des Stryges (Le)
+
+ Chasseur d'éclairs (Le)
+
+ Chasseurs de Reliques
+
+ Chat (Le)
+
+ Chat du Rabbin (Le)
+
+ Chats
+
+ Chinaman
+
+ Chronique des immortels (La)
+
+ Chroniques Barbares
+
+ Chroniques de La Lune Noire (Les)
+
+ Chroniques de Légion (Les)
+
+ Chroniques de Magon (Les)
+
+ Cicatrice du souvenir (La)
+
+ Cinquième Evangile (Le)
+
+ Clan des Chimères (Le)
+
+ Code Mc Callum
+
+ Coeur de Sang (Le)
+
+ Coeurs Boudinés (Les)
+
+ Collège invisible (Le)
+
+ Combat Ordinaire (Le)
+
+ Commedia des ratés (La)
+
+ Communardes
+
+ Complainte des Landes Perdues
+
+ Comptines D'Halloween
+
+ Confrérie du Crabe (La)
+
+ Conquistador
+
+ Contes du Korrigan (Les)
+
+ Corpus Hermeticum
+
+ Croisade
+
+ Croix de Cazenac (La)
+
+ Cross Fire
+
+ Cryozone
+
+ Crève Coeur
+
+ Crépuscule des Dieux (Le)
+
+ Cycle des deux Horizons (Le)
+
+ Cyclopes
+
+ Cédric
+
+ Célestin Gobe La Lune
+
+
+ D
+
+ D
+
+ Dallas Bar
+
+ Dantes
+
+ Dent D'Ours
+
+ Dernier livre de la jungle (Le)
+
+ Dernier Templier (Le)
+
+ Dernier Troyen (Le)
+
+ Destins
+
+ Donjon
+
+ Donjon de Naheulbeuk (Le)
+
+ pdf T01 (S01, P01).pdf
+ pdf T02 (S01, P02).pdf
+ pdf T03 (S02, P01).pdf
+ pdf T04 (S02, P02).pdf
+ pdf T05 (S02, P03).pdf
+ pdf T06 (S02, P04).pdf
+ pdf T07 (S03, P01).pdf
+ pdf T08 (S03, P02).pdf
+ pdf T09 (S03, P03).pdf
+ pdf T10 (S04, P01).pdf
+ pdf T11 (S04, P02).pdf
+ pdf T12 (S04, P03).pdf
+ pdf T13 (S04, P04).pdf
+ pdf T16 (S05, P03).pdf
+ pdf T17.pdf
+
+ Double Gauche
+
+ Double Je
+
+ Double Masque
+
+ Décalogue (Le)
+
+ Démons d'Alexia (Les)
+
+
+ E
+
+ Eaux de Mortelune (Les)
+
+ Ecluses du Ciel (Les)
+
+ Ecole Capucine (L)
+
+ Ekho
+
+ Elfes
+
+ Elixirs
+
+ El Nino
+
+ Elyne
+
+ Empire USA
+
+ Enfants d'ailleurs (Les)
+
+ Enragés (Les)
+
+ Ensembles Contraires (Les)
+
+ Eva Medusa
+
+ Éclipse
+
+ Élias Le Maudit
+
+ Épée de Cristal (L)
+
+
+ F
+
+ Fantômes Blancs
+
+ Feux D'askel (Les)
+
+ Fils de L'officier (Le)
+
+ Finkel
+
+ Fléau des Dieux (Le)
+
+ Fond du monde (Le)
+
+ Forêt (La)
+
+ Fraternity
+
+ Fugitifs de l'ombre (Les)
+
+ Fulu
+
+
+ G
+
+ Galfalek
+
+ Gardien de la lance (Le)
+
+ Gardiens du sang (Les)
+
+ Garulfo
+
+ Gaston Lagaffe
+
+ Geeks (Les)
+
+ Geste Des Chevaliers Dragon (La)
+
+ Gibier de Potence
+
+ Gipsy
+
+ Gloria Victis
+
+ Gnome de Troy
+
+ Golden City
+
+ Golden Cup
+
+ Golden Dogs
+
+ Golias
+
+ Gord
+
+ Gorn
+
+ Graine de Folie (La)
+
+ Grand Jeu (Le)
+
+ Grand Mort (Le)
+
+ Grand pouvoir du Chninkel (Le)
+
+ Grand Siècle (Le)
+
+ Grand Vampire (Le)
+
+ Green Manor
+
+ Guerre Eternelle (La)
+
+
+ H
+
+ Hallooween Blues
+
+ Hannibal Meriadec et les Larmes Odin
+
+ Hardland
+
+ Hauteclaire
+
+ Haute Sécurité
+
+ Hauteville House
+
+ Hertz
+
+ Homme de Goût (Un)
+
+ Horacio d'alba
+
+ Horologium
+
+ Héléna
+
+ Héritage du Diable (L)
+
+
+ I
+
+ I.N.R.I
+
+ IAN
+
+ Idole dans la bombe (L)
+
+ Ile des Morts (L)
+
+ Ils étaient dix
+
+ Immortels (Les)
+
+ Ingmar
+
+ Insurgés d'edaleth (Les)
+
+ IRS
+
+ Isaac Le Pirate
+
+ Isabellae
+
+ Ivanhoé
+
+ Ivresse des fantômes (L)
+
+ Iznogoud
+
+
+ J
+
+ Jessica Blandy
+
+ Je Suis Légion
\ No newline at end of file
diff --git a/sources/index.php b/sources/index.php
new file mode 100644
index 0000000..69cb81e
--- /dev/null
+++ b/sources/index.php
@@ -0,0 +1,37 @@
+'.$message.' ';}
+# page request
+if (!empty($page)&&is_file(THEME_PATH.$page.'.php')){
+ # request for a specific page
+ include(THEME_PATH.$page.'.php');
+}else{
+ # no page request -> home
+ include(THEME_PATH.'home.php');
+}
+#########################################################################################
+require(THEME_PATH.'/footer.php');
+$_SESSION['ERRORS']='';
+?>
\ No newline at end of file
diff --git a/sources/locale/de.php b/sources/locale/de.php
new file mode 100644
index 0000000..21d1a9d
--- /dev/null
+++ b/sources/locale/de.php
@@ -0,0 +1,292 @@
+ "Lasse die Dateien hier fallen oder wähle eine lokale Datei aus",
+# "Error, max filelength:" => "",
+# ": Error, forbidden file format !" => "",
+# "The file to big for the server\'s config" => "",
+# "The file to big for this page" => "",
+# "There was a problem during upload (file was truncated)" => "",
+# "No file upload" => "",
+# "No temp folder" => "",
+# "Write error on server" => "",
+# "The file doesn\'t fit" => "",
+# "Upload error" => "",
+
+##################################################
+# ./core/auto_restrict.php
+##################################################
+# "Account created:" => "",
+# "New password saved for " => "",
+# "Error saving new password for " => "",
+
+##################################################
+# ./core/commands_GET_vars.php
+##################################################
+# "Rss feed of stats" => "",
+
+##################################################
+# ./core/core.php
+##################################################
+# "Private folder is not writable" => "",
+# "Private folder is not readable" => "",
+# "Temp folder is not writable" => "",
+# "Temp folder is not readable" => "",
+# "Problem accessing tree folder: not readable" => "",
+# "Problem accessing tree/folder file: not writable" => "",
+# "Problem accessing " => "",
+# ": folder not readable" => "",
+# ": folder not writable" => "",
+# "is not installed on this server" => "",
+ "More info" => "Mehr Infos",
+ "Problem accessing ID file: not readable" => "Fehler beim Zugriff auf ID-Datei: nicht lesbar",
+ "Problem accessing ID file: not writable" => "Fehler beim Zugriff auf ID-Datei: nicht schreibbar",
+# "Problem accessing stats file: not readable" => "",
+# "Problem accessing stats file: not writable" => "",
+ "Logout" => "Abmelden",
+ "Connection" => "Verbindung",
+# "See as icon" => "",
+# "See as file list" => "",
+ "Manage files" => "Dateien verwalten",
+ "Manage links" => "Links verwalten",
+# "Deleted" => "",
+# "used" => "",
+# "free" => "",
+
+##################################################
+# ./core/GET_POST_admin_data.php
+##################################################
+# "is not writable" => "",
+# "created" => "",
+ "Problem accessing remote file." => "Fehler beim Zugriff auf Remote-Datei",
+# "moved to" => "",
+# "Changes saved" => "",
+
+##################################################
+# ./core/listfiles.php
+##################################################
+ "The user can access this only one time" => "Zugriff nur einmalig",
+ "The user can access this only with the password" => "Zugriff nur mit Passwort",
+ "View this share" => "Datei öffnen",
+# "View this file" => "",
+# "Edit this file" => "",
+# "Share this folder with another user" => "",
+ "Convert this zip file to folder" => "Dieses Archiv in einen Ordner entpacken",
+# "Check all" => "",
+# "Filename" => "",
+# "Filesize" => "",
+# "Foldersize" => "",
+# "Load" => "",
+# "more" => "",
+# "No file or folder" => "",
+
+##################################################
+# ./core/share.php
+##################################################
+ "This share is protected, please type the correct password:" => "Diese Freigabe ist passwortgesichert, bitte gib das richtige Passwort ein: ",
+ "This page in" => "Diese Seite in ???",
+ "Download a zip from this folder" => "Ordner als Zip-Archiv herunterladen",
+ "This link is no longer available, sorry." => "Oh nein, dieser Link ist nicht mehr verfügbar.",
+# "Rss feed of " => "",
+
+##################################################
+# ./core/templates.php
+##################################################
+ "Delete this file" => "Datei löschen",
+ "Get the share link" => "Freigabe-Link generieren",
+# "Get the qrcode of this link" => "",
+ "Rename this file (share link will not change)" => "Datei umbenennen (Freigabe-Link bleibt unverändert)",
+ "Put a password on this share" => "Diese Freigabe mit einem Passwort sichern",
+ "Turn this share into a burn after access share" => "Diese Freigabe in eine Einmal-Freigabe verwandeln",
+ "Regen the share link" => "Freigabe-Link erneuern",
+ "Move file or folder" => "Datei/Ordner verschieben",
+ "Move to" => "Verschieben nach",
+ "Move" => "Verschieben",
+ "To" => "Nach",
+ "Lock access" => "Zugriff sperren",
+ "Please give a password to lock access to this file" => "Gib ein Passwort ein, um diese Datei zu sichern",
+# "Rename this file?" => "",
+# "Rename this item?" => "",
+ "Rename" => "Umbenennen",
+# "Delete this item?" => "",
+ "Delete" => "Löschen",
+# "Share folder" => "",
+ "Share link" => "Freigabe-Link",
+# "Select the users you want to share with" => "",
+ "Copy this share link" => "Freigabe-Link kopieren",
+ "Yes" => "Ja",
+ "Move this file to another directory" => "Datei in einen anderen Ordner verschieben",
+ "Create a subfolder" => "Unterordner erstellen",
+ "Create a subfolder in this folder" => "Unterordner in diesem Ordner erstellen",
+# "New folder" => "",
+ "Paste a file\'s URL" => "Datei-URL einfügen",
+ "Paste a file\'s URL to get it on this server" => "Datei-URL einfügen, um sie auf den Server zu laden",
+# "Read m3u playlist" => "",
+# "Force local filename (leave empty=no change)" => "",
+# "filename (optionnal)" => "",
+
+##################################################
+# ./index.php
+##################################################
+# "Click to remove" => "",
+
+##################################################
+# ./templates/default/admin.php
+##################################################
+ "Choose a folder" => "Ordner auswählen",
+# "Root:" => "",
+# "Filter:" => "",
+# "Paste a file\'s URL to get it on this server" => "",
+# "Delete selected items" => "",
+# "Zip and download selected items" => "",
+
+##################################################
+# ./templates/default/editor.php
+##################################################
+# "Path:" => "",
+# "Write" => "",
+# "See" => "",
+# "Help" => "",
+# "Filename" => "",
+# "Save" => "",
+# "markdown_help" => "",
+
+##################################################
+# ./templates/default/edit_profiles.php
+##################################################
+# "New profile" => "",
+
+##################################################
+# ./templates/default/footer.php
+##################################################
+# "Fork me on github" => "",
+
+##################################################
+# ./templates/default/header.php
+##################################################
+ "Drag, drop, share." => "Drag, Drop, Share.",
+# "Home" => "",
+# "Edit profiles rights" => "",
+ "Users list" => "Liste der Benutzer",
+ "New user" => "Neuer Benutzer",
+ "Access log file" => "Logs ansehen",
+# "Change password" => "",
+# "Rebuild base" => "",
+# "Text editor" => "",
+# "Click or dragover to reveal dropzone" => "",
+# "Upload" => "",
+ "Search in the uploaded files" => "In den hochgeladenen Daten suchen",
+ "Filter" => "Filter",
+# "Markdown editor" => "",
+# "Access log" => "",
+# "Create an account" => "",
+ "Please, login" => "Anmelden, bitte",
+# "Users profiles" => "",
+# "Configure profiles rights" => "",
+
+##################################################
+# ./templates/default/header_markdown.php
+##################################################
+
+##################################################
+# ./templates/default/home.php
+##################################################
+ "BoZoN is a simple filesharing app." => "BoZoN ist eine unkomplizierte Filesharing-App.",
+ "Easy to install, free and opensource" => "Einfach zu installieren, gratis und Open Source",
+ "Just copy BoZoN\'s files on your server. That\'s it." => "Kopiere die Dateien einfach auf deinen Server. Das war's.",
+ "You can freely fork BoZoN and use it as specified in the AGPL licence" => "Du kannst BoZoN einfach auschecken und benutzen, wie in der AGPL beschrieben.",
+# "Easy to use!" => "",
+ "Drag the file you want to share to upload it on the server" => "Lade Dateien per Drag & Drop auf den Server hoch!",
+ "Share the link with your friends" => "Teile Freigabe-Links mit deinen Freunden!",
+# "BoZoN can do more!" => "",
+# "No database: easy to backup or move to a new server." => "",
+# "Lock the access to the file/folder with a password." => "",
+ "Share a file or a folder with a unique acces link with the «burn mode»:" => "Teile Dateien & Ordner über einen Einmal-Link mit dem 'Burn-Modus'!",
+ "Renew a share link with a single clic" => "Erneuere Freigabe-Links mit nur einem Klick!",
+ "Download a folder content into a zip" => "Lade Orderninhalte als Zip herunter!",
+ "Acces to BoZoN on smartphone without any specific app: your browser is enougth" => "Greife mit deinem Smartphone auf BoZoN zu: Dein Browser genügt!",
+# "Use a qrcode to share your link with smartphone users." => "",
+# "Add, remove users and manage their rights" => "",
+ "To upload a folder, just zip and upload it: with one clic it will be turned into a folder on the server." => "Lade ganze Ordner als Archiv hoch: Entpacke sie auf dem Server mit nur einem Klick!",
+ "Modify the templates & style to make your own BoZoN" => "Modifiziere die Templates & Themes und mach' dir dein eigenes BoZoN",
+
+##################################################
+# ./templates/default/login.php
+##################################################
+ "Login" => "Anmelden",
+# "New account" => "",
+# "Change password" => "",
+ "This login is not available, please try another one" => "Dieser Login ist nicht verfügbar, probiere einen anderen",
+ "Wrong combination login/pass" => "Benutzername/Passwort falsch",
+# "The passwords doesn\'t match." => "",
+# "Problem with admin password." => "",
+# "Account created:" => "",
+# "Password changed" => "",
+# "User:" => "",
+# "Old password" => "",
+ "Password" => "Passwort",
+# "Repeat password" => "",
+ "Stay connected" => "Angemeldet bleiben",
+
+##################################################
+# ./templates/default/stats.php
+##################################################
+# "No stats" => "",
+ "Date" => "Datum",
+ "File" => "Datei",
+# "Owner" => "",
+# "IP" => "",
+ "Origin" => "Quelle",
+ "Host" => "Host",
+ "Delete all stat data" => "Statistik löschen",
+# "Export log:" => "",
+
+##################################################
+# ./templates/default/users.php
+##################################################
+# "Status" => "",
+# "Space" => "",
+ "Check users to delete account and files" => "Benutzer auswählen, um den Account und die Daten zu löschen",
+# "Select new status for the users" => "",
+# "User" => "",
+# "Admin" => "",
+# "Configure folders max size" => "",
+# "Change users\'passwords" => "",
+# "Double-clic to generate a password" => "",
+
+##################################################
+# Orphans
+##################################################
+ "Easy to use !" => "Benutzerfreundlich !",
+ "BoZoN can do more !" => "BoZoN kann mehr !",
+ "When burn is on, the user can access the file/folder only once" => "Wenn der Burn-Modus aktiviert ist, kann der User nur ein Mal auf die Freigabe zufreifen.",
+ "account created" => "Account angelegt",
+ "tiny file sharing app, coded with love and php by " => "tiny file sharing app, coded with love and php by ",
+ "Type to filter the list" => "Liste filtern",
+ "Create your account" => "Erstelle deinen Account",
+ "No file on the server" => "Keine Dateien auf dem Server",
+ "Delete this file ?" => "Diese Datei löschen?",
+ "Rename this file ?" => "Diese Datei umbenennen?",
+ "New_folder" => "Neuer_Ordner",
+ "Move files" => "Dateien verschieben",
+ "Files list" => "Liste der Dateien",
+ "Move a file by clicking on it and choosing the destination folder in the list" => "Zum Verschieben Datei anklicken und Zielordner wählen",
+ "Move a folder by clicking on the move icon and choosing the destination folder in the list" => "Zum Verschieben eines Ordners auf das Verschieben-Symbol klicken und Zielordner auswählen",
+ "Lock the access to the file/folder with a password" => "Sichere den Zugriff auf Dateien & Ordner mit einem Passwort",
+ "Renew the share link of the file/folder (in case of a stolen link for example)" => "Freigabe-Link erneuern (z.B. wenn der Link gestohlen wurde)",
+ "Root" => "Root",
+ "If you want to remove the password, just click on Renew button" => "Klicke auf den Renew-Button, um das Passwort zu ändern",
+ "List" => "List",
+ "Icons" => "Icons",
+ "Change theme" => "Theme ändern",
+ "Connect" => "Verbinden",
+
+);
+?>
\ No newline at end of file
diff --git a/sources/locale/en.php b/sources/locale/en.php
new file mode 100644
index 0000000..38957c7
--- /dev/null
+++ b/sources/locale/en.php
@@ -0,0 +1,355 @@
+ "",
+# "Error, max filelength:" => "",
+# ": Error, forbidden file format !" => "",
+# "The file to big for the server\'s config" => "",
+# "The file to big for this page" => "",
+# "There was a problem during upload (file was truncated)" => "",
+# "No file upload" => "",
+# "No temp folder" => "",
+# "Write error on server" => "",
+# "The file doesn\'t fit" => "",
+# "Upload error" => "",
+
+##################################################
+# ./core/auto_restrict.php
+##################################################
+# "Account created:" => "",
+# "New password saved for " => "",
+# "Error saving new password for " => "",
+
+##################################################
+# ./core/commands_GET_vars.php
+##################################################
+# "Rss feed of stats" => "",
+
+##################################################
+# ./core/core.php
+##################################################
+# "Private folder is not writable" => "",
+# "Private folder is not readable" => "",
+# "Temp folder is not writable" => "",
+# "Temp folder is not readable" => "",
+# "Problem accessing tree folder: not readable" => "",
+# "Problem accessing tree/folder file: not writable" => "",
+# "Problem accessing " => "",
+# ": folder not readable" => "",
+# ": folder not writable" => "",
+# "is not installed on this server" => "",
+# "More info" => "",
+# "Problem accessing ID file: not readable" => "",
+# "Problem accessing ID file: not writable" => "",
+# "Problem accessing stats file: not readable" => "",
+# "Problem accessing stats file: not writable" => "",
+# "Logout" => "",
+# "Connection" => "",
+# "See as icon" => "",
+# "See as file list" => "",
+# "Manage files" => "",
+# "Manage links" => "",
+# "Deleted" => "",
+# "used" => "",
+# "free" => "",
+
+##################################################
+# ./core/GET_POST_admin_data.php
+##################################################
+# "is not writable" => "",
+# "created" => "",
+# "Problem accessing remote file." => "",
+# "moved to" => "",
+# "Changes saved" => "",
+
+##################################################
+# ./core/listfiles.php
+##################################################
+# "The user can access this only one time" => "",
+# "The user can access this only with the password" => "",
+# "View this share" => "",
+# "View this file" => "",
+# "Edit this file" => "",
+# "Share this folder with another user" => "",
+# "Convert this zip file to folder" => "",
+# "Check all" => "",
+# "Filename" => "",
+# "Filesize" => "",
+# "Foldersize" => "",
+# "Load" => "",
+# "more" => "",
+# "No file or folder" => "",
+
+##################################################
+# ./core/share.php
+##################################################
+# "This share is protected, please type the correct password:" => "",
+# "This page in" => "",
+# "Download a zip from this folder" => "",
+# "This link is no longer available, sorry." => "",
+# "Rss feed of " => "",
+
+##################################################
+# ./core/templates.php
+##################################################
+# "Delete this file" => "",
+# "Get the share link" => "",
+# "Get the qrcode of this link" => "",
+# "Rename this file (share link will not change)" => "",
+# "Put a password on this share" => "",
+# "Turn this share into a burn after access share" => "",
+# "Regen the share link" => "",
+# "Download a zip from this folder" => "",
+# "Move file or folder" => "",
+# "Move to" => "",
+# "Move" => "",
+# "To" => "",
+# "Lock access" => "",
+# "Please give a password to lock access to this file" => "",
+# "Rename this file?" => "",
+# "Rename this item?" => "",
+# "Rename" => "",
+# "Delete this item?" => "",
+# "Delete" => "",
+# "Share folder" => "",
+# "Share link" => "",
+# "Select the users you want to share with" => "",
+# "Copy this share link" => "",
+# "Yes" => "",
+# "Move this file to another directory" => "",
+# "Create a subfolder" => "",
+# "Create a subfolder in this folder" => "",
+# "New folder" => "",
+# "Paste a file\'s URL" => "",
+# "Paste a file\'s URL to get it on this server" => "",
+# "Read m3u playlist" => "",
+# "Force local filename (leave empty=no change)" => "",
+# "filename (optionnal)" => "",
+
+##################################################
+# ./index.php
+##################################################
+# "Click to remove" => "",
+
+##################################################
+# ./templates/default/admin.php
+##################################################
+# "Choose a folder" => "",
+# "Root:" => "",
+# "Filter:" => "",
+# "Create a subfolder in this folder" => "",
+# "Paste a file\'s URL to get it on this server" => "",
+# "Delete selected items" => "",
+# "Zip and download selected items" => "",
+
+##################################################
+# ./templates/default/editor.php
+##################################################
+# "Path:" => "",
+# "Write" => "",
+# "See" => "",
+# "Help" => "",
+# "Filename" => "",
+# "Save" => "",
+ "markdown_help" => "# Title 1
+ ## Title 2
+ ### Title 3
+ #### Title 4
+ ##### Title 5
+ ###### Title 6
+
+ *italic* or _italic_
+ **bold** or __bold__
+ **_bold italic_**
+ ~~strike~~
+
+ 1. First ordered list item
+ 2. Another item
+ ⋅⋅* Unordered sub-list.
+ 1. Actual numbers doesn't matter, just that it's a number
+ ⋅⋅1. Ordered sub-list
+ 4. And another item.
+ ⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).
+
+ ⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅
+ ⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅
+ ⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)
+
+ * Unordered list can use asterisks
+ - Or minuses
+ + Or pluses
+
+ Links
+ [I'm an inline-style link](https://www.google.com)
+
+ [I'm an inline-style link with title](https://www.google.com 'Google's Homepage')
+
+ [I'm a reference-style link][Arbitrary case-insensitive reference text]
+
+ [I'm a relative reference to a repository file](../blob/master/LICENSE)
+
+ [You can use numbers for reference-style link definitions][1]
+
+ Or leave it empty and use the [link text itself].
+
+ URLs and URLs in angle brackets will automatically get turned into links.
+ http://www.example.com or and sometimes
+ example.com (but not on Github, for example).
+
+ Some text to show that the reference links can follow later.
+
+ [arbitrary case-insensitive reference text]: https://www.mozilla.org
+ [1]: http://slashdot.org
+ [link text itself]: http://www.reddit.com
+
+ Images
+ Inline-style:
+ ![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png 'Logo Title Text 1')
+
+ Reference-style:
+ ![alt text][logo]
+
+ [logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png 'Logo Title Text 2'
+
+ Code
+ ```javascript
+ var s = 'JavaScript syntax highlighting';
+ alert(s);
+ ```
+
+ | Tables | Are | Cool |
+ | ------------- |:-------------:| -----:|
+ | col 3 is | right-aligned | $1600 |
+ | col 2 is | centered | $12 |
+ | zebra stripes | are neat | $1 |
+
+ > Blockquotes are very handy in email to emulate reply text.
+ > This line is part of the same quote.
+
+ Horizontal rules
+ Three or more...
+
+ --- Hyphens
+ *** Asterisks
+ ___ Underscores
+ ",
+
+##################################################
+# ./templates/default/edit_profiles.php
+##################################################
+# "New profile" => "",
+
+##################################################
+# ./templates/default/footer.php
+##################################################
+# "Fork me on github" => "",
+
+##################################################
+# ./templates/default/header.php
+##################################################
+# "Drag, drop, share." => "",
+# "Home" => "",
+# "Edit profiles rights" => "",
+# "Users list" => "",
+# "New user" => "",
+# "Access log file" => "",
+# "Change password" => "",
+# "Rebuild base" => "",
+# "Text editor" => "",
+# "Click or dragover to reveal dropzone" => "",
+# "Upload" => "",
+# "Search in the uploaded files" => "",
+# "Filter" => "",
+# "Markdown editor" => "",
+# "Access log" => "",
+# "Create an account" => "",
+# "Please, login" => "",
+# "Users profiles" => "",
+# "Configure profiles rights" => "",
+# "Manage links" => "",
+# "Manage files" => "",
+
+##################################################
+# ./templates/default/header_markdown.php
+##################################################
+# "Drag, drop, share." => "",
+
+##################################################
+# ./templates/default/home.php
+##################################################
+# "BoZoN is a simple filesharing app." => "",
+# "Easy to install, free and opensource" => "",
+# "Just copy BoZoN\'s files on your server. That\'s it." => "",
+# "You can freely fork BoZoN and use it as specified in the AGPL licence" => "",
+# "More info" => "",
+# "Easy to use!" => "",
+# "Drag the file you want to share to upload it on the server" => "",
+# "Share the link with your friends" => "",
+# "BoZoN can do more!" => "",
+# "No database: easy to backup or move to a new server." => "",
+# "Lock the access to the file/folder with a password." => "",
+# "Share a file or a folder with a unique acces link with the «burn mode»:" => "",
+# "Renew a share link with a single clic" => "",
+# "Download a folder content into a zip" => "",
+# "Acces to BoZoN on smartphone without any specific app: your browser is enougth" => "",
+# "Use a qrcode to share your link with smartphone users." => "",
+# "Add, remove users and manage their rights" => "",
+# "To upload a folder, just zip and upload it: with one clic it will be turned into a folder on the server." => "",
+# "Modify the templates & style to make your own BoZoN" => "",
+
+##################################################
+# ./templates/default/login.php
+##################################################
+# "Login" => "",
+# "New account" => "",
+# "Change password" => "",
+# "Please, login" => "",
+# "This login is not available, please try another one" => "",
+# "Wrong combination login/pass" => "",
+# "The passwords doesn\'t match." => "",
+# "Problem with admin password." => "",
+# "Account created:" => "",
+# "Password changed" => "",
+# "User:" => "",
+# "Old password" => "",
+# "Password" => "",
+# "Repeat password" => "",
+# "Stay connected" => "",
+
+##################################################
+# ./templates/default/stats.php
+##################################################
+# "No stats" => "",
+# "Date" => "",
+# "File" => "",
+# "Owner" => "",
+# "IP" => "",
+# "Origin" => "",
+# "Host" => "",
+# "Delete all stat data" => "",
+# "Export log:" => "",
+
+##################################################
+# ./templates/default/users.php
+##################################################
+# "Delete" => "",
+# "Status" => "",
+# "Space" => "",
+# "Password" => "",
+# "Check users to delete account and files" => "",
+# "Select new status for the users" => "",
+# "User" => "",
+# "Admin" => "",
+# "Configure folders max size" => "",
+# "Change users\'passwords" => "",
+# "Double-clic to generate a password" => "",
+
+);
+?>
\ No newline at end of file
diff --git a/sources/locale/es.php b/sources/locale/es.php
new file mode 100644
index 0000000..e1f2fe9
--- /dev/null
+++ b/sources/locale/es.php
@@ -0,0 +1,338 @@
+ "Deposita los archivos aquí o haz clic para escoger uno en tu ordenador",
+ "Error, max filelength:" => "Error, tamaño máximo para los archivos:",
+# ": Error, forbidden file format !" => "",
+# "The file to big for the server\'s config" => "",
+# "The file to big for this page" => "",
+# "There was a problem during upload (file was truncated)" => "",
+# "No file upload" => "",
+# "No temp folder" => "",
+# "Write error on server" => "",
+ "The file doesn\'t fit" => "El archivos no cabe",
+ "Upload error" => "Error subiendo el archivo",
+
+##################################################
+# ./core/auto_restrict.php
+##################################################
+ "Account created:" => "Cuenta creada:",
+ "New password saved for " => "Nueva contraseña cambiada para ",
+ "Error saving new password for " => "Error guardando la nueva contraseña para ",
+
+##################################################
+# ./core/commands_GET_vars.php
+##################################################
+ "Rss feed of stats" => "Enlace RSS de las estadísticas",
+
+##################################################
+# ./core/core.php
+##################################################
+ "Private folder is not writable" => "Carpeta Private protegida contra la escritura",
+ "Private folder is not readable" => "Carpeta Private protegida contra la lectura",
+ "Temp folder is not writable" => "Carpeta Temp protegida contra la escritura",
+ "Temp folder is not readable" => "Carpeta Temp protegida contra la lectura",
+ "Problem accessing tree folder: not readable" => "Carpeta Tree protegida contra la lectura",
+ "Problem accessing tree/folder file: not writable" => "Carpeta Tree protegida contra la escritura",
+ "Problem accessing " => "Problema accediendo a ",
+ ": folder not readable" => ": Carpeta protegida contra la lectura",
+ ": folder not writable" => ": Carpeta protegida contra la escritura",
+ "is not installed on this server" => "no está instalado en este servidor",
+ "More info" => "Más informaciones",
+ "Problem accessing ID file: not readable" => "Error de acceso leyendo el archivo ID.",
+ "Problem accessing ID file: not writable" => "Error de acceso escribiendo al archivo ID.",
+ "Problem accessing stats file: not readable" => "",
+ "Problem accessing stats file: not writable" => "",
+ "Logout" => "Salir",
+ "Connection" => "Connección",
+ "See as icon" => "Ver como iconos",
+ "See as file list" => "Ver como lista",
+ "Manage files" => "Gestionar los archivos",
+ "Manage links" => "Gestionar los enlaces",
+ "Deleted" => "Borrado",
+ "used" => "utilizado",
+ "free" => "libre",
+
+##################################################
+# ./core/GET_POST_admin_data.php
+##################################################
+ "is not writable" => "está protegido contra la escritura",
+ "created" => "creado",
+ "Problem accessing remote file." => "Imposible acceder al archivo remoto",
+ "moved to" => "movido a",
+ "Changes saved" => "Cambios almacenados",
+
+##################################################
+# ./core/listfiles.php
+##################################################
+ "The user can access this only one time" => "El usuario solo puede acceder al archivo una vez",
+ "The user can access this only with the password" => "El usuario solo puede acceder al archivo con una contraseña",
+ "View this share" => "Ver este archivo",
+ "View this file" => "Ver el archivo",
+ "Edit this file" => "Modificar el archivo",
+ "Share this folder with another user" => "Comparte esta carpeta con otro usuario",
+ "Convert this zip file to folder" => "Convertir este archivo Zip en carpeta",
+ "Check all" => "Seleccionar todo",
+ "Filename" => "Nombre del archivo",
+ "Filesize" => "Tamaño del archivo",
+ "Foldersize" => "Tamaño de la carpeta",
+ "Load" => "Cargar",
+ "more" => "más",
+ "No file or folder" => "Ningún archivo",
+
+##################################################
+# ./core/share.php
+##################################################
+ "This share is protected, please type the correct password:" => "Este enlace está protegido por una contraseña:",
+ "This page in" => "Esta página en formato ",
+ "Download a zip from this folder" => "Bajar un zip con esta carpeta",
+ "This link is no longer available, sorry." => "Este enlace está caducado.",
+ "Rss feed of " => "Enlace RSS de ",
+
+##################################################
+# ./core/templates.php
+##################################################
+ "Delete this file" => "Borra este archivo",
+ "Get the share link" => "Conseguir el enlace público",
+ "Get the qrcode of this link" => "Consigue el código qr del enlace",
+ "Rename this file (share link will not change)" => "Cambiar el nombre (el enlace no cambiará)",
+ "Put a password on this share" => "Proteger con una contraseña",
+ "Turn this share into a burn after access share" => "Pasar al modo acceso único",
+ "Regen the share link" => "Renovar el enlace público",
+ "Move file or folder" => "Mover archivo/carpeta",
+ "Move to" => "Mover a",
+ "Move" => "Mover",
+ "To" => "A",
+ "Lock access" => "Impedir el acceso",
+ "Please give a password to lock access to this file" => "Por favor, ingresa una contraseña para el archivo",
+ "Rename this file?" => "Renombrar el archivo",
+ "Rename this item?" => "¿ Cambiar el nombre del archivo ?",
+ "Rename" => "Cambiar el nombre",
+ "Delete this item?" => "¿ Borrar este elemento ?",
+ "Delete" => "Borrar",
+ "Share folder" => "Compartir carpeta",
+ "Share link" => "Enlace público",
+ "Select the users you want to share with" => "Selecciona los usuarios con quien compartir la carpeta",
+ "Copy this share link" => "Copia este enlace público",
+ "Yes" => "Sí",
+ "Move this file to another directory" => "Desplazar este archivo a otra carpeta",
+ "Create a subfolder" => "Crear una carpeta nueva",
+ "Create a subfolder in this folder" => "Crear una subcarpeta nueva en esta carpeta",
+ "New folder" => "Nueva carpeta",
+ "Paste a file\'s URL" => "Pegar una dirección",
+ "Paste a file\'s URL to get it on this server" => "Pega la dirección de un archivo para duplicarlo",
+# "Read m3u playlist" => "",
+ "Force local filename (leave empty=no change)" => "Cambiar el nombre del archivo (vacío = nombre original)",
+ "filename (optionnal)" => "Nombre del archivo (facultativo)",
+
+##################################################
+# ./index.php
+##################################################
+ "Click to remove" => "Haz clic para quitar",
+
+##################################################
+# ./templates/default/admin.php
+##################################################
+ "Choose a folder" => "Escoja una carpeta",
+ "Root:" => "Raíz :",
+ "Filter:" => "Filtro :",
+ "Paste a file\'s URL to get it on this server" => "Pegar una dirección para guardar el archivo",
+ "Delete selected items" => "Borrar los archivos seleccionados",
+ "Zip and download selected items" => "Crea un archivo Zip con la selección",
+
+##################################################
+# ./templates/default/editor.php
+##################################################
+ "Path:" => "Camino:",
+ "Write" => "Escribir",
+ "See" => "Ver",
+ "Help" => "Ayuda",
+ "Save" => "Guardar",
+ "markdown_help" => "# Título 1
+ ## Título 2
+ ### Título 3
+ #### Título 4
+ ##### Título 5
+ ###### Título 6
+
+ *bastardilla* o _bastardilla_
+ **negrilla** ou __negrilla__
+ **_negrilla bastardilla_**
+ ~~tachado~~
+
+ 1. lista ordenada
+ 2. segunda línea
+ ⋅⋅* no ordenado
+ 1. los números no tienen importancia
+ ⋅⋅1. ordenado
+
+ + lista no ordenada
+ - lista no ordenada
+ * lista no ordenada
+
+ [Texto del enlace](https://direccion.com)
+ ![Alt de la imagen](http://direccion/imagen.jpg)
+
+ ```javascript
+ var s = 'JavaScript syntax highlighting';
+ alert(s);
+ ```
+
+ | Tableros | son | Chulos |
+ | -------------- |:-----------------:| ------:|
+ | col 3 está | alienada derecha | $1600 |
+ | col 2 está | centrada | $12 |
+
+ > para las citas
+ > éste carácter primero:'>'
+
+ --- o *** o ___ = línea",
+
+##################################################
+# ./templates/default/edit_profiles.php
+##################################################
+ "New profile" => "Nuevo perfil",
+
+##################################################
+# ./templates/default/footer.php
+##################################################
+ "Fork me on github" => "Forkéame en github",
+
+##################################################
+# ./templates/default/header.php
+##################################################
+ "Drag, drop, share." => "Arrastra, deposita, comparte.",
+ "Home" => "Entrada",
+ "Edit profiles rights" => "Cambiar los derechos de los perfiles",
+ "Users list" => "Lista de usuarios",
+ "New user" => "Nuevo usuario",
+ "Access log file" => "Estadísticas de acceso",
+ "Change password" => "Cambiar la contraseña.",
+ "Rebuild base" => "Completar la base",
+ "Text editor" => "Editor de texto",
+ "Click or dragover to reveal dropzone" => "Haz click o arrastra un archivo para desubrir la zona de upload",
+ "Upload" => "Subir",
+ "Search in the uploaded files" => "Buscar en los archivos del servidor",
+ "Filter" => "Filtrar",
+ "Markdown editor" => "Editor Markdown",
+ "Access log" => "Log de accesos",
+ "Create an account" => "Crear una cuenta",
+ "Please, login" => "Conéctate",
+ "Users profiles" => "Usuarios",
+ "Configure profiles rights" => "Configurar los derechos de los perfiles",
+
+##################################################
+# ./templates/default/header_markdown.php
+##################################################
+
+##################################################
+# ./templates/default/home.php
+##################################################
+ "BoZoN is a simple filesharing app." => "BoZoN es una simple utilidad de almacenamiento y de reparto de archivos.",
+ "Easy to install, free and opensource" => "Fácil de instalar, libre y de código abierto",
+ "Just copy BoZoN\'s files on your server. That\'s it." => "Solo tienes que subir los archivos de Bozon a tu servidor y ¡ ya está !",
+ "You can freely fork BoZoN and use it as specified in the AGPL licence" => "Puedes copiar y modificar libremente esta utilidad según la licencia AGPL",
+ "Easy to use!" => "Fácil de utilizar",
+ "Drag the file you want to share to upload it on the server" => "Deposita el archivo que quieras subir al servidor",
+ "Share the link with your friends" => "Comparte la dirección con los demás...",
+ "BoZoN can do more!" => "¡ Hay más !",
+ "No database: easy to backup or move to a new server." => "Ningún base de datos: fácil de guardar o de trasladar a otro servidor.",
+ "Lock the access to the file/folder with a password." => "Pónle una contraseña al archivo.",
+ "Share a file or a folder with a unique acces link with the «burn mode»:" => "Comparte un archivo o una carpeta con un enlace público de acceso único con el modo «burn».",
+ "Renew a share link with a single clic" => "Cambia un enlace público con solo un clic.",
+ "Download a folder content into a zip" => "Baja una carpeta de tu BoZoN directamente en formato zip.",
+ "Acces to BoZoN on smartphone without any specific app: your browser is enougth" => "Ingresa en tu BoZoN desde tu móvil solo con el navegador.",
+ "Use a qrcode to share your link with smartphone users." => "Utiliza un QRcode para compartir enlaces con móviles",
+ "Add, remove users and manage their rights" => "Añade y borra cuentas de usuarios y gestiona sus derechos",
+ "To upload a folder, just zip and upload it: with one clic it will be turned into a folder on the server." => "Sube una carpeta completa: la zipeas, la subes al servidor y la dezipeas con un clic.",
+ "Modify the templates & style to make your own BoZoN" => "Crea tu propio BoZoN cambiando el tema y el estilo css",
+
+##################################################
+# ./templates/default/login.php
+##################################################
+ "Login" => "Login",
+ "New account" => "Nueva cuenta",
+ "This login is not available, please try another one" => "Este nombre ya existe, por favor, ingrese uno diferente.",
+ "Wrong combination login/pass" => "Error en el nombre o en la contraseña",
+ "The passwords doesn\'t match." => "Las contraseñas no corresponden",
+ "Problem with admin password." => "La contraseña anterior es falsa.",
+ "Password changed" => "Contraseña cambiada",
+ "User:" => "Usuario:",
+ "Old password" => "Contraseña anterior.",
+ "Password" => "Contraseña",
+ "Repeat password" => "Repetir la contraseña.",
+ "Stay connected" => "Permanecer conectado",
+
+##################################################
+# ./templates/default/stats.php
+##################################################
+ "No stats" => "Ninguna estadística",
+ "Date" => "Fecha",
+ "File" => "archivo",
+ "Owner" => "Propietario",
+# "IP" => "",
+ "Origin" => "Página de origen",
+ "Host" => "Huésped",
+ "Delete all stat data" => "Borrar las estadìsticas",
+ "Export log:" => "Exportar el log :",
+
+##################################################
+# ./templates/default/users.php
+##################################################
+ "Status" => "Estatus",
+ "Space" => "Espacio",
+ "Check users to delete account and files" => "Selecciona los usuarios para borrar su cuenta y sus archivos",
+ "Select new status for the users" => "Cambia el estatus de los usuarios",
+ "User" => "Usuario",
+ "Admin" => "Administrador",
+ "Configure folders max size" => "Limitar la capacidad de las carpetas de usuarios",
+ "Change users\'passwords" => "Cambiar la contraseña de los usuarios",
+ "Double-clic to generate a password" => "Doble clic para generar una contraseña",
+
+##################################################
+# Orphans
+##################################################
+ "When burn is on, the user can access the file/folder only once" => "En modo burn, el usuario solo puede acceder al archivo una vez",
+ "Edit this file" => "",
+ "No file in your personal folder" => "Ningún archivo en tu carpeta personal",
+ "Move files" => "Mover archivos",
+ "Root" => "Raíz",
+ "Manage users" => "Gestionar los usuarios",
+ "Users status" => "estatus des los usuarios",
+ "Type to filter the list" => "Filtrar la lista",
+ "List" => "Lista",
+ "Icons" => "Íconos",
+ "Change theme" => "Cambiar el aspecto",
+ "Connect" => "Conectarse",
+ "Error, forbidden file format!" => "¡ Error, formato prohibido !",
+ "Delete this file?" => "¿ Borrar este archivo ?",
+ "Files list" => "Lista de archivos",
+ "tiny file sharing app, coded with love and php by " => "Mini utilidad para compartir archivos, creada con amor y php por ",
+ "user" => "usuario",
+ "guest" => "invitado",
+ "admin" => "administrador",
+ "add user" => "Añadir usuario",
+ "upload" => "Subir archivos",
+ "delete user" => "Borrar usuario",
+ "change user status" => "cambiar el estatus del usuario",
+ "change folder size" => "cambiar el tamaño de la carpeta",
+ "change status rights" => "cambiar los derechos de los estatuses",
+ "change passes" => "cambiar las contraseñas",
+ "markdown editor" => "Editor Markdown",
+ "regen ID base" => "regenerar la base",
+ "acces logfile" => "log de accesos",
+ "users page" => "página de usuario",
+ "Move a file by clicking on it and choosing the destination folder in the list" => "Mueve un archivo haciendo clic en él y escogiendo el destino en la lista",
+ "Move a folder by clicking on the move icon and choosing the destination folder in the list" => "Mueve una carpeta pinchando en 'Mover' y escogiendo el destino en la lista",
+ "Renew the share link of the file/folder (in case of a stolen link for example)" => "Cambia el enlace de un archivo con solo un clic",
+ "If you want to remove the password, just click on Renew button" => "Si quiere quitarle la contraseña, solo tiene que pinchar en el botón Renovar el enlace",
+
+);
+?>
\ No newline at end of file
diff --git a/sources/locale/fr.php b/sources/locale/fr.php
new file mode 100644
index 0000000..e31a06c
--- /dev/null
+++ b/sources/locale/fr.php
@@ -0,0 +1,343 @@
+ "Glisser les fichiers ici ou cliquer pour sélectionner un fichier local",
+ "Error, max filelength:" => "Erreur, taille max par fichier :",
+# ": Error, forbidden file format !" => "",
+# "The file to big for the server\'s config" => "",
+# "The file to big for this page" => "",
+# "There was a problem during upload (file was truncated)" => "",
+# "No file upload" => "",
+# "No temp folder" => "",
+# "Write error on server" => "",
+ "The file doesn\'t fit" => "Pas assez d'espace libre",
+ "Upload error" => "Erreur lors de l'envoi",
+
+##################################################
+# ./core/auto_restrict.php
+##################################################
+ "Account created:" => "Compte créé :",
+ "New password saved for " => "Nouveau mot de passe sauvé pour ",
+ "Error saving new password for " => "Erreur en sauvant le mot de passe pour ",
+
+##################################################
+# ./core/commands_GET_vars.php
+##################################################
+ "Rss feed of stats" => "RSS des stats",
+
+##################################################
+# ./core/core.php
+##################################################
+ "Private folder is not writable" => "Le dossier private/ est verrouillé en écriture",
+ "Private folder is not readable" => "Le dossier private/ est verrouillé en lecture",
+ "Temp folder is not writable" => "Le dossier private/temp est verrouillé en écriture",
+ "Temp folder is not readable" => "Le dossier private/temp est verrouillé en lecture",
+# "Problem accessing tree folder: not readable" => "",
+# "Problem accessing tree/folder file: not writable" => "",
+ "Problem accessing " => "Problème lors de l'accès à ",
+ ": folder not readable" => ": dossier verrouillé en lecture",
+ ": folder not writable" => ": dossier verrouillé en écriture",
+ "is not installed on this server" => "n'est pas installé sur ce serveur",
+ "More info" => "En savoir plus",
+ "Problem accessing ID file: not readable" => "Erreur d'accès en lecture au fichier ID.",
+ "Problem accessing ID file: not writable" => "Erreur d'accès en écriture au fichier ID.",
+ "Problem accessing stats file: not readable" => "Fichier de stats verrouillé en lecture",
+ "Problem accessing stats file: not writable" => "Fichier de stats verrouillé en écriture",
+ "Logout" => "Déconnexion",
+ "Connection" => "Connexion",
+ "See as icon" => "Voir sous forme d'icônes",
+ "See as file list" => "Voir sous forme de liste",
+ "Manage files" => "Gérer les fichiers",
+ "Manage links" => "Gérer les liens",
+ "Deleted" => "Supprimé",
+ "used" => "utilisé",
+ "free" => "libre",
+
+##################################################
+# ./core/GET_POST_admin_data.php
+##################################################
+ "is not writable" => "est verrouillé en écriture",
+ "created" => "créé",
+ "Problem accessing remote file." => "Problème d'acces au fichier distant",
+ "moved to" => "déplacé vers",
+ "Changes saved" => "Changements sauvegardés",
+
+##################################################
+# ./core/listfiles.php
+##################################################
+ "The user can access this only one time" => "L'utilisateur ne pourra y accéder qu'une fois",
+ "The user can access this only with the password" => "L'utilisateur ne pourra y accéder qu'avec un mot de passe.",
+ "View this share" => "Voir ce partage",
+ "View this file" => "Voir ce fichier",
+ "Edit this file" => "Editer ce fichier",
+ "Share this folder with another user" => "Partager ce dossier avec un autre utilisateur",
+ "Convert this zip file to folder" => "Convertir ce fichier Zip en dossier",
+ "Check all" => "Tout cocher",
+ "Filename" => "Nom de fichier",
+ "Filesize" => "Taille de fichier",
+ "Foldersize" => "Taille du dossier",
+ "Load" => "Charger",
+ "more" => "de plus",
+ "No file or folder" => "Aucun fichier ou dossier",
+
+##################################################
+# ./core/share.php
+##################################################
+ "This share is protected, please type the correct password:" => "Ce lien est protégé: veuillez taper le mot de passe.",
+ "This page in" => "Cette page au format ",
+ "Download a zip from this folder" => "Télécharger un zip à partir de ce dossier",
+ "This link is no longer available, sorry." => "Ce lien n'est plus valable, désolé.",
+ "Rss feed of " => "Flux RSS de ",
+
+##################################################
+# ./core/templates.php
+##################################################
+ "Delete this file" => "Supprimer ce fichier",
+ "Get the share link" => "Obtenir le lien de partage",
+ "Get the qrcode of this link" => "Voir le qrcode de ce lien",
+ "Rename this file (share link will not change)" => "Renommer ce fichier (le lien de partage ne changera pas)",
+ "Put a password on this share" => "Protéger l'accès par mot de passe",
+ "Turn this share into a burn after access share" => "Passer ce partage en mode accès unique",
+ "Regen the share link" => "Régénérer le lien de partage",
+ "Move file or folder" => "Dépl. fichier/dossier",
+ "Move to" => "Déplacer vers",
+ "Move" => "Déplacer",
+ "To" => "Vers",
+ "Lock access" => "Verrouiller l'accès",
+ "Please give a password to lock access to this file" => "Saisir un mot de passe pour verrouiller cette ressource",
+ "Rename this file?" => "Renommer ce fichier ?",
+ "Rename this item?" => "Renommer cet élément ?",
+ "Rename" => "Renommer",
+ "Delete this item?" => "Supprimer cet élément ?",
+ "Delete" => "Supprimer",
+ "Share folder" => "Partager dossier.",
+ "Share link" => "Lien de partage",
+ "Select the users you want to share with" => "Sélectionnez les utilisateurs avec qui partager ce dossier",
+ "Copy this share link" => "Copiez ce lien de partage",
+ "Yes" => "Oui",
+ "Move this file to another directory" => "Déplacer ce fichier vers un autre dossier",
+ "Create a subfolder" => "Créer un nouveau dossier",
+ "Create a subfolder in this folder" => "Créer un sous-dossier dans ce dossier",
+ "New folder" => "Nouveau dossier",
+ "Paste a file\'s URL" => "Coller l'URL d'un fichier",
+ "Paste a file\'s URL to get it on this server" => "Coller l'URL d'un fichier pour le récupérer sur ce serveur",
+# "Read m3u playlist" => "",
+ "Force local filename (leave empty=no change)" => "Changer le nom du fichier (vide = nom original)",
+ "filename (optionnal)" => "Nom de fichier (facultatif)",
+
+##################################################
+# ./index.php
+##################################################
+ "Click to remove" => "Cliquer pour retirer",
+
+##################################################
+# ./templates/default/admin.php
+##################################################
+ "Choose a folder" => "Choisissez un dossier",
+ "Root:" => "Racine :",
+ "Filter:" => "Filtre :",
+ "Paste a file\'s URL to get it on this server" => "Coller l'url d'un fichier pour le récupérer sur ce serveur",
+ "Delete selected items" => "Supprimer les items sélectionnés",
+ "Zip and download selected items" => "Zipper et télécharger les items sélectionnés",
+
+##################################################
+# ./templates/default/editor.php
+##################################################
+ "Path:" => "Chemin:",
+ "Write" => "Écrire",
+ "See" => "Voir",
+ "Help" => "Aide",
+ "Save" => "Sauvegarder",
+ "markdown_help" => "# Titre 1
+ ## Titre 2
+ ### Titre 3
+ #### Titre 4
+ ##### Titre 5
+ ###### Titre 6
+
+ *italique* ou _italique_
+ **gras** ou __gras__
+ **_gras italique_**
+ ~~barré~~
+
+ 1. liste ordonnée
+ 2. deuxième item
+ ⋅⋅* sous-item non ordonné.
+ 1. Les nombres ne sont pas importants
+ ⋅⋅1. sous-item ordonné
+
+ + liste non ordonnée
+ - liste non ordonnée
+ * liste non ordonnée
+
+ [Texte du lien](https://adresse.com)
+ ![Alt de l\'image](http://adressede/image.jpg)
+
+ par référence (permet de répéter un lien/une image sans retaper l\'adresse):
+ [Texte lien][ref1]
+ [ref1]: http://adresse.fr
+
+ ![alt text][logo]
+ [logo]: http://adresse/image.jpg
+
+
+ ```javascript
+ var s = 'JavaScript syntax highlighting';
+ alert(s);
+ ```
+
+ | Tableaux | sont | Cools |
+ | -------------- |:-----------------:| -----:|
+ | col 3 est | alignée à droite | $1600 |
+ | col 2 est | centrée | $12 |
+
+ > pour les citations
+ > ce signe en début de ligne
+
+ --- ou *** ou ___ = ligne",
+
+##################################################
+# ./templates/default/edit_profiles.php
+##################################################
+ "New profile" => "Nouveau profil",
+
+##################################################
+# ./templates/default/footer.php
+##################################################
+ "Fork me on github" => "Forkez-moi sur github",
+
+##################################################
+# ./templates/default/header.php
+##################################################
+ "Drag, drop, share." => "Glisser, déposer, partager.",
+ "Home" => "Accueil",
+ "Edit profiles rights" => "Éditer les droits d'accès des profils",
+ "Users list" => "Liste des utilisateurs",
+ "New user" => "Nouvel utilisateur",
+ "Access log file" => "Voir le fichier d'accès",
+ "Change password" => "Changer le mot de passe",
+ "Rebuild base" => "Régénérer la base",
+ "Text editor" => "Editeur de texte",
+ "Click or dragover to reveal dropzone" => "Cliquez ou glisser un fichier pour révéler la zone d'upload",
+ "Upload" => "Envoyer",
+ "Search in the uploaded files" => "Rechercher dans les fichiers envoyés",
+ "Filter" => "Mot-clé",
+ "Markdown editor" => "Editeur markdown",
+ "Access log" => "Journal des accès",
+ "Create an account" => "Créer un compte",
+ "Please, login" => "Se connecter",
+ "Users profiles" => "Profils utilisateurs",
+ "Configure profiles rights" => "Configurer les droits d'accès",
+
+##################################################
+# ./templates/default/header_markdown.php
+##################################################
+
+##################################################
+# ./templates/default/home.php
+##################################################
+ "BoZoN is a simple filesharing app." => "BoZoN est une application simplifiée de stockage et de partage de fichiers.",
+ "Easy to install, free and opensource" => "Simple à installer, libre et opensource",
+ "Just copy BoZoN\'s files on your server. That\'s it." => "Copiez simplement les fichiers de BoZoN sur votre serveur. C'est tout.",
+ "You can freely fork BoZoN and use it as specified in the AGPL licence" => "Vous pouvez librement forker et utiliser BoZoN comme spécifié dans la licence AGPL",
+ "Easy to use!" => "Simple à utiliser",
+ "Drag the file you want to share to upload it on the server" => "Glisser le fichier à partager pour l'envoyer sur le serveur",
+ "Share the link with your friends" => "Partager un lien avec vos amis...",
+ "BoZoN can do more!" => "Ce n'est pas tout !",
+ "No database: easy to backup or move to a new server." => "Pas de base de données: backup et migration faciles.",
+ "Lock the access to the file/folder with a password." => "Verrouillez l'accès au fichier/dossier à l'aide d'un mot de passe.",
+ "Share a file or a folder with a unique acces link with the «burn mode»:" => "Partagez un fichier ou un dossier pour un accès unique avec le mode «burn».",
+ "Renew a share link with a single clic" => "Renouvelez un lien de partage en un clic.",
+ "Download a folder content into a zip" => "Téléchargez tout un dossier sous la forme d'un fichier zip.",
+ "Acces to BoZoN on smartphone without any specific app: your browser is enougth" => "Accédez à votre BoZoN depuis votre smartphone sans application spécifique.",
+ "Use a qrcode to share your link with smartphone users." => "Utilisez un QRcode pour partager un lien avec un smartphone",
+ "Add, remove users and manage their rights" => "Ajoutez, retirez des utilisateurs et gérez leurs droits",
+ "To upload a folder, just zip and upload it: with one clic it will be turned into a folder on the server." => "Envoyez un dossier complet en le zippant puis en dézippant sur le serveur en un clic.",
+ "Modify the templates & style to make your own BoZoN" => "Modifiez le thème par défaut pour créer votre propre style.",
+
+##################################################
+# ./templates/default/login.php
+##################################################
+ "Login" => "Identifiant",
+ "New account" => "Nouveau compte",
+ "This login is not available, please try another one" => "Ce nom est déjà utilisé, veuillez en choisir un autre.",
+ "Wrong combination login/pass" => "Identifiant ou mot de passe incorrect",
+ "The passwords doesn\'t match." => "Les mots de passe ne correspondent pas.",
+ "Problem with admin password." => "Le mot de passe de l'admin est incorrect.",
+ "Password changed" => "Mot de passe changé",
+ "User:" => "Utilisateur :",
+ "Old password" => "Ancien mot de passe",
+ "Password" => "Mot de passe",
+ "Repeat password" => "Resaisir le mot de passe",
+ "Stay connected" => "Rester connecté",
+
+##################################################
+# ./templates/default/stats.php
+##################################################
+ "No stats" => "Aucune statistique",
+ "Date" => "Date",
+ "File" => "Fichier",
+ "Owner" => "Propriétaire",
+# "IP" => "",
+ "Origin" => "Page d'origine",
+ "Host" => "Hôte",
+ "Delete all stat data" => "Supprimer les données statistiques",
+ "Export log:" => "Exporter le journal :",
+
+##################################################
+# ./templates/default/users.php
+##################################################
+ "Status" => "Statut",
+ "Space" => "Espace",
+ "Check users to delete account and files" => "Selectionnez les utilisateurs pour supprimer leur compte et leurs fichiers.",
+ "Select new status for the users" => "Sélectionnez un nouveau statut pour les utilisateurs",
+ "User" => "Utilisateur",
+ "Admin" => "Administrateur",
+ "Configure folders max size" => "Fixer la taille maximum des dossiers",
+ "Change users\'passwords" => "Changer les mots de passe des utilisateurs",
+ "Double-clic to generate a password" => "Double-cliquez pour générer un mot de passe",
+
+##################################################
+# Orphans
+##################################################
+ "When burn is on, the user can access the file/folder only once" => "Quand l'item est en mode burn, l'utilisateur ne pourra accéder à la ressource qu'une seule fois",
+ "Move files" => "Déplacer des fichiers",
+ "Root" => "Racine",
+ "Manage users" => "Gérer les utilisateurs",
+ "Users status" => "Statut des utilisateurs",
+ "Type to filter the list" => "Filtrer la liste",
+ "List" => "Liste",
+ "Icons" => "Icônes",
+ "Change theme" => "Changer le thème",
+ "Connect" => "Se connecter",
+ "Error, forbidden file format!" => "Erreur, format de fichier interdit !",
+ "Delete this file?" => "Supprimer ce fichier ?",
+ "Files list" => "Liste de fichiers",
+ "tiny file sharing app, coded with love and php by " => "mini app de partage de fichier, codée avec amour et php par ",
+ "guest" => "invité",
+ "user" => "utilisateur",
+ "admin" => "administrateur",
+ "add user" => "ajouter utilisateur",
+ "delete user" => "supprimer utilisateur",
+ "change user status" => "modifier statut",
+ "change folder size" => "modifier espace alloué",
+ "change status rights" => "modifier droits d'accès",
+ "change passes" => "modifier les passes",
+ "markdown editor" => "éditeur markdown",
+ "regen ID base" => "régénérer la base",
+ "acces logfile" => "accéder au log",
+ "users page" => "page utilisateurs",
+ "Move a file by clicking on it and choosing the destination folder in the list" => "Déplacer un fichier en cliquant dessus puis en sélectionnant la destination dans la liste",
+ "Move a folder by clicking on the move icon and choosing the destination folder in the list" => "Déplacer un dossier en cliquant sur 'Déplacer' puis en sélectionnant la destination dans la liste",
+ "Renew the share link of the file/folder (in case of a stolen link for example)" => "Renouveler le lien de partage d'un fichier/dossier quand celui-ci a fuité par exemple",
+ "If you want to remove the password, just click on Renew button" => "Si vous voulez retirer le mot de passe, cliquez sur le bouton Régénérer le lien",
+
+);
+?>
\ No newline at end of file
diff --git a/sources/readme.md b/sources/readme.md
new file mode 100644
index 0000000..8c34876
--- /dev/null
+++ b/sources/readme.md
@@ -0,0 +1,60 @@
+# BoZoN
+
+
+
+## Minimalist Drag & drop file sharing app
+( http://bozon.warriordudimanche.net/ )
+- Install: just unzip on your server; no database/ php 5.2. Then go to index.php?p=admin page and create your login/pass.
+- Config: just change config.php file.
+- Upload a file: go to index.php?p=admin page, connect and then drop files in the dashed area... that's it !
+- Organize files & folders, share them, manage the shared access etc.
+
+The share link is the file link in the admin's view (you can also access it by the button link on the file or the folder.)
+
+## Required
+Php 5 min, php5-gd, ZipArchive
+
+
+## used libraries
+I used a few libs I made
+- auto_restrict : to easily lock access to a page and handle basic security features
+- auto_thumbs : a function to generate all the thumbnails
+- auto_dropzone : a lib that handle the drag and drop function only by including it in a script
+- Array2feed.php : a function used to convert an array into a RSS feed without commiting suicide XD
+- "On-the-fly CSS Compression" (a personal modified version of https://gist.github.com/manastungare/2625128)
+
+and
+
+- sorttables.js (http://www.kryogenix.org/code/browser/sorttable)
+- b-lazy (http://dinbror.dk/blazy)
+- qr-js (http://hg.mearie.org/qrjs)
+- m3uStreamPlayer.js (https://github.com/opi/m3uStreamPlayer)
+- audiojs (http://kolber.github.io/audiojs)
+- scrolltotop : (https://github.com/jerrywham-pluxml5-2/scrollToTop/)
+- marked.js : (https://github.com/chjj/marked)
+- vanillajs : (my own lib, very tiny)
+
+
+## Licence
+All Bozon code and all the personal libs used in it are distributed under AGPL: feel free to fork, adapt, distribute, comment etc but please, keep your fork free too ;-)
+
+## FAQ
+- _I want to add a user_ : There's a [New user] link in the admin's page top menu, click on it and put a login/pass
+- _I want to remove a user_ : Click on the [Users list] link in the admin's page top menu, check the user(s) you want to remove and click on ok.
+- _I've changed some config variables and nothing appends !_ : that's not an issue; all variables are in the Session, so you need to restart chromium/firefox/opera etc to see the changes
+- _can't see icons / problems uploading / list refresh problem_ : take a look to access rights (folders / files)
+- _I want to change my password_ : Use the change password function (top menu)
+- _I forgot my password !_ : just use your FTP client and delete «private/auto_restrict*.php» files, then try to login again and create a new login/pass.
+- _I want to change the default language !_ : see in config.php file you can set fr/en/es but you can also make your own traduction (see in lang.php)
+- _I don't want a stolen link works anymore (but I don't want to delete the file/folder) !_ : in links mode, click on the regen button (recycle icon) and the share link for this item will automatically change.
+- _How to lock a share link with a password ?_ : click on the left menu, use the manage links button; then click on the lock icon on the file/folder and give an password. The file/folder will turn blue with a small lock meaning nobody can now use the share link without the password.
+- _Yes, ok, but how to remove the password ?_ : just click on regen button, the id will be regenerated and the password will be destroyed (the share link will change)
+- _What if I upload, create a folder or move an item with a name conflict ?_ : Don't worry, BoZoN will just rename the file to avoid overwriting.
+- _How to create my own skin ?_ : just copy the default folder in templates/ and make the changes you want, then change the config.php ($default_theme='default';)
+- _How to upload a complete folder with subfolders in one time ?_ : make a zip, upload it and use the convert icon (a folder) The uploaded zip will be unzipped on the server and all files and directory structure will be restored.
+
+## Special thanks
+To Cyrille Borne [ https://github.com/cborne & http://www.cyrille-borne.com ]: without your comments, issues reporting and enhancement ideas this app would never have been so complete ;-)
+To Eauland for his great job on my poor css/html code (a pain in the ass it seems ! ^^)
+
+
diff --git a/sources/templates/default/admin.php b/sources/templates/default/admin.php
new file mode 100644
index 0000000..3f30074
--- /dev/null
+++ b/sources/templates/default/admin.php
@@ -0,0 +1,266 @@
+
+
+ TOKEN
+ );
+ echo template('dialog_password',$array);
+}
+if ($mode=='view'){
+ # Add shares from others users
+ $shared_with=load_folder_share();
+ if (!empty($shared_with[$_SESSION['login']])){
+ $shared_folders.= '';
+ $saveshare=false;
+ foreach($shared_with[$_SESSION['login']] as $id=>$data){
+ if (is_dir($data['folder'])&&!empty($ids[$id])){
+ $folder=_basename($data['folder']);
+ $array=array(
+ '#CLASS' => 'shared_folder',
+ '#ID' => $id,
+ '#FICHIER' => $folder,
+ '#TOKEN' => TOKEN,
+ '#NAME' => $folder,
+ '#FROM' => $data['from'],
+ );
+ $shared_folders.= template($mode.'_shared_folder_'.$layout,$array);
+ }else{
+ # remove obsolete shared IDs
+ unset($shared_with[$_SESSION['login']][$id]);
+ $saveshare=true;
+ }
+ }
+ $shared_folders.= '
';
+ save_folder_share($shared_with);
+ }
+
+ # Prepare folder tree for move dialog box
+ $select_folder=''.e('Choose a folder',false).' ';
+ $folders_list=user_folder_tree();
+ if (isset($folders_list[0])){$folders_list[0].='/';}
+
+ foreach($folders_list as $folder){
+ $folder=substr($folder,$upload_path_size);
+ $select_folder.=''.$folder.' ';
+ }
+
+ $select_folder.=' ';
+ # Add move dialogbox to the page
+ $array=array(
+ '#LIST_FILES_SELECT' => $select_folder,
+ '#TOKEN' => TOKEN,
+ );
+
+ $dia=str_replace('#LIST_FILES_SELECT',$select_folder,$templates['dialog_move']);
+ $dia=str_replace('#TOKEN',TOKEN,$dia);
+ echo $dia;
+}
+
+?>
+
+
+
+
+
+
+
/
+
+ 1){unset($previous_path[$nb_folders-1]);$previous_path = implode('/',$previous_path);}
+ elseif($nb_folders=1&&!empty($previous_path[0])){$previous_path='/';}
+ else{$previous_path='';}
+
+
+ $chemin='';
+ foreach($ariane as $nb=>$folder){
+ if (!empty($folder)){
+ $chemin.=$folder;
+ echo '
'.$folder.' ';
+ $chemin.='/';
+ }
+ }
+
+ if (!empty($previous_path)&&$show_back_button){
+ $back_button='
';
+ $back_link='
+
.
+
..
+ ';
+ echo $back_button;
+ }
+ ?>
+
+
+ '.e('Filter:',false).' '.$_SESSION['filter'].'';
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sources/templates/default/css/admin.css b/sources/templates/default/css/admin.css
new file mode 100644
index 0000000..b9ee7d7
--- /dev/null
+++ b/sources/templates/default/css/admin.css
@@ -0,0 +1,139 @@
+/* Admin */
+#admin {
+ width: calc(100% - 8px);
+ margin: 0 auto;
+ color: #333;
+}
+
+/* menu */
+#admin #menu{display:block;}
+#admin #menu a.active{box-shadow:inset 0 0 10px #basic_color_superdark!important;}
+#admin #menu a {
+ display: block;
+ padding: 5px;
+ width: 22px;
+ height: 22px;
+ float: left;
+ margin-bottom: 10px;
+ border-top: 1px solid #888;
+ border-bottom: 1px solid #888;
+}
+#admin #menu a:hover {background-color: #hover_color_dark!important}
+
+#admin #menu a:first-of-type {
+ border-left: 1px solid #888;
+ border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+}
+
+#admin #menu a:last-of-type {
+ border-right: 1px solid #888;
+ border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+}
+
+#admin #menu #delete_selection
+{background:#e20;}
+#admin #menu #delete_selection.show
+{opacity:100;max-width:200px;transition:all 300ms;margin-left:2px;}
+#admin #menu #delete_selection:hover
+{background-color:#f30!important;transition:all 300ms;}
+#admin #menu #delete_selection,#admin #menu #zip_selection
+{
+ font-size:18px;
+ color:rgba(255,255,255,0.7);
+ text-align:center;
+ line-height:30px;
+ cursor:pointer;transition:all 300ms;
+ opacity:0;max-width:0;
+ overflow:hidden;
+ display: inline-block;
+ padding: 0;
+ width: 34px;
+ height: 34px;
+ border-radius: 3px;
+ margin-left:0;
+}
+#admin #menu #zip_selection.show
+{opacity:100;max-width:200px;transition:all 300ms;margin-left:2px;}
+#admin #menu #zip_selection:hover
+{background-color:#03F!important;transition:all 300ms;}
+#admin #menu #zip_selection{background: #02e;}
+
+#admin #menu a:hover{color:white;}
+#admin #menu a{
+ text-align:center;
+ vertical-align:middle;
+ color:rgba(255,255,255,0.8);
+ font-size:18px;
+ background: #basic_color_neutral
+}
+
+
+/* fil ariane */
+#admin #fil_ariane{
+ clear: both;
+ width: 100%;
+ height: 32px;
+ line-height: 32px;
+ vertical-align: middle;
+ border-bottom: 1px solid #888;
+ font-size: 1.2em;
+ margin-bottom:10px;
+}
+
+#admin #fil_ariane .ariane_home {
+ display: inline-block;
+ width: 25px;
+ height: inherit;
+ font-size:20px;
+ line-height:15px;
+}
+#admin #fil_ariane .back {
+ display: inline-block;
+ width: 32px;
+ height: inherit;
+ font-size:20px;
+ line-height:15px;
+}
+#admin #fil_ariane a:hover{color:#hover_color_neutral;}
+#admin #fil_ariane a.ariane_item{margin-left:5px;}
+#admin #fil_ariane a.ariane_item:after{
+ content:"/";
+ margin-left:5px;
+ margin-right:5px;
+ height:38px;
+ display:inline-block;
+ line-height: 30px;
+ color:rgba(0,0,0,0.5);
+
+ text-decoration: none;
+ font-size:1em;
+}
+
+#folder_size{
+ color:rgba(0,0,0,0.5);
+}
+
+/* filtre */
+#admin #filter {
+ margin: 15px 0;
+ font-size: 0.9em;
+}
+
+
+#ID_folder{text-align:center;color:rgba(0,0,0,0.8);font-size:1.2em;}
+
+#toplink a{color:rgba(0,0,0,0.5)}
+#toplink{
+ font-size:2em;
+ padding:5px;
+ background-color:rgba(0,0,0,0.2);
+ border-radius:3px;
+ width:48px;height: 48px;
+ text-align:center;
+ position:fixed;
+ bottom:5px;right:5px;
+}
+
+.info{text-align: center;padding:10px;border-radius: 3px;background-color: rgba(100,100,100,0.5);margin:5px;color:white;text-shadow:0 1px 1px rgba(0,0,0,0.2);}
\ No newline at end of file
diff --git a/sources/templates/default/css/dialog.css b/sources/templates/default/css/dialog.css
new file mode 100644
index 0000000..7febe80
--- /dev/null
+++ b/sources/templates/default/css/dialog.css
@@ -0,0 +1,154 @@
+/* Dialog boxes */
+.dialog {
+ display: none;
+ position: fixed;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 1;
+}
+
+.dialog:target {
+ display: table;
+}
+
+.dialog figure {
+ display: table-cell;
+ margin: 0;
+ padding: 0;
+ width: 100%;
+ height: 100%;
+ vertical-align: middle;
+}
+
+.dialog figure figcaption {
+ display: block;
+ margin: auto;
+ padding: 0;
+ background: linear-gradient(#ddd,#eee);
+ position: relative;
+ overflow: hidden;
+ border: 1px #888 solid;
+ border-top: 1px #basic_color_light solid;
+ border-bottom: 1px #777 solid;
+ border-radius: 3px;
+ box-shadow: 0 1px 2px rgba(0,0,0,0.4);
+ text-align: justify;
+ font-size: 14px;
+}
+
+.dialog figure figcaption p{margin:10px;}
+
+.dialog figure .closemsg {
+ display: block;
+ margin: auto;
+ height: 0;
+ overflow: visible;
+ text-align: right;
+ z-index: 2;
+ cursor: default;
+}
+
+.dialog figure .closemsg,
+.dialog figure figcaption {
+ width: 400px;
+}
+
+.dialog figure .closemsg::after {
+ content: "\00D7";
+ font-size: 20px;
+ display: inline-block;
+ position: relative;
+ right: 8px;
+ top: 11px;
+ z-index: 3;
+ color: rgba(255,255,255,0.8);
+ width: 20px;
+ height: 20px;
+ line-height: 18px;
+ text-align: center;
+ margin: 0;
+
+ font-weight: bold;
+ cursor: pointer;
+}
+
+.dialog figure .closemsg::before {
+ content: "";
+ display: block;
+ position: fixed;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0,0,0,0.8);
+}
+
+.dialog select {
+ display: block;
+ width: 100%;
+ height: 32px;
+ color: rgba(0,0,0,0.7);
+ box-shadow: 0 1px 2px rgba(0,0,0,0.2);
+}
+
+.dialog h1 {
+ background: linear-gradient(#basic_color_dark,#basic_color_neutral);
+ margin: 0;
+ padding: 10px;
+ font-weight: bold;
+ border-bottom: 1px rgba(0,0,0,0.1) solid;
+ font-size: 18px;
+ color: #fff;
+
+ text-shadow: 0 0px 1px rgba(0,0,0,0.9);
+ margin-bottom: 0;
+}
+
+.dialog form{
+ padding: 15px;
+}
+
+.dialog label{
+ color: rgba(0,0,0,0.7);
+ padding-bottom: 7px;
+ display: inline-block;
+}
+
+.dialog input[type=text],
+.dialog textarea,
+.dialog select {
+ display: block;
+ background: linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.2));
+ border: 1px solid rgba(0,0,0,0.3);
+ border-bottom: 1px rgba(255,255,255,0.3) solid;
+ font-size: 14px;
+ color: rgba(0,0,0,0.5);
+ text-shadow: 0 1px 1px rgba(255,255,255,0.5);
+ margin:20px 0 20px 0;
+ width:340px;
+ border-radius: 3px;
+ box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
+ padding: 6px;
+}
+
+.dialog input[type=submit]{
+ display: block;
+ margin: 0 auto;
+ margin-top: 25px;
+ margin-bottom:15px;
+ width: 100px;
+}
+
+#link_box textarea {
+ resize:none;
+}
+
+
+#qrcode_img {
+ display: block;
+ margin: 5px auto;
+ width: 256px;
+ height: 256px;
+}
diff --git a/sources/templates/default/css/edit_profiles.css b/sources/templates/default/css/edit_profiles.css
new file mode 100644
index 0000000..a381500
--- /dev/null
+++ b/sources/templates/default/css/edit_profiles.css
@@ -0,0 +1,13 @@
+#edit_profiles {text-align: center;}
+#edit_profiles input[type=checkbox]:checked+.btn{background-color:#0a0;color:white;}
+#edit_profiles input[type=checkbox]{display:none;}
+#edit_profiles input[type=submit]{display:block;width:200px;margin:auto;}
+#edit_profiles .btn{font-size:0.9em;background-color:#a00;color:rgba(255,255,255,0.5);}
+#edit_profiles .npt{width:100%;max-width:200px;}
+#edit_profiles table{ text-align: left; border-collapse: collapse;display:inline-block;}
+#edit_profiles td:first-of-type{}
+#edit_profiles td{vertical-align: middle;padding:10px;}
+#edit_profiles tr{}
+#edit_profiles .add .btn{background:#basic_color_light;}
+#edit_profiles input[type=checkbox]:disabled+.btn{opacity:0.2;}
+
diff --git a/sources/templates/default/css/editor.css b/sources/templates/default/css/editor.css
new file mode 100644
index 0000000..3d8996a
--- /dev/null
+++ b/sources/templates/default/css/editor.css
@@ -0,0 +1,34 @@
+#editor{
+ width:100%;
+ min-height: 500px;
+ text-indent: 7px;
+ margin-bottom: 7px;
+ color: #85888b;
+ border: 1px solid #d6ecfc;
+ border-radius: 5px;
+ background-color:white;
+ padding:10px;
+}
+#editor_page textarea{padding:15px;min-height:500px;resize:vertical;}
+#editor_page {max-width:1200px;padding:20px;margin:auto}
+#editor_page .npt{width:100%;font-size:1.3em;}
+#editor_page .btn{width:200px;font-size:1.4em;display:block;margin:auto;}
+#editor_page .dialog figcaption{
+ padding:15px;
+ max-width:1200px;width:100%;
+}
+#editor_page .tab_space{
+ width:100%;
+ margin:5px auto;
+ max-width:1200px;
+}
+#editor_page #visu{
+ min-height: 500px;
+ margin:0;
+ max-width:100%;
+}
+#editor_page .tabs>li{
+ display: inline-block;
+}
+#editor_page .help_tab{padding:30px;font-size: 1.2em;font-family: monospace;}
+#editor_page .npt{margin:0;margin-bottom:15px;width:calc(100% - 30px);}
\ No newline at end of file
diff --git a/sources/templates/default/css/font/bozon.eot b/sources/templates/default/css/font/bozon.eot
new file mode 100644
index 0000000000000000000000000000000000000000..2fa8ea77df9546f59ccaccd918e90a7f71ed0eb1
GIT binary patch
literal 17140
zcmd^mdw5&Nb?2SAPh0>OARZTdLYDvuP#_3VAPCYDMNuRr(z2@1lB|$2Ba`Aoq)d@C
zMazogq>1f1j#jbV)SuHj+SGY>oj3($C3f3v(ztGt&F3_6wz1QGiC3TNxNx^|wq19d
zW=&{+=i*W#Z8_=Jf0yLkduHa$%$YN1&N*}D@{L|W7)D|O7wCrzvSXHV
z`m~FY{n^Dc_gyVrgLL7Tupr!tG>;-fI3P?3$A#O4IbmE_LWwCHM#++JN|?2AEMcpV
z5n55Ru_X#umqvfcI9-wLE2M@-@`wXHcMClqBTeK)zw-
z3qFJVCFG}1j-Oc+E_vT42wMk{x8}!BPCeK4g_n_^0hj;F;=-xrpWSiCsvzV-$nRQQ
znp*tnt>W(p!mghH|9$q{bs;LG1=hc3-yuO0Ft+_eTw!yw$H!3y$WD@7%TU4u#VJLd
z_(k@RAfx{~InCl+`OPi~TN#%7>RO|2!_Uz4?n$AiC=^@81D8(-N5q4|$APf6@L&>h
zBqwPk(8Vq~bzep)VWsib?Q%)D+s2Woyx4mAGM)lGk*67v;E8}_(5-@g7uvZ6kKl#q
z_^>_|LO=)#At4OGi3pWKl~66z2(>~Tc(X~cgnA(+#DxZ-QAh|$p-I>*q=aUS-vXi9
z0TNqLZ+qLeWVi6GbOsm4%{{u--z^NmzNI=p@L1P;?TcK`1(j_HEHgkPxBhB*=bE`h}vC
zun&ZyldvO%qLZ*UgrbwMON646Xdf4ygqbmG8>@a@$^5qla
zr$jH-yU8r?~qYVRrZNkMT#o`}@kd(xY{$@HcjMpLpog56o|qdZ!=x
zt@llS154jX&ar41_
zecRj84K+cx=x%9_wC56PJf_sKkhz^@^GW2JSvlX)R?a7#`Uvu@BA1BQ$COA#$ZV@e
zeqDRJ-pQ-sa(^Q5RR=!;d>W7Xr+VtY19|G7^3Cz7X;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H_!>A{+v4A{+t^
z6HX6+cM}c)!-PY?2;mTLgmC%*+)OwGj1mq3?;#uljuOsJ0Jjhh0b_(iz&PO$a4cQu
zxWeWM$`rPvc+!Tt08QEQgyJ2@Os5N-SFn#$#>SqpA;O-uAwoToE?jp7^;XK*sB<<%
zs3&cRQ0LQyZC6kiC}X28+7O}MW1ZdgNQBk
d+&=-22`KQ1M^*$+>S=cQcM8%+VIBH~{|7U>Iurl^
literal 0
HcmV?d00001
diff --git a/sources/templates/default/css/font/bozon.svg b/sources/templates/default/css/font/bozon.svg
new file mode 100644
index 0000000..0912909
--- /dev/null
+++ b/sources/templates/default/css/font/bozon.svg
@@ -0,0 +1,108 @@
+
+
+
+Copyright (C) 2016 by original authors @ fontello.com
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sources/templates/default/css/font/bozon.ttf b/sources/templates/default/css/font/bozon.ttf
new file mode 100644
index 0000000000000000000000000000000000000000..e6c88e2e5748045a52fcd3800042043a3caf0e44
GIT binary patch
literal 16984
zcmd^mdw5&Nb?2SAPh0>OARZTdLYDvuP#_3VAPCYDMNuRr(z2@1lB|$2Ba`Aoq)d@C
zMazogq>1f1j#jnZ)SuHj+SGY>oj3($CwALx(ztGt&F3_6wz1QGiC3TNx=6Qiwq19d
zW=(K^=i*W#Z8_=Je;4B1duHa$%$YN1&N*}DN??K@_=FD%qOdq{_@>@M>B*m=%+OWeer_<;U>Qrx#D2zWM_Eps9XHcL%B}vG?
zfqcWv>E&}zpIiHDL1?W+{@Zg46XP`>4L*zfW#p$%kDprf62-^pdx8}!BPd(rD
z`B#vi5d{8U78lMe|J@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Fe+xB51ui8J5-1X>BpaqQgHP(Po2-iEvxH1`pRFe
zwld{D3KIGRmQ@&|&D?Y2@RQsUt(qr!LaZL?B?YHJRbo7h7~hAjg;m_VPq3+3b6Jz~
zzOl)8LF^l!gpT2T<28WCMzAs8+GZRiLF>l%jd#|>F~UB~3om;V^mmOxKnQ6<3A-D-
zmmx^d+i#%+J&vPsqfG>!Fe9YGu8svM=^!3h7+p>{JcxIJHJx^GLBsB~tbOqT8jM!!
zI-6xQ0f(c)k>QNh1;a-aJB8@%D$A8d$*~m)x27~>q@bWz20;aPItP{-n?G3sngx*
zLcaMtWQc_2JhtQ82F9{v3e6b5$7UA^;5v6nxZ>Cq8Eld=jeDRhprEfv>iT?ty(kV`
zOECT;(nowFz0wu$tf}9y-t{96jlIN-b*A>w{OgJHM4~f~D^u>rl*8rC2~&=J7|ay5
zV=wM~hw^>UwJa1YWPvk~F68hUB(CiRU#)$xS?hedK273S7zA7Qr!NV@9soB0U<4dU
zUt)I2Zve1M4iZi;s@_F71Pl=l0XGs30fz{u8^B@0A>at%5O5RW5O9=mdH}qea0nPC
z90EoNhk#>*(+A*Y!XaRka0qx0;Sg|~aCQT@g>VQMBOC(835S3a=|aa9HcwEduoK0T
zHq-@Z%9bY-??PreUFf`meUdUZ_KXb?_N)yN>Zx?$x+|!+QpQG|vmrt~Z9{}QpDygU
zg1SH%8+Fl!2=z7_BGjeylP<&&9nYw@xu8uI#D<}BWNKOjIN9Gm1P6pY0Hs`Zs~1-U
zxfc#Ys{GbAz5f{2!)2E^kSO%8G_d<`gtK`6@QOIuzmlNbpJ*RMY@z4=33yCEfloZL
TB6w2Iu(jVRNWTs1&@cQyKHDjR
literal 0
HcmV?d00001
diff --git a/sources/templates/default/css/font/bozon.woff b/sources/templates/default/css/font/bozon.woff
new file mode 100644
index 0000000000000000000000000000000000000000..305f7326a3d9b46598ca872ae014f483c3a2d288
GIT binary patch
literal 10312
zcmY*KLnLgccxruN28pW2^K&;kI^=;v2|2u(fQfB*pG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sources/templates/default/css/font/bozon.woff2 b/sources/templates/default/css/font/bozon.woff2
new file mode 100644
index 0000000000000000000000000000000000000000..b294698faf7af31a135a490e92907e367509030b
GIT binary patch
literal 8692
zcmV0NDF2F1Rw>4DF=i>40{{BH&q6PjROGT
z{EEr`|8&5K$bdI=*Qw|h5%3dgB{wqnf<9hi9Vb^u%n~pj!*d8ZbMFGbm$`Hj3BH~yC(GX)M8Cyb?
zWf7?_GRLDT)%!{kt2-rv^KnQ^h
z#?;;Z?;Rt6Qm0)qHM6vZlsF>5N>BH<=SZek5=;mbcNcOt8Nb}8fbco{2R|AL{?pI!
zzzQN~r@r&1uUMXWHWoMX2UF2a-THih)nA_o!lDo4F#=?S$cT^;BO^gZii`{yIWh`ll*p)%Q6r;)j3zQ#$Y?`G2Qs>l(SwXW
zWDFo<2pJ>D7(>PcGNzC*gN!+3EFfbE87s(GL&gR&wve%dj6Gx=Ama!bC&)NM#sxC2
zka2^IJ7hc{;|Uor$aur~e2}A55ds2y$4Qdj`~#i!HxQqnBAH8)|MQu8cLdS$pLE48
zkL{>&4)714jR)XO=HP)q6`gqy=tSIK0}DP4$-cqK@nrXNbmp3Vim2O;4ohl;Iap-=
zPpTRGazb*{W|Yt^JakgzK354MJI)35ia91!d_e_T7Rj2OliJn*EhPiI;%Q1A6q*Q3
z%Zb3b9l<3)NGN+W0V59vt5T&-DxL&!EyK8t0;0(==*97}RPXThU{zPvI>qh8yxo-D
z6fFsqWiLL6rbf2awRv#B;pPAe?ZS!hzDO_uBovV34448V@Qa57m9U1#Y3HRjTW^U$bBA;eq89sx2{NbvbOFYL+^5;Q|U
zC|&IlLNM(S=pW`TZN6^^nAOh|0tx0}@Mb?&EE}gK=-hsISiISZZ}t-0#yxh3rxl@s
z?&LvQI9dbafY1_vAQ~#)r*r_En3|B=j--T)Q2b2bJNa2=q`Vfq$`F;^9)_aj0Hn!u9)C4eX>1LNOJZ{Ag!2>r||
zsu(Lan`_A^8cCEIHyeXFu5K#@jino^
zLc-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ldqx6DSEL_6_9&mR&o(J3fiI_CIrwbGyP63=p&aFxTa
zQMvs;6@E8RrF!d-MAQo;B(Si;95={>M}(VoIA8!@0+Sw{zTThjPe(pK$fR6*?=?`5U4b%L=-)Gc(*lOhch>)BOhG2YIWOS!j=FQnF2poX3y)ZxuCWfQTxvf%HRUwba}cu}FW)36
S@X=}2;HUmV_>;7|W&i;0d8If2
literal 0
HcmV?d00001
diff --git a/sources/templates/default/css/font/fontello.eot b/sources/templates/default/css/font/fontello.eot
new file mode 100644
index 0000000000000000000000000000000000000000..17393e868b0c13501300ba43d6809f0bb4cb1cfe
GIT binary patch
literal 12604
zcmeHtdvKiBb>F?;d%t~SUjP;azI|W;Vjp;8K>!4oco5=4BnUtxmLNqefdv5)1Ylqx
ziEh-Uw&i#*wj{fWZ6!@&WhRcMtvVm*bYfecsXL=lokY!eGPPzh>3FJS+A@>KtvgZM
zxDwdk`F58CA2OvTe>5{)V846rx#zxq_uO;OJ>L#>GWN?IjBzF~`Up%GEdrdEIZ>x3
z%lUgxi;ZmW*M2&4k6WcYY>BP2HCAFpwu--X6u8(Fa#z_l@&&dDPLQ1gXOnHQ6-(M+
zoh-vJ5ca70U{j|q_KQqp^Jk{pyM|kjw}JCl_?}z1QP}w5!Mfjr&=|fa7M>{?%Aed(
z7)yK+NEudXi?w*F@I6!IS+-*=<%+y?(O
z{Ul@29^{R+!j0nFzg}C9Jn$0!-NyP>sr4uS4Q(~YG2TlXo5hW;L~S`Ocj?|5N-6QHNGGLUo7P
zX?8Yudg6$n*|O~}QQ<93Sg4R&5JYK&*_g&{+MLQcQ)I5pFnX3twgx|h}=F&A-eakA%Rw?F!!dOjg`r%#o!I~ed2c78WkfR(qWFWAI`fxj(y
zZOm*DZwXclPvXcp31UCLb;
z9TaqXcM>qx*9ejf;Eq!PB!tmXHQo|4PmI4XCqdGo#
zuUzr~8%nxQD3`YC|FoR!{pCIc`QD?L!F>`H{H{U&PDA@>-(JMA^b7o7_3xEd3q#mb?1%JF+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