From: Weblate Date: Thu, 19 Jan 2017 19:09:40 +0000 (+0100) Subject: Merge remote-tracking branch 'origin/master' X-Git-Tag: 3.2.0~31 X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/commitdiff_plain/9e4d7b5f220d21aa832f88efd784e8f464eb5384?hp=e5cee2437ca82dfbe96fa696a4a775689ceae10f Merge remote-tracking branch 'origin/master' --- diff --git a/.gitignore b/.gitignore index bfa50cd..00bbc72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ lib/config.local.php +lib/tos.local.txt var-* diff --git a/NEWCOMER.txt b/CONTRIBUTING.md similarity index 52% rename from NEWCOMER.txt rename to CONTRIBUTING.md index 67bd4b9..9876a21 100644 --- a/NEWCOMER.txt +++ b/CONTRIBUTING.md @@ -1,11 +1,25 @@ +# Contributing + Hi, -This document is only made for newcomers in Jirafeau who are digging into -the code. +this document is made for newcomers in Jirafeau who are digging into the code. + +## General principle + +Jirafeau is made in the [KISS](http://en.wikipedia.org/wiki/KISS_principle) way (Keep It Simple, Stupid). + +It is meant to be a simple filehosting service, simple to use, simple to install, simple to maintain. + +This project won't evolve to a file manager and will focus to keep a very few dependencies. + +So things like a markdown parser for the ToS or E-Mail tasks would be usefull for sure, but may be [rejected](https://gitlab.com/mojo42/Jirafeau/issues/37#note_1191566) since they would a lot of dependencies and makes the project more complex. + +## Structure Here is a little explaination of Jirafeau's arboresence in a simplified view only to show the most importants files and their role. +``` . ├── admin.php : adminitration interface, also permits to download files ├── f.php : permits to download files or show the download page @@ -27,13 +41,22 @@ view only to show the most importants files and their role. ├── async : chunks of uploaded files ├── files : all files that has been successfully uploaded └── links : all links pointing to files with meta-informations +``` + +## Translations + +Translation may be add via [Jirafeau's Weblate](https://hosted.weblate.org/projects/jirafeau/master/). -Coding style: +## Coding style - PHP function keywords are alone on a line -- Braces "{" must are put in a new line -- Files must be in UTF-8 (without BOM) -- Uses LF (\n) for end of lines +- Braces "{" must be put in a new line +- Files must be in UTF-8 without BOM and use Unix Line Endings (LF) + +The whole project is not clean about that yet, feel free to fix :) + +## Merge Requests -The whole project is not clean about that, feel free to fix :) +Please create one branch for each feature and send one merge request for each branch. +Dont squash several changes or commits into one merge request as this is hard to review. diff --git a/COPYING b/LICENSE.txt similarity index 100% rename from COPYING rename to LICENSE.txt diff --git a/README.md b/README.md index 73f943b..76f60a2 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,34 @@ -# Introduction +# Jirafeau Welcome to the official Jirafeau project, an [Open-Source software](https://en.wikipedia.org/wiki/Open-source_software). -Jirafeau is a web site permitting to upload a file in a simple way and give an unique link to it. +Jirafeau is a project permitting a "one-click-filesharing", which makes it possible to upload a file in a simple way and give an unique link to it. -A demonstration of the latest version is available on [jirafeau.net](http://jirafeau.net/) +A demonstration of the latest version is available on [jirafeau.net](http://jirafeau.net/). ![Screenshot1](http://i.imgur.com/TPjh48P.png) -**Main features**: -- One upload => One download link & One delete linkp -- Send any large files (thanks to HTML5) -- NO database, only use basic PHP -- Shows progression: speed, percentage and remaining upload time -- Preview content in browser (if possible) -- Optional Password protection (for uploading or downloading) -- Time limitation -- Option to self-destruct after reading -- Simple language support :gb: :fr: :de: :it: :nl: :ro: :sk: :hu: :cn: :gr: :ru: :es: -- Small administration interface -- File level [Deduplication](http://en.wikipedia.org/wiki/Data_deduplication) for storage optimization -- A basic Terms Of Service which can be adapted to your needs -- Shortened URLs using base 64 encoding -- API interface -- Optional data encryption -- Skins -... +## Main features + +- One upload → One download link & one delete link +- Send any large files (thanks to the HTML5 file API → PHP post_max_size limit not relevant) +- Shows progression: speed, percentage and remaining upload time +- Preview content in browser (if possible) +- Optional password protection (for uploading or downloading) +- Set expiration time for downloads +- Option to self-destruct after first download +- Shortened URLs using base 64 encoding +- Maximal upload size configurable +- NO database, only use basic PHP +- Simple language support :gb: :fr: :de: :it: :nl: :ro: :sk: :hu: :cn: :gr: :ru: :es: +- File level [Deduplication](http://en.wikipedia.org/wiki/Data_deduplication) for storage optimization (does store duplicate files only once, but generate multiple links) +- Optional data encryption +- Small administration interface +- CLI script to remove expired files automatically with a cronjob +- Basic, adaptable »Terms Of Service« page +- Basic API +- Bash script to upload files via command line +- Skins Jirafeau is a fork of the original project [Jyraphe](http://home.gna.org/jyraphe/) based on the 0.5 (stable version) with a **lot** of modifications. @@ -33,19 +36,20 @@ As it's original project, Jirafeau is made in the [KISS](http://en.wikipedia.org Jirafeau project won't evolve to a file manager and will focus to keep a very few dependencies. -# Screenshots +## Screenshots -Here are some screenshots: -- [Installation part 1](http://i.imgur.com/hmpT1eN.jpg) -- [Installation part 2](http://i.imgur.com/2e0UGKE.jpg) -- [Installation part 3](http://i.imgur.com/ofAjLXh.jpg) -- [Installation part 4](http://i.imgur.com/WXqnfqJ.jpg) -- [Upload 1](http://i.imgur.com/SBmSwzJ.jpg) -- [Upload 2](http://i.imgur.com/wzPkb1Z.jpg) -- [Upload 3](http://i.imgur.com/i6n95kv.jpg) -- [Upload 4](http://i.imgur.com/P2oS1MY.jpg) +- [Installation - Step 1](http://i.imgur.com/hmpT1eN.jpg) +- [Installation - Step 2](http://i.imgur.com/2e0UGKE.jpg) +- [Installation - Step 3](http://i.imgur.com/ofAjLXh.jpg) +- [Installation - Step 4](http://i.imgur.com/WXqnfqJ.jpg) +- [Upload - Step 1](http://i.imgur.com/SBmSwzJ.jpg) +- [Upload - Step 2](http://i.imgur.com/wzPkb1Z.jpg) +- [Upload - Progress](http://i.imgur.com/i6n95kv.jpg) +- [Upload - Confirmation page](http://i.imgur.com/P2oS1MY.jpg) +- [Admin Interface](http://i.imgur.com/nTdsVzn.png) + +## Installation -# Installation - [Download](https://gitlab.com/mojo42/Jirafeau/repository/archive.zip) the last version of Jirafeau from GitLab - Upload files on your web server - Don't forget to set owner of uploaded files if you need to @@ -56,7 +60,27 @@ Note that ```lib/config.local.php``` is auto-generated during the installation. If you don't want to go through the installation wizard, you can just copy ```config.original.php``` to ```config.local.php``` and customize it. -# Security +## Update + +### General + +1. Backup you Jirafeau installation +2. Block access to Jirafeau +3. Checkout new version using the [tagged release](https://gitlab.com/mojo42/Jirafeau/tags) +4. With you browser, go to your Jirafeau root page +5. Follow installation wizard, it should propose you the same data folder +7. Go in you lib/config.local.php and lib/config.original.php to check new options + +### From version 1.0 to 1.1 + +1. Add a rewrite rule in your web server configuration to rename file.php to f.php to make old url work again +2. Eventually change skin in »lib/config.local.php« to 'courgette' + +### From version 1.1 to 1.2.0 + +Nothing particular + +## Security ```var``` directory contain all files and links. It is randomly named to limit access but you may add better protection to prevent un-authorized access to it. You have several options: @@ -80,7 +104,7 @@ location ~ /var-.* { You should also remove un-necessessary write access once the installation is done (ex: configuration file). An other obvious basic security is to let access users to the site by HTTPS. -# Few notes about server side encryption +## Server side encryption Data encryption can be activated in options. This feature makes the server encrypt data and send the decryt key to the user (inside download URL). The decrypt key is not stored on the server so if you loose an url, you won't be able to retrieve file content. @@ -96,7 +120,30 @@ By activating this feature, you have to be aware of few things: In a next step, encryption will be made by the client (in javascript), see issue #10. -# FAQ +## License + +GNU Affero General Public License version 3 (AGPLv3). + +The GNU Affero General Public License can be found at https://www.gnu.org/licenses/agpl.html. + +Please note: If you decide do make adaptions to the source code and run a service with these changes incorporated, +you are required to provide a link to the source code of your version in order to obey the AGPLv3 license. +To do so please add a link to the source (eg. a public Git repository or a download link) to the Terms of Service page. +Take a look at the FAQ to find out about how to change the ToS. + +PS: If you have fixed errors or added features, then please contribute to the project and send a merge request with these changes. + +## Contribution + +If you want to contribute to project, then take a look at the git repository: + +- https://gitlab.com/mojo42/Jirafeau + +and the Contribution Guidelines + +- https://gitlab.com/mojo42/Jirafeau/blob/master/CONTRIBUTING.md + +## FAQ ### Can I add a new language in Jirafeau? @@ -165,6 +212,14 @@ If you don't want to allow unlimited upload size, you can still setup a maximal Documentation of all default options are located in [lib/config.original.php](https://gitlab.com/mojo42/Jirafeau/blob/master/lib/config.original.php). If you want to change an option, just edit your ```lib/config.local.php```. +### How can I change the Terms of Service? + +The license text on the "Terms of Service" page, which is shipped with the default installation, is based on the »[Open Source Initiative Terms of Service](https://opensource.org/ToS)«. + +To change this text simply copy the file [/lib/tos.original.txt](https://gitlab.com/mojo42/Jirafeau/blob/master/lib/tos.original.txt), rename it to ```/lib/tos.local.txt``` and adapt it to your own needs. + +If you update the installation, then only the ```tos.original.txt``` file may change eventually, not your ```tos.local.txt``` file. + ### How can I access the admin interface? Just go to ```/admin.php```. @@ -201,14 +256,6 @@ The original project seems not to be continued anymore and I prefer to add more Check [issues](https://gitlab.com/mojo42/Jirafeau/issues) to check open bugs and incoming new stuff. :) -### What is the Jirafeau's license? - -Jirafeau is licensed under [AGPLv3](https://gitlab.com/mojo42/Jirafeau/blob/master/COPYING). - -### How do I modify the TOS (terms of use)? - -Just edit ```tos.php``` and configure ```$org``` and ```$contact``` variables. - ### What about this file deduplication thing? Jirafeau uses a very simple file level deduplication for storage optimization. @@ -230,9 +277,9 @@ So: Feel free to create an issue if you found a bug. -# Release notes +## Release notes -## Version 1.0 +### Version 1.0 The very first version of Jirafeau after the fork of Jyraphe. @@ -248,7 +295,7 @@ The very first version of Jirafeau after the fork of Jyraphe. - New option to show a page at download time - Add option to activate or not preview mode -## Version 1.1 +### Version 1.1 - New skins - Add optional server side encryption @@ -264,16 +311,6 @@ The very first version of Jirafeau after the fork of Jyraphe. - Preview URL - Get Jirafeau's version in admin interface -### Update from 1.0 to 1.1 - -1. Backup you Jirafeau installation -2. Block access to Jirafeau -3. Checkout new version using git tag 1.1 -4. With you browser, go to your Jirafeau root page -5. Follow installation wizard, it should propose you the same data folder -6. Add a rewrite rule in your web server configuration to rename file.php to f.php to make old url work again -7. Go in you lib/config.local.php and lib/config.original.php to check new options and eventually change skin to 'courgette' - ## Version 1.2.0 - Change versioning semantic @@ -283,7 +320,3 @@ The very first version of Jirafeau after the fork of Jyraphe. - Default expiration date set to 'month' - New expiration date: 'quarter' - Small other fixes - -### Update from 1.1 to 1.2.0 - -Nothing particular, just make a backup of your installation before updating. diff --git a/admin.php b/admin.php index cb60580..d602dcd 100644 --- a/admin.php +++ b/admin.php @@ -19,7 +19,6 @@ define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/'); -require (JIRAFEAU_ROOT . 'lib/config.original.php'); require (JIRAFEAU_ROOT . 'lib/settings.php'); require (JIRAFEAU_ROOT . 'lib/functions.php'); require (JIRAFEAU_ROOT . 'lib/lang.php'); diff --git a/f.php b/f.php index 0218602..67590eb 100644 --- a/f.php +++ b/f.php @@ -19,10 +19,9 @@ */ define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/'); -require (JIRAFEAU_ROOT . 'lib/lang.php'); -require (JIRAFEAU_ROOT . 'lib/config.original.php'); require (JIRAFEAU_ROOT . 'lib/settings.php'); require (JIRAFEAU_ROOT . 'lib/functions.php'); +require (JIRAFEAU_ROOT . 'lib/lang.php'); if (!isset ($_GET['h']) || empty ($_GET['h'])) { @@ -141,7 +140,7 @@ if (!empty ($link['key'])) '' . '' . '' . - t('By using our services, you accept our'). ' ' . t('Term Of Service') . '' . + t('By using our services, you accept our'). ' ' . t('Terms of Service') . '.' . ''; if ($link['onetime'] == 'O') @@ -201,10 +200,10 @@ if (!$password_challenged && !$do_download && !$do_preview) ' . htmlspecialchars($link['file_name']) . '' . '' . ''; if ($link['onetime'] == 'O') diff --git a/index.php b/index.php index 4371e9e..2002ad7 100644 --- a/index.php +++ b/index.php @@ -20,7 +20,6 @@ */ define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/'); -require (JIRAFEAU_ROOT . 'lib/config.original.php'); require (JIRAFEAU_ROOT . 'lib/settings.php'); require (JIRAFEAU_ROOT . 'lib/functions.php'); require (JIRAFEAU_ROOT . 'lib/lang.php'); diff --git a/install.php b/install.php index ae4bd99..df4f106 100644 --- a/install.php +++ b/install.php @@ -20,13 +20,16 @@ define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/'); define ('NL', "\n"); define ('QUOTE', "'"); - -define ('JIRAFEAU_CFG', JIRAFEAU_ROOT.'lib/config.local.php'); +define ('JIRAFEAU_CFG', JIRAFEAU_ROOT . 'lib/config.local.php'); define ('JIRAFEAU_VAR_RAND_LENGTH', 15); +require (JIRAFEAU_ROOT . 'lib/settings.php'); require (JIRAFEAU_ROOT . 'lib/functions.php'); require (JIRAFEAU_ROOT . 'lib/lang.php'); -require (JIRAFEAU_ROOT . 'lib/config.original.php'); + +/** + * Prepend used functions + **/ function jirafeau_quoted ($str) @@ -37,32 +40,17 @@ jirafeau_quoted ($str) function jirafeau_export_cfg ($cfg) { - $handle = fopen (JIRAFEAU_CFG, 'w'); - fwrite ($handle, ' $item) - { - fwrite ($handle, '$cfg[' . jirafeau_quoted ($key) . '] = '); - if (is_bool ($item)) - fwrite ($handle, ($item ? 'true' : 'false')); - else if (is_string ($item)) - fwrite ($handle, jirafeau_quoted ($item)); - else if (is_int ($item)) - fwrite ($handle, $item); - else if (is_array ($item)) - fwrite ($handle, str_replace(array("\n", "\r"), "", - var_export ($item, true))); - else - fwrite ($handle, 'null'); - fwrite ($handle, ';'.NL); + 'configuration items.') . ' */' . NL; + $content .= '$cfg = ' . var_export($cfg, true) . ';'; + + $fileWrite = file_put_contents(JIRAFEAU_CFG, $content); + + if (false === $fileWrite) { + jirafeau_fatal_error(t('Can not write local configuration file')); } - /* No newline at the end of the file to be able to send headers. */ - fwrite ($handle, '?>'); - fclose ($handle); } function @@ -120,42 +108,62 @@ jirafeau_add_ending_slash ($path) return $path . ((substr ($path, -1) == '/') ? '' : '/'); } -if ($cfg['installation_done'] === true) +function +jirafeau_fatal_error($errorText) { - header('Location: index.php'); + echo '

Error

' . $errorText . '

'; + require (JIRAFEAU_ROOT . 'lib/template/footer.php'); exit; } +/** + * Check installation + **/ + +// Is the installation process done already? +// Then there is nothing to do here → redirect to the main page. +if ($cfg['installation_done'] === true) +{ + header('Location: index.php'); + exit; +} + +/** + * Prepare installation process + **/ + +require (JIRAFEAU_ROOT . 'lib/template/header.php'); + +// does the local configuration file exist? if (!file_exists (JIRAFEAU_CFG)) { - /* We try to create an empty one. */ + // show an error if it is not possible to create the file if (!@touch (JIRAFEAU_CFG)) { - require (JIRAFEAU_ROOT . 'lib/template/header.php'); - echo '

' . - t('The local configuration file could not be created. Create a ' . + jirafeau_fatal_error( + t('The local configuration file could not be created. Create a ' . 'lib/config.local.php file and give the write ' . 'permission to the web server (preferred solution), or give the ' . 'write permission to the web server on the lib ' . - 'directory.') . - '

'; - require (JIRAFEAU_ROOT . 'lib/template/footer.php'); - exit; + 'directory.') + ); } } +// is the local configuration writable? if (!is_writable (JIRAFEAU_CFG) && !@chmod (JIRAFEAU_CFG, '0666')) { - require (JIRAFEAU_ROOT . 'lib/template/header.php'); - echo '

' . - t('The local configuration is not writable by the web server. ' . - 'Give the write permission to the web server on the ' . - 'lib/config.local.php file.') . - '

'; - require (JIRAFEAU_ROOT . 'lib/template/footer.php'); - exit; + jirafeau_fatal_error( + t('The local configuration is not writable by the web server. ' . + 'Give the write permission to the web server on the ' . + 'lib/config.local.php file.') + ); } +/** + * Run trough each installation step + **/ + if (isset ($_POST['step']) && isset ($_POST['next'])) { switch ($_POST['step']) @@ -185,9 +193,6 @@ if (isset ($_POST['step']) && isset ($_POST['next'])) } -require (JIRAFEAU_ROOT . 'lib/settings.php'); -require (JIRAFEAU_ROOT . 'lib/template/header.php'); - $current = 1; if (isset ($_POST['next'])) $current = $_POST['step'] + 1; @@ -367,4 +372,3 @@ break; } require (JIRAFEAU_ROOT . 'lib/template/footer.php'); -?> diff --git a/lib/config.original.php b/lib/config.original.php index c38e640..2cc93e7 100644 --- a/lib/config.original.php +++ b/lib/config.original.php @@ -18,64 +18,94 @@ * along with this program. If not, see . */ -/* - * default configuration - * if you want to change this, overwrite in a config.local.php file - */ -global $cfg; +/** + * Default configuration + * + * To overwrite these settings copy the file, + * rename it to »config.local.php« and adapt the parameters. + **/ -/* Don't forget the ending '/' */ +/* URL of installation, with traling slash (eg. »https://exmaple.com/jirafeau/«) + */ $cfg['web_root'] = ''; + +/* Path to data directory, with trailing slash (eg. »/var/www/data/var_314159265358979323846264« + */ $cfg['var_root'] = ''; -/* Lang choice between 'auto', 'en' and 'fr'. - * 'auto' mode will take the user's browser informations. - * Will take english if user's langage is not available. +/* Language - choice between 'auto' or any language located in the /lib/locales/ folder. + * The mode »auto« will cause the script to detect the user's browser information + * and offer a matching language, and use »en« if it is not available. */ $cfg['lang'] = 'auto'; -/* Select your style :) See media folder */ + +/* Select a theme - see media folder for available themes + */ $cfg['style'] = 'courgette'; -/* Propose a preview link if file type is previewable. */ + +/* Name the organisation running this installation, eg. 'ACME' + */ +$cfg['organisation'] = 'ACME'; + +/* Provide a contact person for this installation, eg. 'John Doe ' + */ +$cfg['contactperson'] = ''; + +/* Give the installation a title, eg. 'Datahub' or 'John Doe Filehost' + */ +$cfg['title'] = ''; + +/* Propose a preview link if file type is previewable + */ $cfg['preview'] = true; -/* Encryption feature. disable it by default. - * By enabling it, file-level deduplication won't work. + +/* Enable the encryption feature + * By enabling it, file-level deduplication won't work anymore. See FAQ. */ $cfg['enable_crypt'] = false; -/* Split length of link refenrece. */ + +/* Length of link reference + */ $cfg['link_name_length'] = 8; -/* Upload password(s). Empty array disable password authentification. + +/* Upload password(s). + * An empty array will disable the password authentification. * $cfg['upload_password'] = array(); // No password * $cfg['upload_password'] = array('psw1'); // One password * $cfg['upload_password'] = array('psw1', 'psw2'); // Two passwords - * ... and so on */ $cfg['upload_password'] = array(); + /* List of IP allowed to upload a file. - * If list is empty, then there is no upload restriction based on IP + * If the list is empty, then there is no upload restriction based on IP. * Elements of the list can be a single IP (e.g. "123.45.67.89") or * an IP range (e.g. "123.45.0.0/16"). * Note that CIDR notation is available for IPv4 only for the moment. */ $cfg['upload_ip'] = array(); -/* An empty admin password will disable the classic admin password - * authentication. Note that admin password is a sha256 hash of the original - * version. + +/* Password for the admin interface. + * An empty password will disable the password authentification. + * The password is a sha256 hash of the original version. */ $cfg['admin_password'] = ''; -/* If set, let's the user to be authenticated as administrator. + +/* If set, let the user be authenticated as administrator. * The user provided here is the user authenticated by HTTP authentication. - * Note that Jirafeau does not manage the HTTP login part, it just check - * that the provided user is logged. - * If admin_password parameter is also set, admin_password is ignored. + * Note that Jirafeau does not manage the HTTP login part, it just checks + * that the provided user is logged in. + * If »admin_password« parameter is set, then the »admin_password« is ignored. */ $cfg['admin_http_auth_user'] = ''; -/* Select different options for availability of uploaded files. + +/* Allow user to select different options for file expiration time. * Possible values in array: * 'minute': file is available for one minute * 'hour': file available for one hour * 'day': file available for one day * 'week': file available for one week * 'month': file is available for one month + * 'quarter': file is available for three month * 'year': file available for one year * 'none': unlimited availability */ @@ -89,29 +119,29 @@ $cfg['availabilities'] = array ( 'year' => false, 'none' => false ); + /* Set a default value for the expiration time. - * The value has to equal one of the enabled options in »availabilities«, e.g. »month«) + * The value has to equal one of the enabled options in »availabilities«, e.g. »month«. */ $cfg['availability_default'] = 'month'; + /* Set maximal upload size expressed in MB. - * 0 mean unlimited upload size. + * »0« means unlimited upload size. */ $cfg['maximal_upload_size'] = 0; -/* If your Jirafeau is behind some reverse proxies, you can set there IPs - * so Jirafeau get visitor's IP from HTTP_X_FORWARDED_FOR instead of - * REMOTE_ADDR. - * for example: + +/* Proxy IP + * If the installation is behind some reverse proxies, it is possible to set + * the allowed proxy IP. * $cfg['proxy_ip'] = array('12.34.56.78'); + * Jirafeau will then get a visitor's IP from HTTP_X_FORWARDED_FOR + * instead of REMOTE_ADDR. */ $cfg['proxy_ip'] = array(); -/* Installation is done ? */ -$cfg['installation_done'] = false; -/* Try to include user's local configuration. */ -if ((basename (__FILE__) != 'config.local.php') - && file_exists (JIRAFEAU_ROOT.'lib/config.local.php')) -{ - require (JIRAFEAU_ROOT.'lib/config.local.php'); -} +/* Required flag to test if the installation is already installed + * or needs to start the installation script + */ +$cfg['installation_done'] = false; -?> +?> \ No newline at end of file diff --git a/lib/functions.js.php b/lib/functions.js.php index 7a1c5af..31cefe3 100644 --- a/lib/functions.js.php +++ b/lib/functions.js.php @@ -21,7 +21,7 @@ header('Content-Type: text/javascript'); define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/../'); -require (JIRAFEAU_ROOT . 'lib/config.original.php'); + require (JIRAFEAU_ROOT . 'lib/settings.php'); require (JIRAFEAU_ROOT . 'lib/functions.php'); require (JIRAFEAU_ROOT . 'lib/lang.php'); diff --git a/lib/functions.php b/lib/functions.php index 47fbc40..6c9c832 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -1359,3 +1359,33 @@ jirafeau_alias_delete ($alias, $password) return 'Ok'; } +/** + * Replace markers in templates. + * + * Available markers have the scheme "###MARKERNAME###". + * + * @param $content string Template text with markers + * @param $htmllinebreaks boolean Convert linebreaks to BR-Tags + * @return Template with replaced markers + */ +function +jirafeau_replace_markers ($content, $htmllinebreaks = false) +{ + $patterns = array( + '/###ORGANISATION###/', + '/###CONTACTPERSON###/', + '/###WEBROOT###/' + ); + $replacements = array( + $GLOBALS['cfg']['organisation'], + $GLOBALS['cfg']['contactperson'], + $GLOBALS['cfg']['web_root'] + ); + $content = preg_replace($patterns, $replacements, $content); + + if (true === $htmllinebreaks) { + $content = nl2br($content); + } + + return $content; +} \ No newline at end of file diff --git a/lib/locales/de.json b/lib/locales/de.json index 8521d86..a18e593 100644 --- a/lib/locales/de.json +++ b/lib/locales/de.json @@ -74,7 +74,7 @@ "Sorry, the admin interface is not enabled.": "Entschuldigung, die Admin-Oberfläche ist deaktiviert.", "Sorry, the requested file is not found": "Leider wurde die angeforderte Datei nicht gefunden", "Sorry, you are not authenticated on admin interface.": "Entschuldigung, Sie sind nicht auf der Admin-Oberfläche authentifiziert.", - "Term Of Service": "Allgemeine Geschäftsbedingung", + "Terms of Service": "Allgemeine Geschäftsbedingungen", "The async directory is not writable!": "Das Async-Verzeichnis ist nicht beschreibbar!", "The base address of Jirafeau is the first part of the URL, until (and including) the last slash. For example: \"http://www.example.com/\". Do not forget the trailing slash!": "Die Basisadresse von Jirafeau ist der erste Teil der URL, bis (und einschließlich) dem letzten Schrägstrich. Zum Beispiel: \"http://www.example.com/\". Vergessen Sie nicht den abschließenden Schrägstrich!", "The data directory is where your files and information about your files will be stored. You should put it outside your web site, or at least restrict the access to this directory. Do not forget the trailing slash!": "Das Datenverzeichnis ist, wo Ihre Dateien und Informationen über Ihre Dateien gespeichert werden. Sie sollten dieses Verzeichnis außerhalb Ihrer Webseite setzen, oder zumindest den Zugriff auf dieses Verzeichnis beschränken. Vergessen Sie nicht den abschließenden Schrägstrich!", @@ -110,4 +110,4 @@ "second": "Sekunde", "step": "Schritt", "year": "Jahr" -} \ No newline at end of file +} diff --git a/lib/locales/template.json b/lib/locales/template.json index 0c780f7..9ac9141 100644 --- a/lib/locales/template.json +++ b/lib/locales/template.json @@ -8,6 +8,7 @@ "Time limit": "", "Maximum file size": "Taille maximale", "powered by Open-Source project Jirafeau": "", + "Made with": "", "Jirafeau Project": "", "One minute": "", "One hour": "", @@ -43,7 +44,7 @@ "Access denied": "", "You are about to download": "", "By using our services, you accept our": "", - "Term Of Service": "", + "Terms of Service": "", "Warning, this file will self-destruct after being read": "", "Internal error during file creation.": "", diff --git a/lib/settings.php b/lib/settings.php index 3a9f450..3167414 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -17,6 +17,19 @@ * along with this program. If not, see . */ +global $cfg; + +// Read config files +require (JIRAFEAU_ROOT . 'lib/config.original.php'); +if (file_exists(JIRAFEAU_ROOT . 'lib/config.local.php')) +{ + // read local copy and merge with original values + $cfgOriginal = $cfg; + require (JIRAFEAU_ROOT . 'lib/config.local.php'); + $cfg = array_merge($cfgOriginal, $cfg); + unset($cfgOriginal); +} + /* Jirafeau constants */ define ('JIRAFEAU_PACKAGE', 'Jirafeau'); define ('JIRAFEAU_VERSION', '1.2.0'); @@ -40,4 +53,6 @@ define ('JIRAFEAU_MONTH', 2419200); // JIRAFEAU_WEEK * 4 define ('JIRAFEAU_QUARTER', 7257600); // JIRAFEAU_MONTH * 3 define ('JIRAFEAU_YEAR', 29030400); // JIRAFEAU_MONTH * 12 + + ?> diff --git a/lib/template/footer.php b/lib/template/footer.php index a8c080d..132ce90 100644 --- a/lib/template/footer.php +++ b/lib/template/footer.php @@ -1,10 +1,20 @@ diff --git a/lib/template/header.php b/lib/template/header.php index 5a365b9..59d145d 100644 --- a/lib/template/header.php +++ b/lib/template/header.php @@ -46,11 +46,16 @@ else } ?> - <?php echo t('Jirafeau, your web file repository'); ?> + <?php echo (true === empty($cfg['title']))? t('Jirafeau, your web file repository') : $cfg['title']; ?> +
-

+

+ + + +

diff --git a/lib/tos.original.txt b/lib/tos.original.txt new file mode 100644 index 0000000..1e3e01e --- /dev/null +++ b/lib/tos.original.txt @@ -0,0 +1,61 @@ +TERMS OF SERVICE + +1. ACCEPTANCE OF TERMS +###ORGANISATION### provides the information on this Web site as provided in these Terms of Service ("TOS"). ###ORGANISATION### may update the TOS at any time and without prior notice by posting a new version at ###WEBROOT###. The information on this site and your use of it is subject to the most recent version of the TOS posted. + +2. DESCRIPTION OF SERVICE +###ORGANISATION### provides you an upload service and a variety of other services. ("###ORGANISATION### Service"). Unless explicitly stated otherwise, any new features that augment or enhance the current ###ORGANISATION### Service shall be subject to the TOS. + +3. CONDUCT +You understand that all information, data, text, software, graphics or other materials ("Content"), whether publicly posted or privately transmitted, are the sole responsibility of the person from whom such Content originated. This means that you, and not ###ORGANISATION###, are entirely responsible for all Content that you upload, post, email, transmit or otherwise make available via the ###ORGANISATION### Service. ###ORGANISATION### does not control the Content posted via the ###ORGANISATION### Service and, as such, does not guarantee the accuracy, integrity or quality of such Content. Under no circumstances will ###ORGANISATION### be liable in any way for any Content, including, but not limited to, any errors or omissions in any Content, or any loss or damage of any kind incurred as a result of the use of any Content posted, emailed, transmitted or otherwise made available via the ###ORGANISATION### Service. You agree to not use the ###ORGANISATION### Service to: + 1) upload, post, email, transmit or otherwise make available any Content that is unlawful, harmful, threatening, abusive, harassing, tortuous, defamatory, vulgar, obscene, libelous, invasive of another's privacy, hateful, or racially, ethnically or otherwise objectionable or harm minors; + 2) impersonate any person or entity or falsely state or otherwise misrepresent your affiliation with a person or entity; + 3) forge headers or otherwise manipulate identifiers in order to disguise the origin of any Content transmitted through the ###ORGANISATION### Service; + 4) upload, post, email, transmit or otherwise make available any Content that you do not have a right to make available under any law or under contractual or other relationships; + 5) upload, post, email, transmit or otherwise make available any Content that infringes any patent, trademark, trade secret, copyright or other proprietary rights of any party; + 6) upload, post, email, transmit or otherwise make available any unsolicited or unauthorized advertising, promotional materials, "junk mail," "spam," or any other form of solicitation; + 7) upload, post, email, transmit or otherwise make available any material that contains software viruses or any other computer code, files or programs designed to interrupt, destroy or limit the functionality of any computer software or hardware or telecommunications equipment; + 8) disrupt the normal flow of dialogue, or otherwise act in a manner that negatively affects other users' ability to engage in discussions or exchanges; + 9) interfere with or disrupt the ###ORGANISATION### Service or servers or networks connected to the ###ORGANISATION### Service, or disobey any requirements, procedures, policies or regulations of networks connected to the ###ORGANISATION### Service; + 10) intentionally or unintentionally violate any applicable local, state, national or international law, + 11) "stalk" or otherwise harass another; and/or + 12) collect or store personal data about other users in connection with the prohibited conduct and activities set forth in paragraphs above. You acknowledge that ###ORGANISATION### may or may not pre-screen Content, but that ###ORGANISATION### and its designees shall have the right (but not the obligation) in their sole discretion to pre-screen, refuse, move, or remove any Content that is available via the ###ORGANISATION### Service and which violates the TOS. You agree that you must evaluate, and bear all risks associated with, the use of any Content, including any reliance on the accuracy, completeness, or usefulness of such Content. You acknowledge, consent and agree that ###ORGANISATION### may access, preserve and disclose your account information and Content if required to do so by law or in a good faith belief that such access preservation or disclosure is reasonably necessary to: + (a) comply with legal process; + (b) enforce the TOS; + (c) respond to claims that any Content violates the rights of third parties; + (d) respond to your requests for customer service; or (e) protect the rights, property or personal safety of ###ORGANISATION### its users and the public. + +4. CONTENT MADE AVAILABLE FOR INCLUSION ON THE ###ORGANISATION### SERVICE +###ORGANISATION### does not claim ownership of Content you submit or make available for inclusion via the ###ORGANISATION### Service. However, with respect to Content you submit or make available for inclusion on the publicly available ###ORGANISATION### Service, you irrevocably grant ###ORGANISATION### the perpetual, worldwide, royalty-free and non-exclusive license, with the right to sublicense through multiple tiers of sublicensees, to use, distribute, reproduce, modify, adapt, publicly perform and publicly display such Content, in whole or in part, on the ###ORGANISATION### Service or other publications by ###ORGANISATION### in any media whether now existing or which come into the existence into the future and to provide that information under the license set forth on the initial page of the $url Web site. And for Content you submit for private discussions, you grant ###ORGANISATION### the worldwide, royalty-free and non-exclusive license to use, distribute, reproduce, modify, adapt, publicly perform and publicly display such Content on the associated private discussion group. + +5. INDEMNITY +You agree to indemnify and hold ###ORGANISATION### and its subsidiaries, affiliates, officers, agents, employees, partners and licensors harmless from any claim or demand, including but not limited to reasonable attorneys' fees, made by any third party due to or arising out of Content you submit, post, transmit or otherwise make available through the Service, your use of the ###ORGANISATION### Service, your connection to the Service, your violation of the TOS, or your violation of any rights of another. + +6. MODIFICATIONS TO ###ORGANISATION### SERVICE You acknowledge that ###ORGANISATION### may establish general practices and limits concerning use of the ###ORGANISATION### Service, including without limitation the maximum number of days that email messages, message board postings or other uploaded Content will be retained by the ###ORGANISATION### Service.. You further acknowledge that ###ORGANISATION### reserves the right to modify these general practices and limits from time to time. ###ORGANISATION### reserves the right at any time and from time to time to modify or discontinue, temporarily or permanently, the ###ORGANISATION### Service (or any part thereof) with or without notice. You agree that ###ORGANISATION### shall not be liable to you or to any third party for any modification, suspension or discontinuance of the ###ORGANISATION### Service. + +7. TERMINATION +You agree that ###ORGANISATION### may terminate your access to the ###ORGANISATION### Service for violations of the TOS and/or requests by authorized law enforcement or other government agencies. + +8. LINKS +The ###ORGANISATION### Service may provide, or third parties may provide, links to other World Wide Web sites or resources. Because ###ORGANISATION### has no control over such sites and resources, you acknowledge and agree that ###ORGANISATION### is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any Content, advertising, products or other materials on or available from such sites or resources. You further acknowledge and agree that ###ORGANISATION### shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such Content, goods or services available on or through any such site or resource. + +9. DISCLAIMER OF WARRANTIES +You expressly understand and agree that: Your use of the ###ORGANISATION### service is at your sole risk. ###ORGANISATION### service is provided on an "as is" and "as available" basis. ###ORGANISATION### and its subsidiaries, affiliates, officers, employees and licensors expressly disclaim all warranties of any kind, whether express or implied, including, but not limited to the implied warranties of merchantability, fitness for a particular purpose and non-infringement. ###ORGANISATION### and its subsidiaries, affiliates, officers, employees and licensors make no warranty that +(i) The ###ORGANISATION### service will meet your requirements; +(ii) The ###ORGANISATION### service will be uninterrupted, timely, secure or error-free and +(iii) The results that may be obtained from the use of the ###ORGANISATION### service will be accurate or reliable. No advice or information, whether oral or written, obtained by you from ###ORGANISATION### or through or from the service shall create any warranty not expressly stated in the TOS. + +10. LIMITATION OF LIABILITY +You expressly understand and agree that ###ORGANISATION### and its subsidiaries, affiliates, officers, employees, agents, partners and licensors shall not be liable to you for any direct, indirect, incidental, special, consequential or exemplary damages, including, but not limited to, damages for loss of profits, goodwill, use, data or other intangible losses (even if ###ORGANISATION### has been advised of the possibility of such damages), resulting from the use or the inability to use the ###ORGANISATION### service. + +11. NOTICE AND PROCEDURE FOR MAKING CLAIMS OF COPYRIGHT INFRINGEMENT +###ORGANISATION### respects the copyright of others, and we ask our users to do the same. ###ORGANISATION### may, in appropriate circumstances and at its discretion, disable and/or terminate the access of users who may be repeat infringers. If you believe that your work has been copied in a way that constitutes copyright infringement, please provide ###ORGANISATION###'s Copyright Agent the following information: an electronic or physical signature of the person authorized to act on behalf of the owner of the copyright; a description of the copyrighted work that you claim has been infringed; a description of where the material that you claim is infringing is located on the site; your address, telephone number, and email address; a statement by you that you have a good faith belief that the disputed use is not authorized by the copyright owner, its agent, or the law; a statement by you, made under penalty of perjury, that the above information in your Notice is accurate and that you are the copyright owner or authorized to act on the copyright owner's behalf. + +###ORGANISATION###'s Agent for Notice of claims of copyright infringement can be reached as follows: + +###CONTACTPERSON### + + + +This license text is under »Creative Commons - Attribution 3.0 Unported« (https://creativecommons.org/licenses/by/3.0). +It is based on the »Open Source Initiative Terms of Service« (https://opensource.org/ToS). diff --git a/media/courgette/style.css.php b/media/courgette/style.css.php index f3d0879..c4edce4 100644 --- a/media/courgette/style.css.php +++ b/media/courgette/style.css.php @@ -55,6 +55,10 @@ body { line-height: 1.5; } +#content { + padding: 2em; +} + h1 a { display: block; background: url(logo-jirafeau.svg) no-repeat; @@ -173,7 +177,7 @@ input[type="submit"]:focus { text-align: center; font-size: 0.8em; color: #795548; - padding-left: 3em; + margin: 3em auto; } #copyright a { diff --git a/script.php b/script.php index c5adf95..c3b722f 100644 --- a/script.php +++ b/script.php @@ -22,10 +22,8 @@ * If you don't want this feature, you can simply delete this file from your * web directory. */ - define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/'); -require (JIRAFEAU_ROOT . 'lib/config.original.php'); require (JIRAFEAU_ROOT . 'lib/settings.php'); require (JIRAFEAU_ROOT . 'lib/functions.php'); require (JIRAFEAU_ROOT . 'lib/lang.php'); @@ -64,7 +62,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET" && count ($_GET) == 0) } /* Lets use interface now. */ -header('Content-Type: text; charset=utf-8'); +header('Content-Type: text/plain; charset=utf-8'); check_errors ($cfg); if (has_error ()) @@ -243,16 +241,15 @@ elseif (isset ($_GET['lang'])) ?> #!/bin/bash -# This script has been auto-generated by Jirafeau but you can still edit -# options below. +# This script has been auto-generated by Jirafeau but you can still edit options below. -# Config -proxy='' # ex: proxy='proxysever.test.com:3128' or set JIRAFEAU_PROXY global variable -url='' # or set JIRAFEAU_URL ex: url='http://mysite/jirafeau/script.php' -time='' # minute, hour, day, week, month, quarted, year or none. Or set JIRAFEAU_TIME. -one_time='' # ex: one_time="1" or set JIRAFEAU_ONE_TIME. -curl='' # curl path to download or set JIRAFEAU_CURL_PATH. -# End of config +# Config begin +proxy='' # Or set JIRAFEAU_PROXY. +url='' # Or set JIRAFEAU_URL. +time='' # Or set JIRAFEAU_TIME. +one_time='' # Or set JIRAFEAU_ONE_TIME. +curl='' # Or set JIRAFEAU_CURL_PATH. +# Config end if [ -n "$JIRAFEAU_PROXY" ]; then proxy="$JIRAFEAU_PROXY" @@ -292,17 +289,22 @@ if [ -z "$curl" ]; then fi if [ -z "$2" ]; then - echo "man:" - echo " $0 send PATH [PASSWORD]" + echo "Jirafeau Bash Script " + echo "--------------------------" + echo "Usage:" + echo " $0 OPTIONS" + echo + echo "Options:" + echo " $0 send FILE [PASSWORD]" echo " $0 get URL [PASSWORD]" echo " $0 delete URL" - echo "" + echo echo "Global variables to export:" - echo " JIRAFEAU_PROXY : example: proxysever.test.com:3128" - echo " JIRAFEAU_URL : example: http://mysite/jirafeau/script.php" - echo " JIRAFEAU_TIME : minute, hour, day, week, quarter, year, month or none" - echo " JIRAFEAU_ONE_TIME : set anything or set empty" - echo " JIRAFEAU_CURL : path to your curl binary" + echo " JIRAFEAU_PROXY: Domain and port of proxy server, eg. »proxysever.example.com:3128«" + echo " JIRAFEAU_URL : URI to Jirafeau installation with trailing slash, eg. »https://example.com/jirafeau/«" + echo " JIRAFEAU_TIME : expiration time, eg. »minute«, »hour«, »day«, »week«, »month«, »quarter«, »year« or »none«" + echo " JIRAFEAU_ONE_TIME : self-destroy after first download, eg. »1« to enable or »« (empty) to disable" + echo " JIRAFEAU_CURL : alternative path to curl binary" exit 0 fi @@ -322,6 +324,9 @@ if [ -n "$3" ]; then options="$options -F key=$password" fi +apipage='script.php' +downloadpage='f.php' + if [ "$1" == "send" ]; then if [ ! -f "$2" ]; then echo "File \"$2\" does not exists." @@ -332,7 +337,7 @@ if [ "$1" == "send" ]; then res=$($curl -X POST --http1.0 $proxy $options \ -F "time=$time" \ -F "file=@$2" \ - $url) + $url$apipage) if [[ "$res" == Error* ]]; then echo "Error while uploading." @@ -353,12 +358,20 @@ if [ "$1" == "send" ]; then fi cnt=$(( cnt + 1 )) done) - echo "Download link:" - echo "${url}?h=$code" - echo "Direct download link:" - echo "${url}?h=$code&d=1" + + echo + echo "Download page:" + echo " ${url}${downloadpage}?h=$code" + echo "Direct download:" + echo " ${url}${downloadpage}?h=$code&d=1" echo "Delete link:" - echo "${url}?h=$code&d=$del_code" + echo " ${url}${downloadpage}?h=$code&d=$del_code" + echo + echo "Download via API:" + echo " ${0} get ${url}${apipage}?h=$code [PASSWORD}" + echo "Delete via API:" + echo " ${0} delete ${url}${downloadpage}?h=$code&d=$del_code" + elif [ "$1" == "get" ]; then if [ -z "$password" ]; then $curl $proxy -OJ "$2" diff --git a/tos.php b/tos.php index 111916d..44fc86c 100644 --- a/tos.php +++ b/tos.php @@ -1,43 +1,40 @@ -. - */ - -define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/'); -require (JIRAFEAU_ROOT . 'lib/config.original.php'); -require (JIRAFEAU_ROOT . 'lib/settings.php'); -require (JIRAFEAU_ROOT . 'lib/functions.php'); -require (JIRAFEAU_ROOT . 'lib/lang.php'); -require (JIRAFEAU_ROOT . 'lib/template/header.php'); - -$url = $cfg['web_root'] . 'tos.php'; -$org = "[THIS WEBSITE]"; -$contact = " -By email: - contact@[THIS WEBSITE] -"; - -include (JIRAFEAU_ROOT . 'tos_text.php'); - -echo '

Terms of Service

'; -echo '
'; -echo ''; -echo '

This license text is under Creative Commons - Attribution 3.0 Unported.

It has been based on this work: http://opensource.org/ToS

'; -echo '
'; -require (JIRAFEAU_ROOT . 'lib/template/footer.php'); -?> +. + */ + +define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/'); + +require (JIRAFEAU_ROOT . 'lib/settings.php'); +require (JIRAFEAU_ROOT . 'lib/functions.php'); +require (JIRAFEAU_ROOT . 'lib/lang.php'); + +// Read ToS template +if (is_readable(JIRAFEAU_ROOT . 'lib/tos.local.txt')) { + $content = file_get_contents(JIRAFEAU_ROOT . 'lib/tos.local.txt'); +} else { + $content = file_get_contents(JIRAFEAU_ROOT . 'lib/tos.original.txt'); +} + +// Replace markers and print ToS +require (JIRAFEAU_ROOT . 'lib/template/header.php'); + +echo '

Terms of Service

'; +echo '
' . jirafeau_replace_markers($content, true) . '
'; + +require (JIRAFEAU_ROOT . 'lib/template/footer.php'); + +?> \ No newline at end of file diff --git a/tos_text.php b/tos_text.php deleted file mode 100644 index c19c243..0000000 --- a/tos_text.php +++ /dev/null @@ -1,63 +0,0 @@ -http://opensource.org/ToS - */ -$tos=" -TERMS OF SERVICE - -1. ACCEPTANCE OF TERMS -$org provides the information on this Web site as provided in these Terms of Service (\"TOS\"). $org may update the TOS at any time and without prior notice by posting a new version at $url. The information on this site and your use of it is subject to the most recent version of the TOS posted. - -2. DESCRIPTION OF SERVICE -$org provides you an upload service and a variety of other services. (\"$org Service\"). Unless explicitly stated otherwise, any new features that augment or enhance the current $org Service shall be subject to the TOS. - -3. CONDUCT -You understand that all information, data, text, software, graphics or other materials (\"Content\"), whether publicly posted or privately transmitted, are the sole responsibility of the person from whom such Content originated. This means that you, and not $org, are entirely responsible for all Content that you upload, post, email, transmit or otherwise make available via the $org Service. $org does not control the Content posted via the $org Service and, as such, does not guarantee the accuracy, integrity or quality of such Content. Under no circumstances will $org be liable in any way for any Content, including, but not limited to, any errors or omissions in any Content, or any loss or damage of any kind incurred as a result of the use of any Content posted, emailed, transmitted or otherwise made available via the $org Service. You agree to not use the $org Service to: - 1) upload, post, email, transmit or otherwise make available any Content that is unlawful, harmful, threatening, abusive, harassing, tortuous, defamatory, vulgar, obscene, libelous, invasive of another's privacy, hateful, or racially, ethnically or otherwise objectionable or harm minors; - 2) impersonate any person or entity or falsely state or otherwise misrepresent your affiliation with a person or entity; - 3) forge headers or otherwise manipulate identifiers in order to disguise the origin of any Content transmitted through the $org Service; - 4) upload, post, email, transmit or otherwise make available any Content that you do not have a right to make available under any law or under contractual or other relationships; - 5) upload, post, email, transmit or otherwise make available any Content that infringes any patent, trademark, trade secret, copyright or other proprietary rights of any party; - 6) upload, post, email, transmit or otherwise make available any unsolicited or unauthorized advertising, promotional materials, \"junk mail,\" \"spam,\" or any other form of solicitation; - 7) upload, post, email, transmit or otherwise make available any material that contains software viruses or any other computer code, files or programs designed to interrupt, destroy or limit the functionality of any computer software or hardware or telecommunications equipment; - 8) disrupt the normal flow of dialogue, or otherwise act in a manner that negatively affects other users' ability to engage in discussions or exchanges; - 9) interfere with or disrupt the $org Service or servers or networks connected to the $org Service, or disobey any requirements, procedures, policies or regulations of networks connected to the $org Service; - 10) intentionally or unintentionally violate any applicable local, state, national or international law, - 11) \"stalk\" or otherwise harass another; and/or - 12) collect or store personal data about other users in connection with the prohibited conduct and activities set forth in paragraphs above. You acknowledge that $org may or may not pre-screen Content, but that $org and its designees shall have the right (but not the obligation) in their sole discretion to pre-screen, refuse, move, or remove any Content that is available via the $org Service and which violates the TOS. You agree that you must evaluate, and bear all risks associated with, the use of any Content, including any reliance on the accuracy, completeness, or usefulness of such Content. You acknowledge, consent and agree that $org may access, preserve and disclose your account information and Content if required to do so by law or in a good faith belief that such access preservation or disclosure is reasonably necessary to: - (a) comply with legal process; - (b) enforce the TOS; - (c) respond to claims that any Content violates the rights of third parties; - (d) respond to your requests for customer service; or (e) protect the rights, property or personal safety of $org its users and the public. - -4. CONTENT MADE AVAILABLE FOR INCLUSION ON THE $org SERVICE -$org does not claim ownership of Content you submit or make available for inclusion via the $org Service. However, with respect to Content you submit or make available for inclusion on the publicly available $org Service, you irrevocably grant $org the perpetual, worldwide, royalty-free and non-exclusive license, with the right to sublicense through multiple tiers of sublicensees, to use, distribute, reproduce, modify, adapt, publicly perform and publicly display such Content, in whole or in part, on the $org Service or other publications by $org in any media whether now existing or which come into the existence into the future and to provide that information under the license set forth on the initial page of the $url Web site. And for Content you submit for private discussions, you grant $org the worldwide, royalty-free and non-exclusive license to use, distribute, reproduce, modify, adapt, publicly perform and publicly display such Content on the associated private discussion group. - -5. INDEMNITY -You agree to indemnify and hold $org and its subsidiaries, affiliates, officers, agents, employees, partners and licensors harmless from any claim or demand, including but not limited to reasonable attorneys' fees, made by any third party due to or arising out of Content you submit, post, transmit or otherwise make available through the Service, your use of the $org Service, your connection to the Service, your violation of the TOS, or your violation of any rights of another. - -6. MODIFICATIONS TO $org SERVICE You acknowledge that $org may establish general practices and limits concerning use of the $org Service, including without limitation the maximum number of days that email messages, message board postings or other uploaded Content will be retained by the $org Service.. You further acknowledge that $org reserves the right to modify these general practices and limits from time to time. $org reserves the right at any time and from time to time to modify or discontinue, temporarily or permanently, the $org Service (or any part thereof) with or without notice. You agree that $org shall not be liable to you or to any third party for any modification, suspension or discontinuance of the $org Service. - -7. TERMINATION -You agree that $org may terminate your access to the $org Service for violations of the TOS and/or requests by authorized law enforcement or other government agencies. - -8. LINKS -The $org Service may provide, or third parties may provide, links to other World Wide Web sites or resources. Because $org has no control over such sites and resources, you acknowledge and agree that $org is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any Content, advertising, products or other materials on or available from such sites or resources. You further acknowledge and agree that $org shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such Content, goods or services available on or through any such site or resource. - -9. DISCLAIMER OF WARRANTIES -You expressly understand and agree that: Your use of the $org service is at your sole risk. $org service is provided on an \"as is\" and \"as available\" basis. $org and its subsidiaries, affiliates, officers, employees and licensors expressly disclaim all warranties of any kind, whether express or implied, including, but not limited to the implied warranties of merchantability, fitness for a particular purpose and non-infringement. $org and its subsidiaries, affiliates, officers, employees and licensors make no warranty that -(i) The $org service will meet your requirements; -(ii) The $org service will be uninterrupted, timely, secure or error-free and -(iii) The results that may be obtained from the use of the $org service will be accurate or reliable. No advice or information, whether oral or written, obtained by you from $org or through or from the service shall create any warranty not expressly stated in the TOS. - -10. LIMITATION OF LIABILITY -You expressly understand and agree that $org and its subsidiaries, affiliates, officers, employees, agents, partners and licensors shall not be liable to you for any direct, indirect, incidental, special, consequential or exemplary damages, including, but not limited to, damages for loss of profits, goodwill, use, data or other intangible losses (even if $org has been advised of the possibility of such damages), resulting from the use or the inability to use the $org service. - -11. NOTICE AND PROCEDURE FOR MAKING CLAIMS OF COPYRIGHT INFRINGEMENT -$org respects the copyright of others, and we ask our users to do the same. $org may, in appropriate circumstances and at its discretion, disable and/or terminate the access of users who may be repeat infringers. If you believe that your work has been copied in a way that constitutes copyright infringement, please provide $org's Copyright Agent the following information: an electronic or physical signature of the person authorized to act on behalf of the owner of the copyright; a description of the copyrighted work that you claim has been infringed; a description of where the material that you claim is infringing is located on the site; your address, telephone number, and email address; a statement by you that you have a good faith belief that the disputed use is not authorized by the copyright owner, its agent, or the law; a statement by you, made under penalty of perjury, that the above information in your Notice is accurate and that you are the copyright owner or authorized to act on the copyright owner's behalf. - -$org's Agent for Notice of claims of copyright infringement can be reached as follows: - -$contact -"; -?>
' . - t('You are about to download') . ' "' . htmlspecialchars($link['file_name']) . '" (' . jirafeau_human_size($link['file_size']) . ')' . + t('You are about to download') . ' "' . htmlspecialchars($link['file_name']) . '" (' . jirafeau_human_size($link['file_size']) . ').' . '
' . - t('By using our services, you accept our'). ' ' . t('Term Of Service') . '' . + t('By using our services, you accept our'). ' ' . t('Terms of Service') . '.' . '