First commit

This commit is contained in:
Pierre Hubert
2016-11-19 12:08:12 +01:00
commit 990540b2b9
4706 changed files with 931207 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
user_data/*
developer/cache/*

7
.htaccess Executable file
View File

@@ -0,0 +1,7 @@
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>

36
3rdparty/RestServer/RestException.php vendored Normal file
View File

@@ -0,0 +1,36 @@
<?php
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2009 Jacob Wright
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
////////////////////////////////////////////////////////////////////////////////
namespace Jacwright\RestServer;
use Exception;
class RestException extends Exception
{
public function __construct($code, $message = null)
{
parent::__construct($message, $code);
}
}

46
3rdparty/RestServer/RestFormat.php vendored Normal file
View File

@@ -0,0 +1,46 @@
<?php
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2009 Jacob Wright
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
////////////////////////////////////////////////////////////////////////////////
namespace Jacwright\RestServer;
/**
* Constants used in RestServer Class.
*/
class RestFormat
{
const PLAIN = 'text/plain';
const HTML = 'text/html';
const JSON = 'application/json';
const XML = 'application/xml';
/** @var array */
static public $formats = array(
'plain' => RestFormat::PLAIN,
'txt' => RestFormat::PLAIN,
'html' => RestFormat::HTML,
'json' => RestFormat::JSON,
'xml' => RestFormat::XML,
);
}

526
3rdparty/RestServer/RestServer.php vendored Executable file
View File

@@ -0,0 +1,526 @@
<?php
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2009 Jacob Wright
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
////////////////////////////////////////////////////////////////////////////////
namespace Jacwright\RestServer;
require(__DIR__ . '/RestFormat.php');
require(__DIR__ . '/RestException.php');
use Exception;
use ReflectionClass;
use ReflectionObject;
use ReflectionMethod;
use DOMDocument;
/**
* Description of RestServer
*
* @author jacob
*/
class RestServer
{
//@todo add type hint
public $url;
public $method;
public $params;
public $format;
public $cacheDir = __DIR__;
public $realm;
public $mode;
public $root;
public $rootPath;
public $jsonAssoc = false;
protected $map = array();
protected $errorClasses = array();
protected $cached;
/**
* The constructor.
*
* @param string $mode The mode, either debug or production
*/
public function __construct($mode = 'debug', $realm = 'Rest Server')
{
$this->mode = $mode;
$this->realm = $realm;
// Set the root
$dir = str_replace('\\', '/', dirname(str_replace($_SERVER['DOCUMENT_ROOT'], '', $_SERVER['SCRIPT_FILENAME'])));
if ($dir == '.') {
$dir = '/';
} else {
// add a slash at the beginning and end
if (substr($dir, -1) != '/') $dir .= '/';
if (substr($dir, 0, 1) != '/') $dir = '/' . $dir;
}
$this->root = $dir;
}
public function __destruct()
{
if ($this->mode == 'production' && !$this->cached) {
if (function_exists('apc_store')) {
apc_store('urlMap', $this->map);
} else {
file_put_contents($this->cacheDir . '/urlMap.cache', serialize($this->map));
}
}
}
public function refreshCache()
{
$this->map = array();
$this->cached = false;
}
public function unauthorized($ask = false)
{
if ($ask) {
header("WWW-Authenticate: Basic realm=\"$this->realm\"");
}
throw new RestException(401, "You are not authorized to access this resource.");
}
public function handle()
{
$this->url = $this->getPath();
$this->method = $this->getMethod();
$this->format = $this->getFormat();
if ($this->method == 'PUT' || $this->method == 'POST' || $this->method == 'PATCH') {
$this->data = $this->getData();
}
list($obj, $method, $params, $this->params, $noAuth) = $this->findUrl();
if ($obj) {
if (is_string($obj)) {
if (class_exists($obj)) {
$obj = new $obj();
} else {
throw new Exception("Class $obj does not exist");
}
}
$obj->server = $this;
try {
if (method_exists($obj, 'init')) {
$obj->init();
}
if (!$noAuth && method_exists($obj, 'authorize')) {
if (!$obj->authorize()) {
$this->sendData($this->unauthorized(true)); //@todo unauthorized returns void
exit;
}
}
$result = call_user_func_array(array($obj, $method), $params);
if ($result !== null) {
$this->sendData($result);
}
} catch (RestException $e) {
$this->handleError($e->getCode(), $e->getMessage());
}
} else {
$this->handleError(404);
}
}
public function setRootPath($path)
{
$this->rootPath = '/'.trim($path, '/').'/';
}
public function setJsonAssoc($value)
{
$this->jsonAssoc = ($value === true);
}
public function addClass($class, $basePath = '')
{
$this->loadCache();
if (!$this->cached) {
if (is_string($class) && !class_exists($class)){
throw new Exception('Invalid method or class');
} elseif (!is_string($class) && !is_object($class)) {
throw new Exception('Invalid method or class; must be a classname or object');
}
if (substr($basePath, 0, 1) == '/') {
$basePath = substr($basePath, 1);
}
if ($basePath && substr($basePath, -1) != '/') {
$basePath .= '/';
}
$this->generateMap($class, $basePath);
}
}
public function addErrorClass($class)
{
$this->errorClasses[] = $class;
}
public function handleError($statusCode, $errorMessage = null)
{
$method = "handle$statusCode";
foreach ($this->errorClasses as $class) {
if (is_object($class)) {
$reflection = new ReflectionObject($class);
} elseif (class_exists($class)) {
$reflection = new ReflectionClass($class);
}
if (isset($reflection))
{
if ($reflection->hasMethod($method))
{
$obj = is_string($class) ? new $class() : $class;
$obj->$method();
return;
}
}
}
if (!$errorMessage)
{
$errorMessage = $this->codes[$statusCode];
}
$this->setStatus($statusCode);
$this->sendData(array('error' => array('code' => $statusCode, 'message' => $errorMessage)));
}
protected function loadCache()
{
if ($this->cached !== null) {
return;
}
$this->cached = false;
if ($this->mode == 'production') {
if (function_exists('apc_fetch')) {
$map = apc_fetch('urlMap');
} elseif (file_exists($this->cacheDir . '/urlMap.cache')) {
$map = unserialize(file_get_contents($this->cacheDir . '/urlMap.cache'));
}
if (isset($map) && is_array($map)) {
$this->map = $map;
$this->cached = true;
}
} else {
if (function_exists('apc_delete')) {
apc_delete('urlMap');
} else {
@unlink($this->cacheDir . '/urlMap.cache');
}
}
}
protected function findUrl()
{
$urls = $this->map[$this->method];
if (!$urls) return null;
foreach ($urls as $url => $call) {
$args = $call[2];
if (!strstr($url, '$')) {
if ($url == $this->url) {
if (isset($args['data'])) {
$params = array_fill(0, $args['data'] + 1, null);
$params[$args['data']] = $this->data; //@todo data is not a property of this class
$call[2] = $params;
} else {
$call[2] = array();
}
return $call;
}
} else {
$regex = preg_replace('/\\\\\$([\w\d]+)\.\.\./', '(?P<$1>.+)', str_replace('\.\.\.', '...', preg_quote($url)));
$regex = preg_replace('/\\\\\$([\w\d]+)/', '(?P<$1>[^\/]+)', $regex);
if (preg_match(":^$regex$:", urldecode($this->url), $matches)) {
$params = array();
$paramMap = array();
if (isset($args['data'])) {
$params[$args['data']] = $this->data;
}
foreach ($matches as $arg => $match) {
if (is_numeric($arg)) continue;
$paramMap[$arg] = $match;
if (isset($args[$arg])) {
$params[$args[$arg]] = $match;
}
}
ksort($params);
// make sure we have all the params we need
end($params);
$max = key($params);
for ($i = 0; $i < $max; $i++) {
if (!array_key_exists($i, $params)) {
$params[$i] = null;
}
}
ksort($params);
$call[2] = $params;
$call[3] = $paramMap;
return $call;
}
}
}
}
protected function generateMap($class, $basePath)
{
if (is_object($class)) {
$reflection = new ReflectionObject($class);
} elseif (class_exists($class)) {
$reflection = new ReflectionClass($class);
}
$methods = $reflection->getMethods(ReflectionMethod::IS_PUBLIC); //@todo $reflection might not be instantiated
foreach ($methods as $method) {
$doc = $method->getDocComment();
$noAuth = strpos($doc, '@noAuth') !== false;
if (preg_match_all('/@url[ \t]+(GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS)[ \t]+\/?(\S*)/s', $doc, $matches, PREG_SET_ORDER)) {
$params = $method->getParameters();
foreach ($matches as $match) {
$httpMethod = $match[1];
$url = $basePath . $match[2];
if ($url && $url[strlen($url) - 1] == '/') {
$url = substr($url, 0, -1);
}
$call = array($class, $method->getName());
$args = array();
foreach ($params as $param) {
$args[$param->getName()] = $param->getPosition();
}
$call[] = $args;
$call[] = null;
$call[] = $noAuth;
$this->map[$httpMethod][$url] = $call;
}
}
}
}
public function getPath()
{
$path = preg_replace('/\?.*$/', '', $_SERVER['REQUEST_URI']);
// remove root from path
if ($this->root) $path = preg_replace('/^' . preg_quote($this->root, '/') . '/', '', $path);
// remove trailing format definition, like /controller/action.json -> /controller/action
$path = preg_replace('/\.(\w+)$/i', '', $path);
// remove root path from path, like /root/path/api -> /api
if ($this->rootPath) $path = str_replace($this->rootPath, '', $path);
return $path;
}
public function getMethod()
{
$method = $_SERVER['REQUEST_METHOD'];
$override = isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']) ? $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] : (isset($_GET['method']) ? $_GET['method'] : '');
if ($method == 'POST' && strtoupper($override) == 'PUT') {
$method = 'PUT';
} elseif ($method == 'POST' && strtoupper($override) == 'DELETE') {
$method = 'DELETE';
} elseif ($method == 'POST' && strtoupper($override) == 'PATCH') {
$method = 'PATCH';
}
return $method;
}
public function getFormat()
{
$format = RestFormat::PLAIN;
$accept_mod = null;
if(isset($_SERVER["HTTP_ACCEPT"])) {
$accept_mod = preg_replace('/\s+/i', '', $_SERVER['HTTP_ACCEPT']); // ensures that exploding the HTTP_ACCEPT string does not get confused by whitespaces
}
$accept = explode(',', $accept_mod);
$override = '';
if (isset($_REQUEST['format']) || isset($_SERVER['HTTP_FORMAT'])) {
// give GET/POST precedence over HTTP request headers
$override = isset($_SERVER['HTTP_FORMAT']) ? $_SERVER['HTTP_FORMAT'] : '';
$override = isset($_REQUEST['format']) ? $_REQUEST['format'] : $override;
$override = trim($override);
}
// Check for trailing dot-format syntax like /controller/action.format -> action.json
if(preg_match('/\.(\w+)$/i', strtok($_SERVER["REQUEST_URI"],'?'), $matches)) {
$override = $matches[1];
}
// Give GET parameters precedence before all other options to alter the format
$override = isset($_GET['format']) ? $_GET['format'] : $override;
if (isset(RestFormat::$formats[$override])) {
$format = RestFormat::$formats[$override];
} elseif (in_array(RestFormat::JSON, $accept)) {
$format = RestFormat::JSON;
}
return $format;
}
public function getData()
{
$data = file_get_contents('php://input');
$data = json_decode($data, $this->jsonAssoc);
return $data;
}
public function sendData($data)
{
header("Cache-Control: no-cache, must-revalidate");
header("Expires: 0");
header('Content-Type: ' . $this->format);
if ($this->format == RestFormat::XML) {
if (is_object($data) && method_exists($data, '__keepOut')) {
$data = clone $data;
foreach ($data->__keepOut() as $prop) {
unset($data->$prop);
}
}
$this->xml_encode($data);
} else {
if (is_object($data) && method_exists($data, '__keepOut')) {
$data = clone $data;
foreach ($data->__keepOut() as $prop) {
unset($data->$prop);
}
}
$options = 0;
if ($this->mode == 'debug') {
$options = JSON_PRETTY_PRINT;
}
$options = $options | JSON_UNESCAPED_UNICODE;
echo json_encode($data, $options);
}
}
public function setStatus($code)
{
if (function_exists('http_response_code')) {
http_response_code($code);
} else {
$protocol = $_SERVER['SERVER_PROTOCOL'] ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0';
$code .= ' ' . $this->codes[strval($code)];
header("$protocol $code");
}
}
private function xml_encode($mixed, $domElement=null, $DOMDocument=null) { //@todo add type hint for $domElement and $DOMDocument
if (is_null($DOMDocument)) {
$DOMDocument =new DOMDocument;
$DOMDocument->formatOutput = true;
$this->xml_encode($mixed, $DOMDocument, $DOMDocument);
echo $DOMDocument->saveXML();
}
else {
if (is_array($mixed)) {
foreach ($mixed as $index => $mixedElement) {
if (is_int($index)) {
if ($index === 0) {
$node = $domElement;
}
else {
$node = $DOMDocument->createElement($domElement->tagName);
$domElement->parentNode->appendChild($node);
}
}
else {
$plural = $DOMDocument->createElement($index);
$domElement->appendChild($plural);
$node = $plural;
if (!(rtrim($index, 's') === $index)) {
$singular = $DOMDocument->createElement(rtrim($index, 's'));
$plural->appendChild($singular);
$node = $singular;
}
}
$this->xml_encode($mixedElement, $node, $DOMDocument);
}
}
else {
$domElement->appendChild($DOMDocument->createTextNode($mixed));
}
}
}
private $codes = array(
'100' => 'Continue',
'200' => 'OK',
'201' => 'Created',
'202' => 'Accepted',
'203' => 'Non-Authoritative Information',
'204' => 'No Content',
'205' => 'Reset Content',
'206' => 'Partial Content',
'300' => 'Multiple Choices',
'301' => 'Moved Permanently',
'302' => 'Found',
'303' => 'See Other',
'304' => 'Not Modified',
'305' => 'Use Proxy',
'307' => 'Temporary Redirect',
'400' => 'Bad Request',
'401' => 'Unauthorized',
'402' => 'Payment Required',
'403' => 'Forbidden',
'404' => 'Not Found',
'405' => 'Method Not Allowed',
'406' => 'Not Acceptable',
'409' => 'Conflict',
'410' => 'Gone',
'411' => 'Length Required',
'412' => 'Precondition Failed',
'413' => 'Request Entity Too Large',
'414' => 'Request-URI Too Long',
'415' => 'Unsupported Media Type',
'416' => 'Requested Range Not Satisfiable',
'417' => 'Expectation Failed',
'500' => 'Internal Server Error',
'501' => 'Not Implemented',
'503' => 'Service Unavailable'
);
}

22
3rdparty/analysing_page/LICENSE vendored Executable file
View File

@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2015 Communiquons
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Binary file not shown.

9
3rdparty/analysing_page/README.md vendored Executable file
View File

@@ -0,0 +1,9 @@
# PHP content of a page analyser
Analysing the content of a page in PHP
This PHP project will allow you to analyse with your page the global content of another page. It would be useful for an easier integration of an external page in yours
Has been translateed in :
French
English

49
3rdparty/analysing_page/analyser_en.php vendored Executable file
View File

@@ -0,0 +1,49 @@
<?php
//This file extract the title, the description and the image of a webpage, which are indicated in <meta og: markups
function analyse_source_page($source)
{
//Préparation de l'analyse
$page_title = null;
$page_description = null;
$page_image = null;
//Analysing datas
preg_match_all('#<meta (.*?)>#is', $source, $result,PREG_PATTERN_ORDER);
//Fetching
$liste_types = array(
array('title' => 'page_title', 'pattern' => '<property="og:title">', 'begining' => 'content="', 'ending' => '"'),
array('title' => 'page_title', 'pattern' => "<property='og:title'>", 'begining' => "content='", 'ending' => "'"),
array('title' => 'page_description', 'pattern' => "<property='og:description'>", 'begining' => "content='", 'ending' => "'"),
array('title' => 'page_description', 'pattern' => '<property="og:description">', 'begining' => 'content="', 'ending' => '"'),
array('title' => 'page_image', 'pattern' => '<property="og:image">', 'begining' => 'content="', 'ending' => '"'),
array('title' => 'page_image', 'pattern' => "<property='og:image'>", 'begining' => "content='", 'ending' => "'"),
);
//Analysing list
foreach($result[1] as $fetching)
{
//Parcours des types de traitement
foreach($liste_types as $fetching_infos)
{
//Preparing
$fetching = str_replace(' =', '=', $fetching);
//Vérification de la présence des informations
if(preg_match($fetching_infos['pattern'], $fetching))
{
$begining = $fetching_infos['begining'];
$ending = $fetching_infos['ending'];
$title = $fetching_infos['title'];
$content = strstr($fetching, $begining);
$content = str_replace($begining, '', $content);
$content = strstr($content, $ending, true);
${$title} = $content;
}
}
}
//Sending result
return array('title' => $page_title, 'description' => $page_description, 'image' => $page_image);
}

49
3rdparty/analysing_page/analyser_fr.php vendored Executable file
View File

@@ -0,0 +1,49 @@
<?php
//Fonction d'analyse du contenu d'une page pour en extraire la description, le titre et l'image
function analyse_source_page_extrait_description($source)
{
//Préparation de l'analyse
$titre_page = null;
$description_page = null;
$image_page = null;
//Analyse des données
preg_match_all('#<meta (.*?)>#is', $source, $resultat,PREG_PATTERN_ORDER);
//Traitement
$liste_types = array(
array('titre' => 'titre_page', 'masque' => '<property="og:title">', 'debut' => 'content="', 'fin' => '"'),
array('titre' => 'titre_page', 'masque' => "<property='og:title'>", 'debut' => "content='", 'fin' => "'"),
array('titre' => 'description_page', 'masque' => "<property='og:description'>", 'debut' => "content='", 'fin' => "'"),
array('titre' => 'description_page', 'masque' => '<property="og:description">', 'debut' => 'content="', 'fin' => '"'),
array('titre' => 'image_page', 'masque' => '<property="og:image">', 'debut' => 'content="', 'fin' => '"'),
array('titre' => 'image_page', 'masque' => "<property='og:image'>", 'debut' => "content='", 'fin' => "'"),
);
//Parcours de la liste
foreach($resultat[1] as $traiter)
{
//Parcours des types de traitement
foreach($liste_types as $infos_traitement)
{
//Pré-traitement
$traiter = str_replace(' =', '=', $traiter);
//Vérification de la présence des informations
if(preg_match($infos_traitement['masque'], $traiter))
{
$debut = $infos_traitement['debut'];
$fin = $infos_traitement['fin'];
$titre = $infos_traitement['titre'];
$contenu = strstr($traiter, $debut);
$contenu = str_replace($debut, '', $contenu);
$contenu = strstr($contenu, $fin, true);
${$titre} = $contenu;
}
}
}
//Renvoi du résultat
return array('titre' => $titre_page, 'description' => $description_page, 'image' => $image_page);
}

512
3rdparty/crypt/Licence_CeCILL_V2-en.txt vendored Executable file
View File

@@ -0,0 +1,512 @@
CeCILL FREE SOFTWARE LICENSE AGREEMENT
Notice
This Agreement is a Free Software license agreement that is the result
of discussions between its authors in order to ensure compliance with
the two main principles guiding its drafting:
* firstly, compliance with the principles governing the distribution
of Free Software: access to source code, broad rights granted to
users,
* secondly, the election of a governing law, French law, with which
it is conformant, both as regards the law of torts and
intellectual property law, and the protection that it offers to
both authors and holders of the economic rights over software.
The authors of the CeCILL (for Ce[a] C[nrs] I[nria] L[logiciel] L[ibre])
license are:
Commissariat <20> l'Energie Atomique - CEA, a public scientific, technical
and industrial research establishment, having its principal place of
business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France.
Centre National de la Recherche Scientifique - CNRS, a public scientific
and technological research establishment, having its principal place of
business at 3 rue Michel-Ange, 75794 Paris cedex 16, France.
Institut National de Recherche en Informatique et en Automatique -
INRIA, a public scientific and technological establishment, having its
principal place of business at Domaine de Voluceau, Rocquencourt, BP
105, 78153 Le Chesnay cedex, France.
Preamble
The purpose of this Free Software license agreement is to grant users
the right to modify and redistribute the software governed by this
license within the framework of an open source distribution model.
The exercising of these rights is conditional upon certain obligations
for users so as to preserve this status for all subsequent redistributions.
In consideration of access to the source code and the rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors only have limited liability.
In this respect, the risks associated with loading, using, modifying
and/or developing or reproducing the software by the user are brought to
the user's attention, given its Free Software status, which may make it
complicated to use, with the result that its use is reserved for
developers and experienced professionals having in-depth computer
knowledge. Users are therefore encouraged to load and test the suitability
of the software as regards their requirements in conditions enabling
the security of their systems and/or data to be ensured and, more
generally, to use and operate it in the same conditions of security.
This Agreement may be freely reproduced and published, provided it is not
altered, and that no provisions are either added or removed herefrom.
This Agreement may apply to any or all software for which the holder of
the economic rights decides to submit the use thereof to its provisions.
Article 1 - DEFINITIONS
For the purpose of this Agreement, when the following expressions
commence with a capital letter, they shall have the following meaning:
Agreement: means this license agreement, and its possible subsequent
versions and annexes.
Software: means the software in its Object Code and/or Source Code form
and, where applicable, its documentation, "as is" when the Licensee
accepts the Agreement.
Initial Software: means the Software in its Source Code and possibly its
Object Code form and, where applicable, its documentation, "as is" when
it is first distributed under the terms and conditions of the Agreement.
Modified Software: means the Software modified by at least one
Contribution.
Source Code: means all the Software's instructions and program lines to
which access is required so as to modify the Software.
Object Code: means the binary files originating from the compilation of
the Source Code.
Holder: means the holder(s) of the economic rights over the Initial
Software.
Licensee: means the Software user(s) having accepted the Agreement.
Contributor: means a Licensee having made at least one Contribution.
Licensor: means the Holder, or any other individual or legal entity, who
distributes the Software under the Agreement.
Contribution: means any or all modifications, corrections, translations,
adaptations and/or new functions integrated into the Software by any or
all Contributors, as well as any or all Internal Modules.
Module: means a set of sources files including their documentation that
enables supplementary functions or services in addition to those offered
by the Software.
External Module: means any or all Modules, not derived from the
Software, so that this Module and the Software run in separate address
spaces, with one calling the other when they are run.
Internal Module: means any or all Module, connected to the Software so
that they both execute in the same address space.
GNU GPL: means the GNU General Public License version 2 or any
subsequent version, as published by the Free Software Foundation Inc.
Parties: mean both the Licensee and the Licensor.
These expressions may be used both in singular and plural form.
Article 2 - PURPOSE
The purpose of the Agreement is the grant by the Licensor to the
Licensee of a non-exclusive, transferable and worldwide license for the
Software as set forth in Article 5 hereinafter for the whole term of the
protection granted by the rights over said Software.
Article 3 - ACCEPTANCE
3.1 The Licensee shall be deemed as having accepted the terms and
conditions of this Agreement upon the occurrence of the first of the
following events:
* (i) loading the Software by any or all means, notably, by
downloading from a remote server, or by loading from a physical
medium;
* (ii) the first time the Licensee exercises any of the rights
granted hereunder.
3.2 One copy of the Agreement, containing a notice relating to the
characteristics of the Software, to the limited warranty, and to the
fact that its use is restricted to experienced users has been provided
to the Licensee prior to its acceptance as set forth in Article 3.1
hereinabove, and the Licensee hereby acknowledges that it has read and
understood it.
Article 4 - EFFECTIVE DATE AND TERM
4.1 EFFECTIVE DATE
The Agreement shall become effective on the date when it is accepted by
the Licensee as set forth in Article 3.1.
4.2 TERM
The Agreement shall remain in force for the entire legal term of
protection of the economic rights over the Software.
Article 5 - SCOPE OF RIGHTS GRANTED
The Licensor hereby grants to the Licensee, who accepts, the following
rights over the Software for any or all use, and for the term of the
Agreement, on the basis of the terms and conditions set forth hereinafter.
Besides, if the Licensor owns or comes to own one or more patents
protecting all or part of the functions of the Software or of its
components, the Licensor undertakes not to enforce the rights granted by
these patents against successive Licensees using, exploiting or
modifying the Software. If these patents are transferred, the Licensor
undertakes to have the transferees subscribe to the obligations set
forth in this paragraph.
5.1 RIGHT OF USE
The Licensee is authorized to use the Software, without any limitation
as to its fields of application, with it being hereinafter specified
that this comprises:
1. permanent or temporary reproduction of all or part of the Software
by any or all means and in any or all form.
2. loading, displaying, running, or storing the Software on any or
all medium.
3. entitlement to observe, study or test its operation so as to
determine the ideas and principles behind any or all constituent
elements of said Software. This shall apply when the Licensee
carries out any or all loading, displaying, running, transmission
or storage operation as regards the Software, that it is entitled
to carry out hereunder.
5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS
The right to make Contributions includes the right to translate, adapt,
arrange, or make any or all modifications to the Software, and the right
to reproduce the resulting software.
The Licensee is authorized to make any or all Contributions to the
Software provided that it includes an explicit notice that it is the
author of said Contribution and indicates the date of the creation thereof.
5.3 RIGHT OF DISTRIBUTION
In particular, the right of distribution includes the right to publish,
transmit and communicate the Software to the general public on any or
all medium, and by any or all means, and the right to market, either in
consideration of a fee, or free of charge, one or more copies of the
Software by any means.
The Licensee is further authorized to distribute copies of the modified
or unmodified Software to third parties according to the terms and
conditions set forth hereinafter.
5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION
The Licensee is authorized to distribute true copies of the Software in
Source Code or Object Code form, provided that said distribution
complies with all the provisions of the Agreement and is accompanied by:
1. a copy of the Agreement,
2. a notice relating to the limitation of both the Licensor's
warranty and liability as set forth in Articles 8 and 9,
and that, in the event that only the Object Code of the Software is
redistributed, the Licensee allows future Licensees unhindered access to
the full Source Code of the Software by indicating how to access it, it
being understood that the additional cost of acquiring the Source Code
shall not exceed the cost of transferring the data.
5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE
When the Licensee makes a Contribution to the Software, the terms and
conditions for the distribution of the resulting Modified Software
become subject to all the provisions of this Agreement.
The Licensee is authorized to distribute the Modified Software, in
source code or object code form, provided that said distribution
complies with all the provisions of the Agreement and is accompanied by:
1. a copy of the Agreement,
2. a notice relating to the limitation of both the Licensor's
warranty and liability as set forth in Articles 8 and 9,
and that, in the event that only the Object Code of the Modified
Software is redistributed, the Licensee allows future Licensees
unhindered access to the full source code of the Modified Software by
indicating how to access it, it being understood that the additional
cost of acquiring the source code shall not exceed the cost of
transferring the data.
5.3.3 DISTRIBUTION OF EXTERNAL MODULES
When the Licensee has developed an External Module, the terms and
conditions of this Agreement do not apply to said External Module, that
may be distributed under a separate license agreement.
5.3.4 COMPATIBILITY WITH THE GNU GPL
The Licensee can include a code that is subject to the provisions of one
of the versions of the GNU GPL in the Modified or unmodified Software,
and distribute that entire code under the terms of the same version of
the GNU GPL.
The Licensee can include the Modified or unmodified Software in a code
that is subject to the provisions of one of the versions of the GNU GPL,
and distribute that entire code under the terms of the same version of
the GNU GPL.
Article 6 - INTELLECTUAL PROPERTY
6.1 OVER THE INITIAL SOFTWARE
The Holder owns the economic rights over the Initial Software. Any or
all use of the Initial Software is subject to compliance with the terms
and conditions under which the Holder has elected to distribute its work
and no one shall be entitled to modify the terms and conditions for the
distribution of said Initial Software.
The Holder undertakes that the Initial Software will remain ruled at
least by the current license, for the duration set forth in Article 4.2.
6.2 OVER THE CONTRIBUTIONS
A Licensee who develops a Contribution is the owner of the intellectual
property rights over this Contribution as defined by applicable law.
6.3 OVER THE EXTERNAL MODULES
A Licensee who develops an External Module is the owner of the
intellectual property rights over this External Module as defined by
applicable law and is free to choose the type of agreement that shall
govern its distribution.
6.4 JOINT PROVISIONS
The Licensee expressly undertakes:
1. not to remove, or modify, in any manner, the intellectual property
notices attached to the Software;
2. to reproduce said notices, in an identical manner, in the copies
of the Software modified or not.
The Licensee undertakes not to directly or indirectly infringe the
intellectual property rights of the Holder and/or Contributors on the
Software and to take, where applicable, vis-<2D>-vis its staff, any and all
measures required to ensure respect of said intellectual property rights
of the Holder and/or Contributors.
Article 7 - RELATED SERVICES
7.1 Under no circumstances shall the Agreement oblige the Licensor to
provide technical assistance or maintenance services for the Software.
However, the Licensor is entitled to offer this type of services. The
terms and conditions of such technical assistance, and/or such
maintenance, shall be set forth in a separate instrument. Only the
Licensor offering said maintenance and/or technical assistance services
shall incur liability therefor.
7.2 Similarly, any Licensor is entitled to offer to its licensees, under
its sole responsibility, a warranty, that shall only be binding upon
itself, for the redistribution of the Software and/or the Modified
Software, under terms and conditions that it is free to decide. Said
warranty, and the financial terms and conditions of its application,
shall be subject of a separate instrument executed between the Licensor
and the Licensee.
Article 8 - LIABILITY
8.1 Subject to the provisions of Article 8.2, the Licensee shall be
entitled to claim compensation for any direct loss it may have suffered
from the Software as a result of a fault on the part of the relevant
Licensor, subject to providing evidence thereof.
8.2 The Licensor's liability is limited to the commitments made under
this Agreement and shall not be incurred as a result of in particular:
(i) loss due the Licensee's total or partial failure to fulfill its
obligations, (ii) direct or consequential loss that is suffered by the
Licensee due to the use or performance of the Software, and (iii) more
generally, any consequential loss. In particular the Parties expressly
agree that any or all pecuniary or business loss (i.e. loss of data,
loss of profits, operating loss, loss of customers or orders,
opportunity cost, any disturbance to business activities) or any or all
legal proceedings instituted against the Licensee by a third party,
shall constitute consequential loss and shall not provide entitlement to
any or all compensation from the Licensor.
Article 9 - WARRANTY
9.1 The Licensee acknowledges that the scientific and technical
state-of-the-art when the Software was distributed did not enable all
possible uses to be tested and verified, nor for the presence of
possible defects to be detected. In this respect, the Licensee's
attention has been drawn to the risks associated with loading, using,
modifying and/or developing and reproducing the Software which are
reserved for experienced users.
The Licensee shall be responsible for verifying, by any or all means,
the suitability of the product for its requirements, its good working order,
and for ensuring that it shall not cause damage to either persons or
properties.
9.2 The Licensor hereby represents, in good faith, that it is entitled
to grant all the rights over the Software (including in particular the
rights set forth in Article 5).
9.3 The Licensee acknowledges that the Software is supplied "as is" by
the Licensor without any other express or tacit warranty, other than
that provided for in Article 9.2 and, in particular, without any warranty
as to its commercial value, its secured, safe, innovative or relevant
nature.
Specifically, the Licensor does not warrant that the Software is free
from any error, that it will operate without interruption, that it will
be compatible with the Licensee's own equipment and software
configuration, nor that it will meet the Licensee's requirements.
9.4 The Licensor does not either expressly or tacitly warrant that the
Software does not infringe any third party intellectual property right
relating to a patent, software or any other property right. Therefore,
the Licensor disclaims any and all liability towards the Licensee
arising out of any or all proceedings for infringement that may be
instituted in respect of the use, modification and redistribution of the
Software. Nevertheless, should such proceedings be instituted against
the Licensee, the Licensor shall provide it with technical and legal
assistance for its defense. Such technical and legal assistance shall be
decided on a case-by-case basis between the relevant Licensor and the
Licensee pursuant to a memorandum of understanding. The Licensor
disclaims any and all liability as regards the Licensee's use of the
name of the Software. No warranty is given as regards the existence of
prior rights over the name of the Software or as regards the existence
of a trademark.
Article 10 - TERMINATION
10.1 In the event of a breach by the Licensee of its obligations
hereunder, the Licensor may automatically terminate this Agreement
thirty (30) days after notice has been sent to the Licensee and has
remained ineffective.
10.2 A Licensee whose Agreement is terminated shall no longer be
authorized to use, modify or distribute the Software. However, any
licenses that it may have granted prior to termination of the Agreement
shall remain valid subject to their having been granted in compliance
with the terms and conditions hereof.
Article 11 - MISCELLANEOUS
11.1 EXCUSABLE EVENTS
Neither Party shall be liable for any or all delay, or failure to
perform the Agreement, that may be attributable to an event of force
majeure, an act of God or an outside cause, such as defective
functioning or interruptions of the electricity or telecommunications
networks, network paralysis following a virus attack, intervention by
government authorities, natural disasters, water damage, earthquakes,
fire, explosions, strikes and labor unrest, war, etc.
11.2 Any failure by either Party, on one or more occasions, to invoke
one or more of the provisions hereof, shall under no circumstances be
interpreted as being a waiver by the interested Party of its right to
invoke said provision(s) subsequently.
11.3 The Agreement cancels and replaces any or all previous agreements,
whether written or oral, between the Parties and having the same
purpose, and constitutes the entirety of the agreement between said
Parties concerning said purpose. No supplement or modification to the
terms and conditions hereof shall be effective as between the Parties
unless it is made in writing and signed by their duly authorized
representatives.
11.4 In the event that one or more of the provisions hereof were to
conflict with a current or future applicable act or legislative text,
said act or legislative text shall prevail, and the Parties shall make
the necessary amendments so as to comply with said act or legislative
text. All other provisions shall remain effective. Similarly, invalidity
of a provision of the Agreement, for any reason whatsoever, shall not
cause the Agreement as a whole to be invalid.
11.5 LANGUAGE
The Agreement is drafted in both French and English and both versions
are deemed authentic.
Article 12 - NEW VERSIONS OF THE AGREEMENT
12.1 Any person is authorized to duplicate and distribute copies of this
Agreement.
12.2 So as to ensure coherence, the wording of this Agreement is
protected and may only be modified by the authors of the License, who
reserve the right to periodically publish updates or new versions of the
Agreement, each with a separate number. These subsequent versions may
address new issues encountered by Free Software.
12.3 Any Software distributed under a given version of the Agreement may
only be subsequently distributed under the same version of the Agreement
or a subsequent version, subject to the provisions of Article 5.3.4.
Article 13 - GOVERNING LAW AND JURISDICTION
13.1 The Agreement is governed by French law. The Parties agree to
endeavor to seek an amicable solution to any disagreements or disputes
that may arise during the performance of the Agreement.
13.2 Failing an amicable solution within two (2) months as from their
occurrence, and unless emergency proceedings are necessary, the
disagreements or disputes shall be referred to the Paris Courts having
jurisdiction, by the more diligent Party.
Article 14 - NAMING OF THE CONTRIBUTIONS AND MODIFIED SOFTWARE
The name of distribution of a modified software refer in the name of the initial software.
The sources must clearly show name of the initial software, the name of its author, and his
Internet site.
Version 2.0 completed dated 2006-07-12.

520
3rdparty/crypt/Licence_CeCILL_V2-fr.txt vendored Executable file
View File

@@ -0,0 +1,520 @@
CONTRAT DE LICENCE DE LOGICIEL LIBRE CeCILL
Avertissement
Ce contrat est une licence de logiciel libre issue d'une concertation
entre ses auteurs afin que le respect de deux grands principes pr<70>side <20>
sa r<>daction:
* d'une part, le respect des principes de diffusion des logiciels
libres: acc<63>s au code source, droits <20>tendus conf<6E>r<EFBFBD>s aux
utilisateurs,
* d'autre part, la d<>signation d'un droit applicable, le droit
fran<61>ais, auquel elle est conforme, tant au regard du droit de la
responsabilit<69> civile que du droit de la propri<72>t<EFBFBD> intellectuelle
et de la protection qu'il offre aux auteurs et titulaires des
droits patrimoniaux sur un logiciel.
Les auteurs de la licence CeCILL (pour Ce[a] C[nrs] I[nria] L[ogiciel]
L[ibre]) sont:
Commissariat <20> l'Energie Atomique - CEA, <20>tablissement public de recherche
<EFBFBD> caract<63>re scientifique technique et industriel, dont le si<73>ge est situ<74>
5 rue Leblanc, immeuble Le Ponant D, 75015 Paris.
Centre National de la Recherche Scientifique - CNRS, <20>tablissement
public <20> caract<63>re scientifique et technologique, dont le si<73>ge est
situ<EFBFBD> 3 rue Michel-Ange, 75794 Paris cedex 16.
Institut National de Recherche en Informatique et en Automatique -
INRIA, <20>tablissement public <20> caract<63>re scientifique et technologique,
dont le si<73>ge est situ<74> Domaine de Voluceau, Rocquencourt, BP 105, 78153
Le Chesnay cedex.
Pr<50>ambule
Ce contrat est une licence de logiciel libre dont l'objectif est de
conf<EFBFBD>rer aux utilisateurs la libert<72> de modification et de
redistribution du logiciel r<>gi par cette licence dans le cadre d'un
mod<EFBFBD>le de diffusion en logiciel libre.
L'exercice de ces libert<72>s est assorti de certains devoirs <20> la charge
des utilisateurs afin de pr<70>server ce statut au cours des
redistributions ult<6C>rieures.
L'accessibilit<69> au code source et les droits de copie, de modification
et de redistribution qui en d<>coulent ont pour contrepartie de n'offrir
aux utilisateurs qu'une garantie limit<69>e et de ne faire peser sur
l'auteur du logiciel, le titulaire des droits patrimoniaux et les
conc<EFBFBD>dants successifs qu'une responsabilit<69> restreinte.
A cet <20>gard l'attention de l'utilisateur est attir<69>e sur les risques
associ<EFBFBD>s au chargement, <20> l'utilisation, <20> la modification et/ou au
d<EFBFBD>veloppement et <20> la reproduction du logiciel par l'utilisateur <20>tant
donn<EFBFBD> sa sp<73>cificit<69> de logiciel libre, qui peut le rendre complexe <20>
manipuler et qui le r<>serve donc <20> des d<>veloppeurs ou des
professionnels avertis poss<73>dant des connaissances informatiques
approfondies. Les utilisateurs sont donc invit<69>s <20> charger et tester
l'ad<61>quation du logiciel <20> leurs besoins dans des conditions permettant
d'assurer la s<>curit<69> de leurs syst<73>mes et/ou de leurs donn<6E>es et, plus
g<EFBFBD>n<EFBFBD>ralement, <20> l'utiliser et l'exploiter dans les m<>mes conditions de
s<EFBFBD>curit<EFBFBD>. Ce contrat peut <20>tre reproduit et diffus<75> librement, sous
r<EFBFBD>serve de le conserver en l'<27>tat, sans ajout ni suppression de clauses.
Ce contrat est susceptible de s'appliquer <20> tout logiciel dont le
titulaire des droits patrimoniaux d<>cide de soumettre l'exploitation aux
dispositions qu'il contient.
Article 1 - DEFINITIONS
Dans ce contrat, les termes suivants, lorsqu'ils seront <20>crits avec une
lettre capitale, auront la signification suivante:
Contrat: d<>signe le pr<70>sent contrat de licence, ses <20>ventuelles versions
post<EFBFBD>rieures et annexes.
Logiciel: d<>signe le logiciel sous sa forme de Code Objet et/ou de Code
Source et le cas <20>ch<63>ant sa documentation, dans leur <20>tat au moment de
l'acceptation du Contrat par le Licenci<63>.
Logiciel Initial: d<>signe le Logiciel sous sa forme de Code Source et
<EFBFBD>ventuellement de Code Objet et le cas <20>ch<63>ant sa documentation, dans
leur <20>tat au moment de leur premi<6D>re diffusion sous les termes du Contrat.
Logiciel Modifi<66>: d<>signe le Logiciel modifi<66> par au moins une
Contribution.
Code Source: d<>signe l'ensemble des instructions et des lignes de
programme du Logiciel et auquel l'acc<63>s est n<>cessaire en vue de
modifier le Logiciel.
Code Objet: d<>signe les fichiers binaires issus de la compilation du
Code Source.
Titulaire: d<>signe le ou les d<>tenteurs des droits patrimoniaux d'auteur
sur le Logiciel Initial.
Licenci<EFBFBD>: d<>signe le ou les utilisateurs du Logiciel ayant accept<70> le
Contrat.
Contributeur: d<>signe le Licenci<63> auteur d'au moins une Contribution.
Conc<EFBFBD>dant: d<>signe le Titulaire ou toute personne physique ou morale
distribuant le Logiciel sous le Contrat.
Contribution: d<>signe l'ensemble des modifications, corrections,
traductions, adaptations et/ou nouvelles fonctionnalit<69>s int<6E>gr<67>es dans
le Logiciel par tout Contributeur, ainsi que tout Module Interne.
Module: d<>signe un ensemble de fichiers sources y compris leur
documentation qui permet de r<>aliser des fonctionnalit<69>s ou services
suppl<EFBFBD>mentaires <20> ceux fournis par le Logiciel.
Module Externe: d<>signe tout Module, non d<>riv<69> du Logiciel, tel que ce
Module et le Logiciel s'ex<65>cutent dans des espaces d'adressages
diff<EFBFBD>rents, l'un appelant l'autre au moment de leur ex<65>cution.
Module Interne: d<>signe tout Module li<6C> au Logiciel de telle sorte
qu'ils s'ex<65>cutent dans le m<>me espace d'adressage.
GNU GPL: d<>signe la GNU General Public License dans sa version 2 ou
toute version ult<6C>rieure, telle que publi<6C>e par Free Software Foundation
Inc.
Parties: d<>signe collectivement le Licenci<63> et le Conc<6E>dant.
Ces termes s'entendent au singulier comme au pluriel.
Article 2 - OBJET
Le Contrat a pour objet la concession par le Conc<6E>dant au Licenci<63> d'une
licence non exclusive, cessible et mondiale du Logiciel telle que
d<EFBFBD>finie ci-apr<70>s <20> l'article 5 pour toute la dur<75>e de protection des
droits portant sur ce Logiciel.
Article 3 - ACCEPTATION
3.1 L'acceptation par le Licenci<63> des termes du Contrat est r<>put<75>e
acquise du fait du premier des faits suivants:
* (i) le chargement du Logiciel par tout moyen notamment par
t<>l<EFBFBD>chargement <20> partir d'un serveur distant ou par chargement <20>
partir d'un support physique;
* (ii) le premier exercice par le Licenci<63> de l'un quelconque des
droits conc<6E>d<EFBFBD>s par le Contrat.
3.2 Un exemplaire du Contrat, contenant notamment un avertissement
relatif aux sp<73>cificit<69>s du Logiciel, <20> la restriction de garantie et <20>
la limitation <20> un usage par des utilisateurs exp<78>riment<6E>s a <20>t<EFBFBD> mis <20>
disposition du Licenci<63> pr<70>alablement <20> son acceptation telle que
d<EFBFBD>finie <20> l'article 3.1 ci dessus et le Licenci<63>
reconna<EFBFBD>t en avoir pris connaissance.
Article 4 - ENTREE EN VIGUEUR ET DUREE
4.1 ENTREE EN VIGUEUR
Le Contrat entre en vigueur <20> la date de son acceptation par le Licenci<63>
telle que d<>finie en 3.1.
4.2 DUREE
Le Contrat produira ses effets pendant toute la dur<75>e l<>gale de
protection des droits patrimoniaux portant sur le Logiciel.
Article 5 - ETENDUE DES DROITS CONCEDES
Le Conc<6E>dant conc<6E>de au Licenci<63>, qui accepte, les droits suivants sur
le Logiciel pour toutes destinations et pour la dur<75>e du Contrat dans
les conditions ci-apr<70>s d<>taill<6C>es.
Par ailleurs, si le Conc<6E>dant d<>tient ou venait <20> d<>tenir un ou
plusieurs brevets d'invention prot<6F>geant tout ou partie des
fonctionnalit<EFBFBD>s du Logiciel ou de ses composants, il s'engage <20> ne pas
opposer les <20>ventuels droits conf<6E>r<EFBFBD>s par ces brevets aux Licenci<63>s
successifs qui utiliseraient, exploiteraient ou modifieraient le
Logiciel. En cas de cession de ces brevets, le Conc<6E>dant s'engage <20>
faire reprendre les obligations du pr<70>sent alin<69>a aux cessionnaires.
5.1 DROIT D'UTILISATION
Le Licenci<63> est autoris<69> <20> utiliser le Logiciel, sans restriction quant
aux domaines d'application, <20>tant ci-apr<70>s pr<70>cis<69> que cela comporte:
1. la reproduction permanente ou provisoire du Logiciel en tout ou
partie par tout moyen et sous toute forme.
2. le chargement, l'affichage, l'ex<65>cution, ou le stockage du
Logiciel sur tout support.
3. la possibilit<69> d'en observer, d'en <20>tudier, ou d'en tester le
fonctionnement afin de d<>terminer les id<69>es et principes qui sont
<20> la base de n'importe quel <20>l<EFBFBD>ment de ce Logiciel; et ceci,
lorsque le Licenci<63> effectue toute op<6F>ration de chargement,
d'affichage, d'ex<65>cution, de transmission ou de stockage du
Logiciel qu'il est en droit d'effectuer en vertu du Contrat.
5.2 DROIT D'APPORTER DES CONTRIBUTIONS
Le droit d'apporter des Contributions comporte le droit de traduire,
d'adapter, d'arranger ou d'apporter toute autre modification au Logiciel
et le droit de reproduire le Logiciel en r<>sultant.
Le Licenci<63> est autoris<69> <20> apporter toute Contribution au Logiciel sous
r<EFBFBD>serve de mentionner, de fa<66>on explicite, son nom en tant qu'auteur de
cette Contribution et la date de cr<63>ation de celle-ci.
5.3 DROIT DE DISTRIBUTION
Le droit de distribution comporte notamment le droit de diffuser, de
transmettre et de communiquer le Logiciel au public sur tout support et
par tout moyen ainsi que le droit de mettre sur le march<63> <20> titre
on<EFBFBD>reux ou gratuit, un ou des exemplaires du Logiciel par tout proc<6F>d<EFBFBD>.
Le Licenci<63> est autoris<69> <20> distribuer des copies du Logiciel, modifi<66> ou
non, <20> des tiers dans les conditions ci-apr<70>s d<>taill<6C>es.
5.3.1 DISTRIBUTION DU LOGICIEL SANS MODIFICATION
Le Licenci<63> est autoris<69> <20> distribuer des copies conformes du Logiciel,
sous forme de Code Source ou de Code Objet, <20> condition que cette
distribution respecte les dispositions du Contrat dans leur totalit<69> et
soit accompagn<67>e:
1. d'un exemplaire du Contrat,
2. d'un avertissement relatif <20> la restriction de garantie et de
responsabilit<69> du Conc<6E>dant telle que pr<70>vue aux articles 8
et 9,
et que, dans le cas o<> seul le Code Objet du Logiciel est redistribu<62>,
le Licenci<63> permette aux futurs Licenci<63>s d'acc<63>der facilement au Code
Source complet du Logiciel en indiquant les modalit<69>s d'acc<63>s, <20>tant
entendu que le co<63>t additionnel d'acquisition du Code Source ne devra
pas exc<78>der le simple co<63>t de transfert des donn<6E>es.
5.3.2 DISTRIBUTION DU LOGICIEL MODIFIE
Lorsque le Licenci<63> apporte une Contribution au Logiciel, les conditions
de distribution du Logiciel Modifi<66> en r<>sultant sont alors soumises <20>
l'int<6E>gralit<69> des dispositions du Contrat.
Le Licenci<63> est autoris<69> <20> distribuer le Logiciel Modifi<66>, sous forme de
code source ou de code objet, <20> condition que cette distribution
respecte les dispositions du Contrat dans leur totalit<69> et soit
accompagn<EFBFBD>e:
1. d'un exemplaire du Contrat,
2. d'un avertissement relatif <20> la restriction de garantie et de
responsabilit<69> du Conc<6E>dant telle que pr<70>vue aux articles 8
et 9,
et que, dans le cas o<> seul le Code Objet du Logiciel Modifi<66> est
redistribu<EFBFBD>, le Licenci<63> permette aux futurs Licenci<63>s d'acc<63>der
facilement au code source complet du Logiciel Modifi<66> en indiquant les
modalit<EFBFBD>s d'acc<63>s, <20>tant entendu que le co<63>t additionnel d'acquisition
du code source ne devra pas exc<78>der le simple co<63>t de transfert des donn<6E>es.
5.3.3 DISTRIBUTION DES MODULES EXTERNES
Lorsque le Licenci<63> a d<>velopp<70> un Module Externe les conditions du
Contrat ne s'appliquent pas <20> ce Module Externe, qui peut <20>tre distribu<62>
sous un contrat de licence diff<66>rent.
5.3.4 COMPATIBILITE AVEC LA LICENCE GNU GPL
Le Licenci<63> peut inclure un code soumis aux dispositions d'une des
versions de la licence GNU GPL dans le Logiciel modifi<66> ou non et
distribuer l'ensemble sous les conditions de la m<>me version de la
licence GNU GPL.
Le Licenci<63> peut inclure le Logiciel modifi<66> ou non dans un code soumis
aux dispositions d'une des versions de la licence GNU GPL et distribuer
l'ensemble sous les conditions de la m<>me version de la licence GNU GPL.
Article 6 - PROPRIETE INTELLECTUELLE
6.1 SUR LE LOGICIEL INITIAL
Le Titulaire est d<>tenteur des droits patrimoniaux sur le Logiciel
Initial. Toute utilisation du Logiciel Initial est soumise au respect
des conditions dans lesquelles le Titulaire a choisi de diffuser son
oeuvre et nul autre n'a la facult<6C> de modifier les conditions de
diffusion de ce Logiciel Initial.
Le Titulaire s'engage <20> ce que le Logiciel Initial reste au moins r<>gi
par la pr<70>sente licence et ce, pour la dur<75>e vis<69>e <20> l'article 4.2.
6.2 SUR LES CONTRIBUTIONS
Le Licenci<63> qui a d<>velopp<70> une Contribution est titulaire sur celle-ci
des droits de propri<72>t<EFBFBD> intellectuelle dans les conditions d<>finies par
la l<>gislation applicable.
6.3 SUR LES MODULES EXTERNES
Le Licenci<63> qui a d<>velopp<70> un Module Externe est titulaire sur celui-ci
des droits de propri<72>t<EFBFBD> intellectuelle dans les conditions d<>finies par
la l<>gislation applicable et reste libre du choix du contrat r<>gissant
sa diffusion.
6.4 DISPOSITIONS COMMUNES
Le Licenci<63> s'engage express<73>ment:
1. <20> ne pas supprimer ou modifier de quelque mani<6E>re que ce soit les
mentions de propri<72>t<EFBFBD> intellectuelle appos<6F>es sur le Logiciel;
2. <20> reproduire <20> l'identique lesdites mentions de propri<72>t<EFBFBD>
intellectuelle sur les copies du Logiciel modifi<66> ou non.
Le Licenci<63> s'engage <20> ne pas porter atteinte, directement ou
indirectement, aux droits de propri<72>t<EFBFBD> intellectuelle du Titulaire et/ou
des Contributeurs sur le Logiciel et <20> prendre, le cas <20>ch<63>ant, <20>
l'<27>gard de son personnel toutes les mesures n<>cessaires pour assurer le
respect des dits droits de propri<72>t<EFBFBD> intellectuelle du Titulaire et/ou
des Contributeurs.
Article 7 - SERVICES ASSOCIES
7.1 Le Contrat n'oblige en aucun cas le Conc<6E>dant <20> la r<>alisation de
prestations d'assistance technique ou de maintenance du Logiciel.
Cependant le Conc<6E>dant reste libre de proposer ce type de services. Les
termes et conditions d'une telle assistance technique et/ou d'une telle
maintenance seront alors d<>termin<69>s dans un acte s<>par<61>. Ces actes de
maintenance et/ou assistance technique n'engageront que la seule
responsabilit<EFBFBD> du Conc<6E>dant qui les propose.
7.2 De m<>me, tout Conc<6E>dant est libre de proposer, sous sa seule
responsabilit<EFBFBD>, <20> ses licenci<63>s une garantie, qui n'engagera que lui,
lors de la redistribution du Logiciel et/ou du Logiciel Modifi<66> et ce,
dans les conditions qu'il souhaite. Cette garantie et les modalit<69>s
financi<EFBFBD>res de son application feront l'objet d'un acte s<>par<61> entre le
Conc<EFBFBD>dant et le Licenci<63>.
Article 8 - RESPONSABILITE
8.1 Sous r<>serve des dispositions de l'article 8.2, le Licenci<63> a la
facult<EFBFBD>, sous r<>serve de prouver la faute du Conc<6E>dant concern<72>, de
solliciter la r<>paration du pr<70>judice direct qu'il subirait du fait du
logiciel et dont il apportera la preuve.
8.2 La responsabilit<69> du Conc<6E>dant est limit<69>e aux engagements pris en
application du Contrat et ne saurait <20>tre engag<61>e en raison notamment:
(i) des dommages dus <20> l'inex<65>cution, totale ou partielle, de ses
obligations par le Licenci<63>, (ii) des dommages directs ou indirects
d<EFBFBD>coulant de l'utilisation ou des performances du Logiciel subis par le
Licenci<EFBFBD> et (iii) plus g<>n<EFBFBD>ralement d'un quelconque dommage indirect. En
particulier, les Parties conviennent express<73>ment que tout pr<70>judice
financier ou commercial (par exemple perte de donn<6E>es, perte de
b<EFBFBD>n<EFBFBD>fices, perte d'exploitation, perte de client<6E>le ou de commandes,
manque <20> gagner, trouble commercial quelconque) ou toute action dirig<69>e
contre le Licenci<63> par un tiers, constitue un dommage indirect et
n'ouvre pas droit <20> r<>paration par le Conc<6E>dant.
Article 9 - GARANTIE
9.1 Le Licenci<63> reconna<6E>t que l'<27>tat actuel des connaissances
scientifiques et techniques au moment de la mise en circulation du
Logiciel ne permet pas d'en tester et d'en v<>rifier toutes les
utilisations ni de d<>tecter l'existence d'<27>ventuels d<>fauts. L'attention
du Licenci<63> a <20>t<EFBFBD> attir<69>e sur ce point sur les risques associ<63>s au
chargement, <20> l'utilisation, la modification et/ou au d<>veloppement et <20>
la reproduction du Logiciel qui sont r<>serv<72>s <20> des utilisateurs avertis.
Il rel<65>ve de la responsabilit<69> du Licenci<63> de contr<74>ler, par tous
moyens, l'ad<61>quation du produit <20> ses besoins, son bon fonctionnement et
de s'assurer qu'il ne causera pas de dommages aux personnes et aux biens.
9.2 Le Conc<6E>dant d<>clare de bonne foi <20>tre en droit de conc<6E>der
l'ensemble des droits attach<63>s au Logiciel (comprenant notamment les
droits vis<69>s <20> l'article 5).
9.3 Le Licenci<63> reconna<6E>t que le Logiciel est fourni "en l'<27>tat" par le
Conc<EFBFBD>dant sans autre garantie, expresse ou tacite, que celle pr<70>vue <20>
l'article 9.2 et notamment sans aucune garantie sur sa valeur
commerciale, son caract<63>re s<>curis<69>, innovant ou pertinent.
En particulier, le Conc<6E>dant ne garantit pas que le Logiciel est exempt
d'erreur, qu'il fonctionnera sans interruption, qu'il sera compatible
avec l'<27>quipement du Licenci<63> et sa configuration logicielle ni qu'il
remplira les besoins du Licenci<63>.
9.4 Le Conc<6E>dant ne garantit pas, de mani<6E>re expresse ou tacite, que le
Logiciel ne porte pas atteinte <20> un quelconque droit de propri<72>t<EFBFBD>
intellectuelle d'un tiers portant sur un brevet, un logiciel ou sur tout
autre droit de propri<72>t<EFBFBD>. Ainsi, le Conc<6E>dant exclut toute garantie au
profit du Licenci<63> contre les actions en contrefa<66>on qui pourraient <20>tre
diligent<EFBFBD>es au titre de l'utilisation, de la modification, et de la
redistribution du Logiciel. N<>anmoins, si de telles actions sont
exerc<EFBFBD>es contre le Licenci<63>, le Conc<6E>dant lui apportera son aide
technique et juridique pour sa d<>fense. Cette aide technique et
juridique est d<>termin<69>e au cas par cas entre le Conc<6E>dant concern<72> et
le Licenci<63> dans le cadre d'un protocole d'accord. Le Conc<6E>dant d<>gage
toute responsabilit<69> quant <20> l'utilisation de la d<>nomination du
Logiciel par le Licenci<63>. Aucune garantie n'est apport<72>e quant <20>
l'existence de droits ant<6E>rieurs sur le nom du Logiciel et sur
l'existence d'une marque.
Article 10 - RESILIATION
10.1 En cas de manquement par le Licenci<63> aux obligations mises <20> sa
charge par le Contrat, le Conc<6E>dant pourra r<>silier de plein droit le
Contrat trente (30) jours apr<70>s notification adress<73>e au Licenci<63> et
rest<EFBFBD>e sans effet.
10.2 Le Licenci<63> dont le Contrat est r<>sili<6C> n'est plus autoris<69> <20>
utiliser, modifier ou distribuer le Logiciel. Cependant, toutes les
licences qu'il aura conc<6E>d<EFBFBD>es ant<6E>rieurement <20> la r<>siliation du Contrat
resteront valides sous r<>serve qu'elles aient <20>t<EFBFBD> effectu<74>es en
conformit<EFBFBD> avec le Contrat.
Article 11 - DISPOSITIONS DIVERSES
11.1 CAUSE EXTERIEURE
Aucune des Parties ne sera responsable d'un retard ou d'une d<>faillance
d'ex<65>cution du Contrat qui serait d<> <20> un cas de force majeure, un cas
fortuit ou une cause ext<78>rieure, telle que, notamment, le mauvais
fonctionnement ou les interruptions du r<>seau <20>lectrique ou de
t<EFBFBD>l<EFBFBD>communication, la paralysie du r<>seau li<6C>e <20> une attaque
informatique, l'intervention des autorit<69>s gouvernementales, les
catastrophes naturelles, les d<>g<EFBFBD>ts des eaux, les tremblements de terre,
le feu, les explosions, les gr<67>ves et les conflits sociaux, l'<27>tat de
guerre...
11.2 Le fait, par l'une ou l'autre des Parties, d'omettre en une ou
plusieurs occasions de se pr<70>valoir d'une ou plusieurs dispositions du
Contrat, ne pourra en aucun cas impliquer renonciation par la Partie
int<EFBFBD>ress<EFBFBD>e <20> s'en pr<70>valoir ult<6C>rieurement.
11.3 Le Contrat annule et remplace toute convention ant<6E>rieure, <20>crite
ou orale, entre les Parties sur le m<>me objet et constitue l'accord
entier entre les Parties sur cet objet. Aucune addition ou modification
aux termes du Contrat n'aura d'effet <20> l'<27>gard des Parties <20> moins
d'<27>tre faite par <20>crit et sign<67>e par leurs repr<70>sentants d<>ment habilit<69>s.
11.4 Dans l'hypoth<74>se o<> une ou plusieurs des dispositions du Contrat
s'av<61>rerait contraire <20> une loi ou <20> un texte applicable, existants ou
futurs, cette loi ou ce texte pr<70>vaudrait, et les Parties feraient les
amendements n<>cessaires pour se conformer <20> cette loi ou <20> ce texte.
Toutes les autres dispositions resteront en vigueur. De m<>me, la
nullit<EFBFBD>, pour quelque raison que ce soit, d'une des dispositions du
Contrat ne saurait entra<72>ner la nullit<69> de l'ensemble du Contrat.
11.5 LANGUE
Le Contrat est r<>dig<69> en langue fran<61>aise et en langue anglaise, ces
deux versions faisant <20>galement foi.
Article 12 - NOUVELLES VERSIONS DU CONTRAT
12.1 Toute personne est autoris<69>e <20> copier et distribuer des copies de
ce Contrat.
12.2 Afin d'en pr<70>server la coh<6F>rence, le texte du Contrat est prot<6F>g<EFBFBD>
et ne peut <20>tre modifi<66> que par les auteurs de la licence, lesquels se
r<EFBFBD>servent le droit de publier p<>riodiquement des mises <20> jour ou de
nouvelles versions du Contrat, qui poss<73>deront chacune un num<75>ro
distinct. Ces versions ult<6C>rieures seront susceptibles de prendre en
compte de nouvelles probl<62>matiques rencontr<74>es par les logiciels libres.
12.3 Tout Logiciel diffus<75> sous une version donn<6E>e du Contrat ne pourra
faire l'objet d'une diffusion ult<6C>rieure que sous la m<>me version du
Contrat ou une version post<73>rieure, sous r<>serve des dispositions de
l'article 5.3.4.
Article 13 - LOI APPLICABLE ET COMPETENCE TERRITORIALE
13.1 Le Contrat est r<>gi par la loi fran<61>aise. Les Parties conviennent
de tenter de r<>gler <20> l'amiable les diff<66>rends ou litiges qui
viendraient <20> se produire par suite ou <20> l'occasion du Contrat.
13.2 A d<>faut d'accord amiable dans un d<>lai de deux (2) mois <20> compter
de leur survenance et sauf situation relevant d'une proc<6F>dure d'urgence,
les diff<66>rends ou litiges seront port<72>s par la Partie la plus diligente
devant les Tribunaux comp<6D>tents de Paris.
Article 14 - NOMMAGE DES CONTRIBUTIONS ET LOGICIELS MODIFIES
Le nom de distribution d'un logiciel modifi<66> doit faire r<>f<EFBFBD>rence au nom du logiciel initial.
Les sources doivent clairement faire apparaitre le nom du logiciel initial, le nom de son auteur,
et son site internet.
Version 2.0 compl<70>t<EFBFBD>e du 2006-07-12.

36
3rdparty/crypt/changelog.txt vendored Executable file
View File

@@ -0,0 +1,36 @@
Version 1.4
Ajouts:
-------
- Image de fond aleatoire: si vous indiquez un r<>pertoire plutot qu'un fichier dans la variable $bgimg
l'image de fond sera choisie au hasard parmi celles du r<>pertoire.
- Possibilit<69> d'autoriser ou d'interdire la revalidation de la page de verification en cas de r<>actualisation
(variable $cryptoneuse) => (merci Aur<75>lien)
- Ajout d'un fichier index.html dans chaque sous-r<>pertoire
- Bruits: Ajout de brouillage par cercles al<61>atoires
- Bruits: Ajout de l'<27>paisseur variable du traits (variable $brushsize)
- Bruits: Ajout possibilit<69> de couleur de brouillage al<61>atoire.
Modifications:
--------------
- Suppression des espaces saisis par erreurs lors de la copie du cryptogramme (merci Emmanuel)
- Changement du nom du fichier de configuration: config.inc.php => cryptographp.cfg.php
- Changement du nom du fichier functions.php => cryptographp.fct.php
- L'image du bouton r<>g<EFBFBD>nerer (fichier reload.png) est transparente et de meilleure compression
=> Vous pouvez la remplacez par votre propre image si vous le souhaitez (fichier reload.png)
- Les images de messages d'erreurs (r<>pertoire images) sont de meilleure compression
Corrections:
------------
- Changement de la m<>thode de d<>tection du r<>pertoire d'installation.
- Gestion des sites avec configuration "safe_mode=on"
- correction de la balise <img> dans functions.php (Merci Lionel)
- Correction de la casse et du nom des polices.
Suppressions:
-------------
- suppression d'une portion de code deja en commentaire dans la version pr<70>c<EFBFBD>dente.

164
3rdparty/crypt/cryptographp.cfg.php vendored Executable file
View File

@@ -0,0 +1,164 @@
<?php
// -----------------------------------------------
// Cryptographp v1.4
// (c) 2006-2007 Sylvain BRISON
//
// www.cryptographp.com
// cryptographp@alphpa.com
//
// Licence CeCILL modifi<66>e
// => Voir fichier Licence_CeCILL_V2-fr.txt)
// -----------------------------------------------
// -------------------------------------
// Configuration du fond du cryptogramme
// -------------------------------------
$cryptwidth = 130; // Largeur du cryptogramme (en pixels)
$cryptheight = 40; // Hauteur du cryptogramme (en pixels)
$bgR = 255; // Couleur du fond au format RGB: Red (0->255)
$bgG = 255; // Couleur du fond au format RGB: Green (0->255)
$bgB = 255; // Couleur du fond au format RGB: Blue (0->255)
$bgclear = true; // Fond transparent (true/false)
// Uniquement valable pour le format PNG
$bgimg = ''; // Le fond du cryptogramme peut-<2D>tre une image
// PNG, GIF ou JPG. Indiquer le fichier image
// Exemple: $fondimage = 'photo.gif';
// L'image sera redimensionn<6E>e si n<>cessaire
// pour tenir dans le cryptogramme.
// Si vous indiquez un r<>pertoire plut<75>t qu'un
// fichier l'image sera prise au hasard parmi
// celles disponibles dans le r<>pertoire
$bgframe = true; // Ajoute un cadre de l'image (true/false)
// ----------------------------
// Configuration des caract<63>res
// ----------------------------
// Couleur de base des caract<63>res
$charR = 0; // Couleur des caract<63>res au format RGB: Red (0->255)
$charG = 0; // Couleur des caract<63>res au format RGB: Green (0->255)
$charB = 0; // Couleur des caract<63>res au format RGB: Blue (0->255)
$charcolorrnd = true; // Choix al<61>atoire de la couleur.
$charcolorrndlevel = 2; // Niveau de clart<72> des caract<63>res si choix al<61>atoire (0->4)
// 0: Aucune s<>lection
// 1: Couleurs tr<74>s sombres (surtout pour les fonds clairs)
// 2: Couleurs sombres
// 3: Couleurs claires
// 4: Couleurs tr<74>s claires (surtout pour fonds sombres)
$charclear = 10; // Intensit<69> de la transparence des caract<63>res (0->127)
// 0=opaques; 127=invisibles
// interessant si vous utilisez une image $bgimg
// Uniquement si PHP >=3.2.1
// Polices de caract<63>res
//$tfont[] = 'Alanden_.ttf'; // Les polices seront al<61>atoirement utilis<69>es.
//$tfont[] = 'bsurp___.ttf'; // Vous devez copier les fichiers correspondants
//$tfont[] = 'ELECHA__.TTF'; // sur le serveur.
$tfont[] = 'luggerbu.ttf'; // Ajoutez autant de lignes que vous voulez
//$tfont[] = 'RASCAL__.TTF'; // Respectez la casse !
//$tfont[] = 'SCRAWL.TTF';
$tfont[] = 'WAVY.TTF';
// Caracteres autoris<69>s
// Attention, certaines polices ne distinguent pas (ou difficilement) les majuscules
// et les minuscules. Certains caract<63>res sont faciles <20> confondre, il est donc
// conseill<6C> de bien choisir les caract<63>res utilis<69>s.
$charel = 'ABCDEFGHKLMNPRTWXYZ234569'; // Caract<63>res autoris<69>s
$crypteasy = true; // Cr<43>ation de cryptogrammes "faciles <20> lire" (true/false)
// compos<6F>s alternativement de consonnes et de voyelles.
$charelc = 'BCDFGHKLMNPRTVWXZ'; // Consonnes utilis<69>es si $crypteasy = true
$charelv = 'AEIOUY'; // Voyelles utilis<69>es si $crypteasy = true
$difuplow = false; // Diff<66>rencie les Maj/Min lors de la saisie du code (true, false)
$charnbmin = 4; // Nb minimum de caracteres dans le cryptogramme
$charnbmax = 4; // Nb maximum de caracteres dans le cryptogramme
$charspace = 20; // Espace entre les caracteres (en pixels)
$charsizemin = 14; // Taille minimum des caract<63>res
$charsizemax = 16; // Taille maximum des caract<63>res
$charanglemax = 25; // Angle maximum de rotation des caracteres (0-360)
$charup = true; // D<>placement vertical al<61>atoire des caract<63>res (true/false)
// Effets suppl<70>mentaires
$cryptgaussianblur = false; // Transforme l'image finale en brouillant: m<>thode Gauss (true/false)
// uniquement si PHP >= 5.0.0
$cryptgrayscal = false; // Transforme l'image finale en d<>grad<61> de gris (true/false)
// uniquement si PHP >= 5.0.0
// ----------------------
// Configuration du bruit
// ----------------------
$noisepxmin = 200; // Bruit: Nb minimum de pixels al<61>atoires
$noisepxmax = 300; // Bruit: Nb maximum de pixels al<61>atoires
$noiselinemin = 3; // Bruit: Nb minimum de lignes al<61>atoires
$noiselinemax = 5; // Bruit: Nb maximum de lignes al<61>atoires
$nbcirclemin = 3; // Bruit: Nb minimum de cercles al<61>atoires
$nbcirclemax = 5; // Bruit: Nb maximim de cercles al<61>atoires
$noisecolorchar = 3; // Bruit: Couleur d'ecriture des pixels, lignes, cercles:
// 1: Couleur d'<27>criture des caract<63>res
// 2: Couleur du fond
// 3: Couleur al<61>atoire
$brushsize = 1; // Taille d'ecriture du princeaiu (en pixels)
// de 1 <20> 25 (les valeurs plus importantes peuvent provoquer un
// Internal Server Error sur certaines versions de PHP/GD)
// Ne fonctionne pas sur les anciennes configurations PHP/GD
$noiseup = false; // Le bruit est-il par dessus l'ecriture (true) ou en dessous (false)
// --------------------------------
// Configuration syst<73>me & s<>curit<69>
// --------------------------------
$cryptformat = "png"; // Format du fichier image g<>n<EFBFBD>r<EFBFBD> "GIF", "PNG" ou "JPG"
// Si vous souhaitez un fond transparent, utilisez "PNG" (et non "GIF")
// Attention certaines versions de la bibliotheque GD ne gerent pas GIF !!!
$cryptsecure = "md5"; // M<>thode de crytpage utilis<69>e: "md5", "sha1" ou "" (aucune)
// "sha1" seulement si PHP>=4.2.0
// Si aucune m<>thode n'est indiqu<71>e, le code du cyptogramme est stock<63>
// en clair dans la session.
$cryptusetimer = 0; // Temps (en seconde) avant d'avoir le droit de reg<65>n<EFBFBD>rer un cryptogramme
$cryptusertimererror = 3; // Action <20> r<>aliser si le temps minimum n'est pas respect<63>:
// 1: Ne rien faire, ne pas renvoyer d'image.
// 2: L'image renvoy<6F>e est "images/erreur2.png" (vous pouvez la modifier)
// 3: Le script se met en pause le temps correspondant (attention au timeout
// par d<>faut qui coupe les scripts PHP au bout de 30 secondes)
// voir la variable "max_execution_time" de votre configuration PHP
$cryptusemax = 1000; // Nb maximum de fois que l'utilisateur peut g<>n<EFBFBD>rer le cryptogramme
// Si d<>passement, l'image renvoy<6F>e est "images/erreur1.png"
// PS: Par d<>faut, la dur<75>e d'une session PHP est de 180 mn, sauf si
// l'hebergeur ou le d<>veloppeur du site en ont d<>cid<69> autrement...
// Cette limite est effective pour toute la dur<75>e de la session.
$cryptoneuse = false; // Si vous souhaitez que la page de verification ne valide qu'une seule
// fois la saisie en cas de rechargement de la page indiquer "true".
// Sinon, le rechargement de la page confirmera toujours la saisie.
?>

58
3rdparty/crypt/cryptographp.fct.php vendored Executable file
View File

@@ -0,0 +1,58 @@
<?php
// -----------------------------------------------
// Cryptographp v1.4
// (c) 2006-2007 Sylvain BRISON
//
// www.cryptographp.com
// cryptographp@alphpa.com
//
// Licence CeCILL modifi<66>e
// => Voir fichier Licence_CeCILL_V2-fr.txt)
// -----------------------------------------------
if(session_id() == "") session_start();
$_SESSION['cryptdir']= dirname($cryptinstall);
function dsp_crypt($cfg=0,$reload=1, $table = true) {
// Affiche le cryptogramme (soit un tableau soit avec un <span>
if($table)
{
echo "<table><tr><td><img id='cryptogram' src='".$_SESSION['cryptdir']."/cryptographp.php?cfg=".$cfg."&".SID."'></td>";
if ($reload) echo "<td><a title='".($reload==1?'':$reload)."' style=\"cursor:pointer\" onclick=\"javascript:document.images.cryptogram.src='".$_SESSION['cryptdir']."/cryptographp.php?cfg=".$cfg."&".SID."&'+Math.round(Math.random(0)*1000)+1\"><img src=\"".$_SESSION['cryptdir']."/images/reload.png\"></a></td>";
echo "</tr></table>";
}
else
{
echo "<span style='height:40px; width: 161px;'><img style='background-color: #FFFFFF;' id='cryptogram' src='".$_SESSION['cryptdir']."/cryptographp.php?cfg=".$cfg."&".SID."'></td>";
if ($reload) echo "<a title='".($reload==1?'':$reload)."' style=\"cursor:pointer\" onclick=\"javascript:document.images.cryptogram.src='".$_SESSION['cryptdir']."/cryptographp.php?cfg=".$cfg."&".SID."&'+Math.round(Math.random(0)*1000)+1\"><img src=\"".$_SESSION['cryptdir']."/images/reload.png\"></a>";
echo "</span>";
}
}
function chk_crypt($code) {
// V<>rifie si le code est correct
include ($_SESSION['configfile']);
$code = addslashes ($code);
$code = str_replace(' ','',$code); // supprime les espaces saisis par erreur.
$code = ($difuplow?$code:strtoupper($code));
switch (strtoupper($cryptsecure)) {
case "MD5" : $code = md5($code); break;
case "SHA1" : $code = sha1($code); break;
}
if ($_SESSION['cryptcode'] and ($_SESSION['cryptcode'] == $code))
{
unset($_SESSION['cryptreload']);
if ($cryptoneuse) unset($_SESSION['cryptcode']);
return true;
}
else {
$_SESSION['cryptreload']= true;
return false;
}
}
?>

272
3rdparty/crypt/cryptographp.inc.php vendored Executable file
View File

@@ -0,0 +1,272 @@
<?php
// -----------------------------------------------
// Cryptographp v1.4
// (c) 2006-2007 Sylvain BRISON
//
// www.cryptographp.com
// cryptographp@alphpa.com
//
// Licence CeCILL modifi<66>e
// => Voir fichier Licence_CeCILL_V2-fr.txt)
// -----------------------------------------------
error_reporting(E_ALL ^ E_NOTICE);
srand((double)microtime()*1000000);
if ((!isset($_COOKIE['cryptcookietest'])) and ($_GET[$_GET['sn']]==""))
{
header("Content-type: image/png");
readfile('images/erreur3.png');
exit;
}
if ($_GET[$_GET['sn']]=="") unset ($_GET['sn']);
session_start();
// N'accepte que les fichiers de config du meme r<>pertoire
if (is_file($_GET['cfg']) and dirname($_GET['cfg'])=='.' ) $_SESSION['configfile']=$_GET['cfg'];
else $_SESSION['configfile']="cryptographp.cfg.php";
include($_SESSION['configfile']);
// V<>rifie si l'utilisateur a le droit de (re)g<>n<EFBFBD>rer un cryptogramme
if ($_SESSION['cryptcptuse']>=$cryptusemax) {
header("Content-type: image/png");
readfile('images/erreur1.png');
exit;
}
$delai = time()-$_SESSION['crypttime'];
if ($delai < $cryptusetimer) {
switch ($cryptusertimererror) {
case 2 : header("Content-type: image/png");
readfile('images/erreur2.png');
exit;
case 3 : sleep ($cryptusetimer-$delai);
break; // Fait une pause
case 1 :
default : exit; // Quitte le script sans rien faire
}
}
// Cr<43>ation du cryptogramme temporaire
$imgtmp = imagecreatetruecolor($cryptwidth,$cryptheight);
$blank = imagecolorallocate($imgtmp,255,255,255);
$black = imagecolorallocate($imgtmp,0,0,0);
imagefill($imgtmp,0,0,$blank);
$word ='';
$x = 10;
$pair = rand(0,1);
$charnb = rand($charnbmin,$charnbmax);
for ($i=1;$i<= $charnb;$i++) {
$tword[$i]['font'] = $tfont[array_rand($tfont,1)];
$tword[$i]['angle'] = (rand(1,2)==1)?rand(0,$charanglemax):rand(360-$charanglemax,360);
if ($crypteasy) $tword[$i]['element'] =(!$pair)?$charelc{rand(0,strlen($charelc)-1)}:$charelv{rand(0,strlen($charelv)-1)};
else $tword[$i]['element'] = $charel{rand(0,strlen($charel)-1)};
$pair=!$pair;
$tword[$i]['size'] = rand($charsizemin,$charsizemax);
$tword[$i]['y'] = ($charup?($cryptheight/2)+rand(0,($cryptheight/5)):($cryptheight/1.5));
$word .=$tword[$i]['element'];
$lafont="fonts/".$tword[$i]['font'];
imagettftext($imgtmp,$tword[$i]['size'],$tword[$i]['angle'],$x,$tword[$i]['y'],$black,$lafont,$tword[$i]['element']);
$x +=$charspace;
}
// Calcul du racadrage horizontal du cryptogramme temporaire
$xbegin=0;
$x=0;
while (($x<$cryptwidth)and(!$xbegin)) {
$y=0;
while (($y<$cryptheight)and(!$xbegin)) {
if (imagecolorat($imgtmp,$x,$y) != $blank) $xbegin = $x;
$y++;
}
$x++;
}
$xend=0;
$x=$cryptwidth-1;
while (($x>0)and(!$xend)) {
$y=0;
while (($y<$cryptheight)and(!$xend)) {
if (imagecolorat($imgtmp,$x,$y) != $blank) $xend = $x;
$y++;
}
$x--;
}
$xvariation = round(($cryptwidth/2)-(($xend-$xbegin)/2));
imagedestroy ($imgtmp);
// Cr<43>ation du cryptogramme d<>finitif
// Cr<43>ation du fond
$img = imagecreatetruecolor($cryptwidth,$cryptheight);
if ($bgimg and is_dir($bgimg)) {
$dh = opendir($bgimg);
while (false !== ($filename = readdir($dh)))
if(eregi(".[gif|jpg|png]$", $filename)) $files[] = $filename;
closedir($dh);
$bgimg = $bgimg.'/'.$files[array_rand($files,1)];
}
if ($bgimg) {
list($getwidth, $getheight, $gettype, $getattr) = getimagesize($bgimg);
switch ($gettype) {
case "1": $imgread = imagecreatefromgif($bgimg); break;
case "2": $imgread = imagecreatefromjpeg($bgimg); break;
case "3": $imgread = imagecreatefrompng($bgimg); break;
}
imagecopyresized ($img, $imgread, 0,0,0,0,$cryptwidth,$cryptheight,$getwidth,$getheight);
imagedestroy ($imgread);
}
else {
$bg = imagecolorallocate($img,$bgR,$bgG,$bgB);
imagefill($img,0,0,$bg);
if ($bgclear) imagecolortransparent($img,$bg);
}
function ecriture()
{
// Cr<43>ation de l'<27>criture
global $img, $ink, $charR, $charG, $charB, $charclear, $xvariation, $charnb, $charcolorrnd, $charcolorrndlevel, $tword, $charspace;
if (function_exists ('imagecolorallocatealpha')) $ink = imagecolorallocatealpha($img,$charR,$charG,$charB,$charclear);
else $ink = imagecolorallocate ($img,$charR,$charG,$charB);
$x = $xvariation;
for ($i=1;$i<=$charnb;$i++) {
if ($charcolorrnd){ // Choisit des couleurs au hasard
$ok = false;
do {
$rndR = rand(0,255); $rndG = rand(0,255); $rndB = rand(0,255);
$rndcolor = $rndR+$rndG+$rndB;
switch ($charcolorrndlevel) {
case 1 : if ($rndcolor<200) $ok=true; break; // tres sombre
case 2 : if ($rndcolor<400) $ok=true; break; // sombre
case 3 : if ($rndcolor>500) $ok=true; break; // claires
case 4 : if ($rndcolor>650) $ok=true; break; // tr<74>s claires
default : $ok=true;
}
} while (!$ok);
if (function_exists ('imagecolorallocatealpha')) $rndink = imagecolorallocatealpha($img,$rndR,$rndG,$rndB,$charclear);
else $rndink = imagecolorallocate ($img,$rndR,$rndG,$rndB);
}
$lafont="fonts/".$tword[$i]['font'];
imagettftext($img,$tword[$i]['size'],$tword[$i]['angle'],$x,$tword[$i]['y'],$charcolorrnd?$rndink:$ink,$lafont,$tword[$i]['element']);
$x +=$charspace;
}
}
function noisecolor()
// Fonction permettant de d<>terminer la couleur du bruit et la forme du pinceau
{
global $img, $noisecolorchar, $ink, $bg, $brushsize;
switch ($noisecolorchar) {
case 1 : $noisecol=$ink; break;
case 2 : $noisecol=$bg; break;
case 3 :
default : $noisecol=imagecolorallocate ($img,rand(0,255),rand(0,255),rand(0,255)); break;
}
if ($brushsize and $brushsize>1 and function_exists('imagesetbrush')) {
$brush = imagecreatetruecolor($brushsize,$brushsize);
imagefill($brush,0,0,$noisecol);
imagesetbrush($img,$brush);
$noisecol=IMG_COLOR_BRUSHED;
}
return $noisecol;
}
function bruit()
// Ajout de bruits: point, lignes et cercles al<61>atoires
{
global $noisepxmin, $noisepxmax, $noiselinemin, $noiselinemax, $nbcirclemin, $nbcirclemax,$img, $cryptwidth, $cryptheight;
$nbpx = rand($noisepxmin,$noisepxmax);
$nbline = rand($noiselinemin,$noiselinemax);
$nbcircle = rand($nbcirclemin,$nbcirclemax);
for ($i=1;$i<$nbpx;$i++) imagesetpixel ($img,rand(0,$cryptwidth-1),rand(0,$cryptheight-1),noisecolor());
for ($i=1;$i<=$nbline;$i++) imageline($img,rand(0,$cryptwidth-1),rand(0,$cryptheight-1),rand(0,$cryptwidth-1),rand(0,$cryptheight-1),noisecolor());
for ($i=1;$i<=$nbcircle;$i++) imagearc($img,rand(0,$cryptwidth-1),rand(0,$cryptheight-1),$rayon=rand(5,$cryptwidth/3),$rayon,0,360,noisecolor());
}
if ($noiseup) {
ecriture();
bruit();
} else {
bruit();
ecriture();
}
// Cr<43>ation du cadre
if ($bgframe) {
$framecol = imagecolorallocate($img,($bgR*3+$charR)/4,($bgG*3+$charG)/4,($bgB*3+$charB)/4);
imagerectangle($img,0,0,$cryptwidth-1,$cryptheight-1,$framecol);
}
// Transformations suppl<70>mentaires: Grayscale et Brouillage
// V<>rifie si la fonction existe dans la version PHP install<6C>e
if (function_exists('imagefilter')) {
if ($cryptgrayscal) imagefilter ( $img,IMG_FILTER_GRAYSCALE);
if ($cryptgaussianblur) imagefilter ( $img,IMG_FILTER_GAUSSIAN_BLUR);
}
// Conversion du cryptogramme en Majuscule si insensibilit<69> <20> la casse
$word = ($difuplow?$word:strtoupper($word));
// Retourne 2 informations dans la session:
// - Le code du cryptogramme (crypt<70> ou pas)
// - La Date/Heure de la cr<63>ation du cryptogramme au format integer "TimeStamp"
switch (strtoupper($cryptsecure)) {
case "MD5" : $_SESSION['cryptcode'] = md5($word); break;
case "SHA1" : $_SESSION['cryptcode'] = sha1($word); break;
default : $_SESSION['cryptcode'] = $word; break;
}
$_SESSION['crypttime'] = time();
$_SESSION['cryptcptuse']++;
// Envoi de l'image finale au navigateur
switch (strtoupper($cryptformat)) {
case "JPG" :
case "JPEG" : if (imagetypes() & IMG_JPG) {
header("Content-type: image/jpeg");
imagejpeg($img, "", 80);
}
break;
case "GIF" : if (imagetypes() & IMG_GIF) {
header("Content-type: image/gif");
imagegif($img);
}
break;
case "PNG" :
default : if (imagetypes() & IMG_PNG) {
header("Content-type: image/png");
imagepng($img);
}
}
imagedestroy ($img);
unset ($word,$tword);
unset ($_SESSION['cryptreload']);
?>

19
3rdparty/crypt/cryptographp.php vendored Executable file
View File

@@ -0,0 +1,19 @@
<?php
// -----------------------------------------------
// Cryptographp v1.4
// (c) 2006-2007 Sylvain BRISON
//
// www.cryptographp.com
// cryptographp@alphpa.com
//
// Licence CeCILL modifi<66>e
// => Voir fichier Licence_CeCILL_V2-fr.txt)
// -----------------------------------------------
session_start();
error_reporting(E_ALL ^ E_NOTICE);
SetCookie("cryptcookietest", "1");
Header("Location: cryptographp.inc.php?cfg=".$_GET['cfg']."&sn=".session_name()."&".SID);
?>

1
3rdparty/crypt/fonts/AOEFREE.TXT vendored Executable file
View File

@@ -0,0 +1 @@
Freeware Fonts Galore

24
3rdparty/crypt/fonts/Alanden.txt vendored Executable file
View File

@@ -0,0 +1,24 @@
Alan Den v1.0
Freeware from Unauthorized Type
This version includes two different versions of upper letters, punctuation, and some international characters. I also included some UA Type dingbats (just to amuse myself, and so you don't get those annoying boxes when you type something that isn't in the font).
I enjoy looking at calligraphy. One day I was searching the web for calligraphy, and I came across a cool picture of some lady's work. So I based a font on it. The original letters didn't have a full character set, so I had to come up with those on my own.
The original quote that inspired this font was:
Allies
And Enemies
In The
Old Northwest
Somehow I derived the name Alan Den from all that.
You use this font in any way that you see fit. If you distribute it, I would like for this text file to accompany it. (That's just so they know who made it.) You may distribute it on CD, disk, or any other medium, but you may not sell it.
UnAuthorized Type features the creations of:
Ben McGehee
bmcgehee@engr.latech.edu
http://www.latech.edu/~bmcgehee/untype/index.htm
Check back to see when I make new fonts!

BIN
3rdparty/crypt/fonts/Alanden_.ttf vendored Executable file

Binary file not shown.

BIN
3rdparty/crypt/fonts/ELECHA__.TTF vendored Executable file

Binary file not shown.

BIN
3rdparty/crypt/fonts/RASCAL__.TTF vendored Executable file

Binary file not shown.

BIN
3rdparty/crypt/fonts/SCRAWL.TTF vendored Executable file

Binary file not shown.

BIN
3rdparty/crypt/fonts/WAVY.TTF vendored Executable file

Binary file not shown.

5
3rdparty/crypt/fonts/WAVY.TXT vendored Executable file
View File

@@ -0,0 +1,5 @@
The Wavy font is an all-caps display font in which all of the normally straight lines on the letters are slightly wavy. It displays best at sizes of 18 points or more.
This font was created using Fontographer for Windows. It is (c) 1994 by J. Fordyce but may be freely distributed provided it is not altered, no fee is charged for it, and this text file is included with it.
Feel free to send comments to j4dice@aol.com

BIN
3rdparty/crypt/fonts/bsurp___.ttf vendored Executable file

Binary file not shown.

5
3rdparty/crypt/fonts/index.php vendored Executable file
View File

@@ -0,0 +1,5 @@
<?php
//Script de s<>curit<69>.
//Ne pas supprimer
header('location: ../index.php');
?>

BIN
3rdparty/crypt/fonts/luggerbu.ttf vendored Executable file

Binary file not shown.

24
3rdparty/crypt/fonts/luggerbu.txt vendored Executable file
View File

@@ -0,0 +1,24 @@
LuggerBug
Macintosh & Windows TrueType.
LuggerBug - The lowdown:
This version of LuggerBug is 18 (days) old, It's come of age. Which means it can drink in pubs, vote and watch adult videos. These are, of course, three things which should not be attempted in one day. However, I did just that and following an afternoon shuffling between the pub and the video store, I ended up voting for . . . Alicia Silverstone
LuggerBug - whats included
Uppercase & Lowercase are the same, numerals and some punctuation. The characters [ ] \ have the numbers 99, 95 and 00 on them for better displaying of prices like <20>24.99 etc.
LuggerBug ?!
I was originaly going to call it BuggerLugs, but I though that might be a bit stupid. You may or may not know what 'Buggerlugs' means, well in Scotland it's a semi-effectionate term to describe someone you know quite well, but at the same time, slag them off without any guilt being attached.
Legal frivolity
1. This lovely font is completely and utterly free, you can use it in any way you see fit. email me if you use it for something useful.
2. Please keep this archive intact along with this readme file.
3. And if you want to put these onto a magazine floppy, CD-Rom, go ahead, as long as you follow (2).
Paul Reid.
October '97.
email: whoami@btinternet.com
Site: http://www.btinternet.com/~whoami
"That night they stayed outside the Asylum and watched TV from inside it."

18
3rdparty/crypt/fonts/scrawl.txt vendored Executable file
View File

@@ -0,0 +1,18 @@
scrawllege.ttf
unzip to any folder, copy or send to c:\windows\fonts....
enjoy!
this font is freeware, but donations would certainly be
accepted. if you'd prefer not to donate to me, help out
someone else in need...
comments to:
Andy Krahling
matsuan@aol.com
http://members.xoom.com/Krahling.page1.html
sunwalk fontworks, manchester, nh
custom fonts available, contact me!

BIN
3rdparty/crypt/images/Thumbs.db vendored Executable file

Binary file not shown.

BIN
3rdparty/crypt/images/erreur1.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

BIN
3rdparty/crypt/images/erreur2.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

BIN
3rdparty/crypt/images/erreur3.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

5
3rdparty/crypt/images/index.php vendored Executable file
View File

@@ -0,0 +1,5 @@
<?php
//Script de s<>curit<69>.
//Ne pas supprimer
header('location: ../index.php');
?>

BIN
3rdparty/crypt/images/reload.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

5
3rdparty/crypt/index.php vendored Executable file
View File

@@ -0,0 +1,5 @@
<?php
//Script de s<>curit<69>.
//Ne pas supprimer
header('location: ../index.php');
?>

8
3rdparty/crypt/lisezmoi.txt vendored Executable file
View File

@@ -0,0 +1,8 @@
Cryptographp v1.4
-----------------
S'il vous plait, consultez www.cryptographp.com pour la documentation !
documentation en fran<61>ais et en anglais.
http://www.cryptographp.com

11
3rdparty/crypt/readme.txt vendored Executable file
View File

@@ -0,0 +1,11 @@
Cryptographp v1.4
-----------------
Please consult www.cryptographp.com for documentation !
English and french documentation.
http://www.cryptographp.com

7
3rdparty/fancyapps/.gitattributes vendored Executable file
View File

@@ -0,0 +1,7 @@
# Auto detect text files and perform LF normalization
* text=auto
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.gif binary

125
3rdparty/fancyapps/CHANGELOG.md vendored Executable file
View File

@@ -0,0 +1,125 @@
fancyBox - Changelog
=========
### Version 2.1.5 - June 14, 2013
* Fixed #493 - Broken slideshow
* Fixed #556 - Parent option
* Retina graphics (#564) and retina display support (#420)
* Improved "lock" feature
### Version 2.1.4 - January 10, 2013
* Update to be compatible with jQuery v1.9
* Small changes that should fix usability issues for certain users
### Version 2.1.3 - October 23, 2012
* Fixed #426 - Broken IE7
* Fixed #423 - Background flickering on iOS
* Fixed #418 - Automatically Grow/Shrink and Center
* Updated the script to work with jQuery 1.6
* Media helper supports YouTube video series
### Version 2.1.2 - October 15, 2012
* Fixed #414 - Don't allow nextClick if there is only one item
* Fixed #397 - Button helper 'Menu' not visible in IE7
* Overlay can be opened/closed manually:
* $.fancybox.helpers.overlay.open();
* $.fancybox.helpers.overlay.open({closeClick : false});
* $.fancybox.helpers.overlay.close();
* Optimized for Internet Explorer 10 (Windows 8)
### Version 2.1.1 - October 01, 2012
* Fixed #357 - Converting values like 'auto' in getScalar()
* Fixed #358 - Updated overlay background image
* New "fancybox-href" and "fancybox-title" HTML5 data-attributes (#317)
* Improved helpers:
* - now they can have a property 'defaults' that contains default settings
* - updated vimeo and youtube parsers for media helper
* Content locking now can be turned off
### Version 2.1.0 - August 20, 2012
* Fixed #103 - DOM element re-injection after closing
* Fixed #188 - navigation keys inside editable content
* New animation directions (see https://github.com/fancyapps/fancyBox/issues/233#issuecomment-5512453)
* New option "iframe" - it is now possible to separate scrolling for iframe and wrapping element; choose to preload
* New option "swf" - brings back functionality from fancyBox v1
* Improved media helper - better support for vimeo and youtube; links are now configurable
* Rewritten overlay helper:
* - new option "showEarly" - toggles if should be open before of after content is loaded
* - Facebook-style (https://github.com/fancyapps/fancyBox/issues/24) and therefore uses image for background
* Option "padding" accepts array (e.g., padding: [15, 50, 10, 5])
* One of dimensions (width or height) can now be set to "auto" (option "autoSize" needs to be "false")
* Updated callbacks:
* - "beforeClose" is now called only once
* - "afterLoad" receives current and previous object as arguments
* Method "$.fancybox.update();" recalculates content width/height
* Updated to work with jQuery v1.8
### Version 2.0.6 - April 16, 2012
* Fixed #188 - keystrokes in contenteditable
* Fixed #171 - non-images should not be preloaded
* Fixed #158 - 'closeClick: true' breaks gallery navigation
* New "media" helper - detects and displays various media types
* New option "groupAttr" - name of group selector attribute, default is "data-fancybox-group"
* New feature - selector expressions in URLs, see #170
* Improved 'overlay' helper to use "position: fixed"
* Improved autoSize, fixed wrong height in some cases
* Improved centering and iframe scrolling for iOS
* Updated markup, new element '.fancybox-skin' is now used for styling
### Version 2.0.5 - February 21, 2012
* Fixed #155 - easing for prev/next animations
* Fixed #153 - overriding "keys" options
* Fixed #147 - IE7 problem with #hash links
* Fixed #130 - changing dynamically data-fancybox-group
* Fixed #126 - obey minWidth/minHeight
* Fixed #118 - placement of loading icon and navigation arrows
* Fixed #101 - "index" option not working
* Fixed #94 - "orig" option not working
* Fixed #80 - does not work on IE6
* Fixed #72 - can't set overlay opacity to 0
* Fixed #63 - properly set gallery index
* New option "autoCenter" - toggles centering on window resize or scroll, disabled for mobile devices by default
* New option "autoResize" - toggles responsivity, disabled for mobile devices by default
* New option "preload" - number of images to preload
* New feature to target mobile/desktop browsers using CSS, see #108
* Changed ajax option defaults to "{ dataType: 'html', headers: { 'X-fancyBox': true } }", see #150 and #128
* Updated loading icon for IE7, IE8
* Calculates height of the iframe if 'autoSize' is set to 'true' and the iframe is on the same domain as the main page
### Version 2.0.4 - December 12, 2011
* Fixed #47 - fix overriding properties
* New option "position" to thumbnail and button helpers
### Version 2.0.3 - November 29, 2011
* Fixed #29 - broken elastic transitions
### Version 2.0.2 - November 28, 2011
* Fixed slideshow
* Fixed scrollbars issue when displayed a very tall image
* New option "nextClick" - navigate to next gallery item when user clicks the content
* New option "modal" - to disable navigation and closing
* Add 'metadata' plugin support
* Add ability to create groups using 'data-fancybox-group' attribute
* Updated manual usage to match earlier releases
### Version 2.0.1 - November 23, 2011
* Fixed keyboard events inside form elements
* Fixed manual usage
### Version 2.0.0 - November 21, 2011
First release - completely rewritten, many new features and updated graphics.

217
3rdparty/fancyapps/README.md vendored Executable file
View File

@@ -0,0 +1,217 @@
fancyBox
========
fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages.
More information and examples: http://www.fancyapps.com/fancybox/
License: http://www.fancyapps.com/fancybox/#license
Copyright (c) 2012 Janis Skarnelis - janis@fancyapps.com
How to use
----------
To get started, download the plugin, unzip it and copy files to your website/application directory.
Load files in the <head> section of your HTML document. Make sure you also add the jQuery library.
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css" media="screen" />
<script type="text/javascript" src="/fancybox/jquery.fancybox.pack.js"></script>
</head>
Create your links with a `title` if you want a title to be shown, and add a class:
<a href="large_image.jpg" class="fancybox" title="Sample title"><img src="small_image.jpg" /></a>
If you have a set of related items that you would like to group,
additionally include a group name in the `rel` (or `data-fancybox-group`) attribute:
<a href="large_1.jpg" class="fancybox" rel="gallery" title="Sample title 1"><img src="small_1.jpg" /></a>
<a href="large_2.jpg" class="fancybox" rel="gallery" title="Sample title 1"><img src="small_2.jpg" /></a>
Initialise the script like this:
<script>
$(document).ready(function() {
$('.fancybox').fancybox();
});
</script>
May also be passed an optional options object which will extend the default values. Example:
<script>
$(document).ready(function() {
$('.fancybox').fancybox({
padding : 0,
openEffect : 'elastic'
});
});
</script>
Tip: Automatically group and apply fancyBox to all images:
$("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.png'],a[href$='.gif']").attr('rel', 'gallery').fancybox();
Script uses the `href` attribute of the matched elements to obtain the location of the content and to figure out content type you want to display.
You can specify type directly by adding classname (fancybox.image, fancybox.iframe, etc) or `data-fancybox-type` attribute:
//Ajax:
<a href="/example.html" class="fancybox fancybox.ajax">Example</a>
//or
<a href="/example.html" class="fancybox" data-fancybox-type="ajax">Example</a>
//Iframe:
<a href="example.html" class="fancybox fancybox.iframe">Example</a>
//Inline (will display an element with `id="example"`)
<a href="#example" class="fancybox">Example</a>
//SWF:
<a href="example.swf" class="fancybox">Example</a>
//Image:
<a href="example.jpg" class="fancybox">Example</a>
Note, ajax requests are subject to the [same origin policy](http://en.wikipedia.org/wiki/Same_origin_policy).
If fancyBox will not be able to get content type, it will try to guess based on 'href' and will quit silently if would not succeed.
(this is different from previsous versions where 'ajax' was used as default type or an error message was displayed).
Advanced
--------
### Helpers
Helpers provide a simple mechanism to extend the capabilities of fancyBox. There are two built-in helpers - 'overlay' and 'title'.
You can disable them, set custom options or enable other helpers. Examples:
//Disable title helper
$(".fancybox").fancybox({
helpers: {
title: null
}
});
//Disable overlay helper
$(".fancybox").fancybox({
helpers: {
overlay : null
}
});
//Change title position and overlay color
$(".fancybox").fancybox({
helpers: {
title : {
type : 'inside'
},
overlay : {
css : {
'background' : 'rgba(255,255,255,0.5)'
}
}
}
});
//Enable thumbnail helper and set custom options
$(".fancybox").fancybox({
helpers: {
thumbs : {
width: 50,
height: 50
}
}
});
### API
Also available are event driven callback methods. The `this` keyword refers to the current or upcoming object (depends on callback method). Here is how you can change title:
$(".fancybox").fancybox({
beforeLoad : function() {
this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
/*
"this.element" refers to current element, so you can, for example, use the "alt" attribute of the image to store the title:
this.title = $(this.element).find('img').attr('alt');
*/
}
});
It`s possible to open fancyBox programmatically in various ways:
//HTML content:
$.fancybox( '<div><h1>Lorem Lipsum</h1><p>Lorem lipsum</p></div>', {
title : 'Custom Title'
});
//DOM element:
$.fancybox( $("#inline"), {
title : 'Custom Title'
});
//Custom object:
$.fancybox({
href: 'example.jpg',
title : 'Custom Title'
});
//Array of objects:
$.fancybox([
{
href: 'example1.jpg',
title : 'Custom Title 1'
},
{
href: 'example2.jpg',
title : 'Custom Title 2'
}
], {
padding: 0
});
There are several methods that allow you to interact with and manipulate fancyBox, example:
//Close fancybox:
$.fancybox.close();
There is a simply way to access wrapping elements using JS:
$.fancybox.wrap
$.fancybox.skin
$.fancybox.outer
$.fancybox.inner
You can override CSS to customize the look. For example, make navigation arrows always visible,
change width and move them outside of area (use this snippet after including fancybox.css):
.fancybox-nav span {
visibility: visible;
}
.fancybox-nav {
width: 80px;
}
.fancybox-prev {
left: -80px;
}
.fancybox-next {
right: -80px;
}
In that case, you might want to increase space around box:
$(".fancybox").fancybox({
margin : [20, 60, 20, 60]
});
Bug tracker
-----------
Have a bug? Please create an issue on GitHub at https://github.com/fancyapps/fancyBox/issues

BIN
3rdparty/fancyapps/demo/1_b.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
3rdparty/fancyapps/demo/1_s.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
3rdparty/fancyapps/demo/2_b.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
3rdparty/fancyapps/demo/2_s.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
3rdparty/fancyapps/demo/3_b.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
3rdparty/fancyapps/demo/3_s.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
3rdparty/fancyapps/demo/4_b.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
3rdparty/fancyapps/demo/4_s.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
3rdparty/fancyapps/demo/5_b.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
3rdparty/fancyapps/demo/5_s.jpg vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

15
3rdparty/fancyapps/demo/ajax.txt vendored Executable file
View File

@@ -0,0 +1,15 @@
<div style="max-width:700px;">
<h2>Lorem ipsum dolor sit amet3</h2>
<p>
<a href="javascript:jQuery.fancybox.close();">Close me</a>
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas fermentum ante et sapien dignissim in viverra magna feugiat. Donec tempus ipsum nec neque dignissim quis eleifend eros gravida. Praesent nisi massa, sodales quis tincidunt ac, semper quis risus. In suscipit nisl sed leo aliquet consequat. Integer vitae augue in risus porttitor pellentesque eu eget odio. Fusce ut sagittis quam. Morbi aliquam interdum blandit. Integer pharetra tempor velit, aliquam dictum justo tempus sed. Morbi congue fringilla justo a feugiat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent quis metus et nisl consectetur pharetra. Nam bibendum turpis eu metus luctus eu volutpat sem molestie. Nam sollicitudin porttitor lorem, ac ultricies est venenatis eu. Ut dignissim elit et orci feugiat ac placerat purus euismod. Ut mi lorem, cursus et sagittis elementum, luctus ac massa.
</p>
<p>
Phasellus et ligula vel diam ullamcorper volutpat. Integer rhoncus rhoncus aliquam. Aliquam erat volutpat. Aenean luctus vestibulum placerat. Quisque quam neque, lacinia aliquet eleifend ac, aliquet blandit felis. Curabitur porta ultricies dui, sit amet mattis quam euismod a. Ut eleifend scelerisque neque, sit amet accumsan odio consequat ut. Proin facilisis auctor elit sed accumsan. Cras dapibus nisl in nisi rhoncus laoreet. Nullam pellentesque tortor libero, eget facilisis ipsum. Donec ultricies tellus tellus, in tincidunt purus. Nullam in est aliquam velit scelerisque blandit. In tincidunt, magna a dapibus imperdiet, quam urna elementum leo, vitae rhoncus nisl velit cursus velit. In dignissim sem ac mauris rhoncus ornare.
</p>
<p>
Duis imperdiet velit vel quam malesuada suscipit imperdiet tellus hendrerit. Mauris vestibulum odio mauris, ut placerat leo. Mauris quis neque at tellus feugiat congue id non enim. Nam vehicula posuere nulla eget vehicula. Donec pretium purus nec ligula porta eu laoreet sapien venenatis. Nulla facilisi. Phasellus eget mi enim. Phasellus molestie tincidunt ultrices. Aenean id sem a tellus lobortis tincidunt. Nam laoreet nulla vel velit tincidunt ac rutrum libero malesuada. Nulla consequat dolor quis nisl tempor fermentum. Integer sodales pretium varius. Aenean a leo vitae odio dictum dignissim malesuada nec dolor. Phasellus adipiscing viverra est, ac sagittis libero sagittis quis. Sed interdum dapibus nunc et fringilla. Nunc vel velit et urna laoreet bibendum.
</p>
</div>

26
3rdparty/fancyapps/demo/iframe.html vendored Executable file
View File

@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<title>fancyBox - iframe demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1>fancyBox - iframe demo</h1>
<p>
<a href="javascript:parent.jQuery.fancybox.close();">Close iframe parent</a>
|
<a href="javascript:parent.jQuery.fancybox.open({href : '1_b.jpg', title : 'My title'});">Change content</a>
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam scelerisque justo ac eros consectetur bibendum. In hac habitasse platea dictumst. Nulla aliquam turpis et tellus elementum luctus. Duis sit amet rhoncus velit. Duis nisl ligula, mattis interdum blandit laoreet, mattis id ante. Cras pulvinar lacus vitae nisi egestas non euismod neque bibendum. Vestibulum faucibus libero id ante molestie ultricies. Vestibulum quis nibh felis. Vestibulum libero nisl, vehicula vel ullamcorper sit amet, tristique sit amet augue. Etiam urna neque, porttitor sed sodales lacinia, posuere a nisl. Vestibulum blandit neque in sapien volutpat ac condimentum sapien auctor. Ut imperdiet venenatis ultricies. Phasellus accumsan, sem eu placerat commodo, felis purus commodo ipsum, sit amet vulputate orci est viverra est.
</p>
<p>
Aenean velit est, condimentum ut iaculis ut, accumsan at mi. Maecenas velit mi, venenatis ut condimentum at, ultrices vel tortor. Curabitur pharetra ornare dapibus. Ut volutpat cursus semper. In hac habitasse platea dictumst. Donec eu iaculis ipsum. Morbi eu dolor velit, a semper nunc.
</p>
</body>
</html>

312
3rdparty/fancyapps/demo/index.html vendored Executable file
View File

@@ -0,0 +1,312 @@
<!DOCTYPE html>
<html>
<head>
<title>fancyBox - Fancy jQuery Lightbox Alternative | Demonstration</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- Add jQuery library -->
<script type="text/javascript" src="../lib/jquery-1.10.1.min.js"></script>
<!-- Add mousewheel plugin (this is optional) -->
<script type="text/javascript" src="../lib/jquery.mousewheel-3.0.6.pack.js"></script>
<!-- Add fancyBox main JS and CSS files -->
<script type="text/javascript" src="../source/jquery.fancybox.js?v=2.1.5"></script>
<link rel="stylesheet" type="text/css" href="../source/jquery.fancybox.css?v=2.1.5" media="screen" />
<!-- Add Button helper (this is optional) -->
<link rel="stylesheet" type="text/css" href="../source/helpers/jquery.fancybox-buttons.css?v=1.0.5" />
<script type="text/javascript" src="../source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
<!-- Add Thumbnail helper (this is optional) -->
<link rel="stylesheet" type="text/css" href="../source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" />
<script type="text/javascript" src="../source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>
<!-- Add Media helper (this is optional) -->
<script type="text/javascript" src="../source/helpers/jquery.fancybox-media.js?v=1.0.6"></script>
<script type="text/javascript">
$(document).ready(function() {
/*
* Simple image gallery. Uses default settings
*/
$('.fancybox').fancybox();
/*
* Different effects
*/
// Change title type, overlay closing speed
$(".fancybox-effects-a").fancybox({
helpers: {
title : {
type : 'outside'
},
overlay : {
speedOut : 0
}
}
});
// Disable opening and closing animations, change title type
$(".fancybox-effects-b").fancybox({
openEffect : 'none',
closeEffect : 'none',
helpers : {
title : {
type : 'over'
}
}
});
// Set custom style, close if clicked, change title type and overlay color
$(".fancybox-effects-c").fancybox({
wrapCSS : 'fancybox-custom',
closeClick : true,
openEffect : 'none',
helpers : {
title : {
type : 'inside'
},
overlay : {
css : {
'background' : 'rgba(238,238,238,0.85)'
}
}
}
});
// Remove padding, set opening and closing animations, close if clicked and disable overlay
$(".fancybox-effects-d").fancybox({
padding: 0,
openEffect : 'elastic',
openSpeed : 150,
closeEffect : 'elastic',
closeSpeed : 150,
closeClick : true,
helpers : {
overlay : null
}
});
/*
* Button helper. Disable animations, hide close button, change title type and content
*/
$('.fancybox-buttons').fancybox({
openEffect : 'none',
closeEffect : 'none',
prevEffect : 'none',
nextEffect : 'none',
closeBtn : false,
helpers : {
title : {
type : 'inside'
},
buttons : {}
},
afterLoad : function() {
this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
}
});
/*
* Thumbnail helper. Disable animations, hide close button, arrows and slide to next gallery item if clicked
*/
$('.fancybox-thumbs').fancybox({
prevEffect : 'none',
nextEffect : 'none',
closeBtn : false,
arrows : false,
nextClick : true,
helpers : {
thumbs : {
width : 50,
height : 50
}
}
});
/*
* Media helper. Group items, disable animations, hide arrows, enable media and button helpers.
*/
$('.fancybox-media')
.attr('rel', 'media-gallery')
.fancybox({
openEffect : 'none',
closeEffect : 'none',
prevEffect : 'none',
nextEffect : 'none',
arrows : false,
helpers : {
media : {},
buttons : {}
}
});
/*
* Open manually
*/
$("#fancybox-manual-a").click(function() {
$.fancybox.open('1_b.jpg');
});
$("#fancybox-manual-b").click(function() {
$.fancybox.open({
href : 'iframe.html',
type : 'iframe',
padding : 5
});
});
$("#fancybox-manual-c").click(function() {
$.fancybox.open([
{
href : '1_b.jpg',
title : 'My title'
}, {
href : '2_b.jpg',
title : '2nd title'
}, {
href : '3_b.jpg'
}
], {
helpers : {
thumbs : {
width: 75,
height: 50
}
}
});
});
});
</script>
<style type="text/css">
.fancybox-custom .fancybox-skin {
box-shadow: 0 0 50px #222;
}
body {
max-width: 700px;
margin: 0 auto;
}
</style>
</head>
<body>
<h1>fancyBox</h1>
<p>This is a demonstration. More information and examples: <a href="http://fancyapps.com/fancybox/">www.fancyapps.com/fancybox/</a></p>
<h3>Simple image gallery</h3>
<p>
<a class="fancybox" href="1_b.jpg" data-fancybox-group="gallery" title="Lorem ipsum dolor sit amet"><img src="1_s.jpg" alt="" /></a>
<a class="fancybox" href="2_b.jpg" data-fancybox-group="gallery" title="Etiam quis mi eu elit temp"><img src="2_s.jpg" alt="" /></a>
<a class="fancybox" href="3_b.jpg" data-fancybox-group="gallery" title="Cras neque mi, semper leon"><img src="3_s.jpg" alt="" /></a>
<a class="fancybox" href="4_b.jpg" data-fancybox-group="gallery" title="Sed vel sapien vel sem uno"><img src="4_s.jpg" alt="" /></a>
</p>
<h3>Different effects</h3>
<p>
<a class="fancybox-effects-a" href="5_b.jpg" title="Lorem ipsum dolor sit amet, consectetur adipiscing elit"><img src="5_s.jpg" alt="" /></a>
<a class="fancybox-effects-b" href="5_b.jpg" title="Lorem ipsum dolor sit amet, consectetur adipiscing elit"><img src="5_s.jpg" alt="" /></a>
<a class="fancybox-effects-c" href="5_b.jpg" title="Lorem ipsum dolor sit amet, consectetur adipiscing elit"><img src="5_s.jpg" alt="" /></a>
<a class="fancybox-effects-d" href="5_b.jpg" title="Lorem ipsum dolor sit amet, consectetur adipiscing elit"><img src="5_s.jpg" alt="" /></a>
</p>
<h3>Various types</h3>
<p>
fancyBox will try to guess content type from href attribute but you can specify it directly by adding classname (fancybox.image, fancybox.iframe, etc).
</p>
<ul>
<li><a class="fancybox" href="#inline1" title="Lorem ipsum dolor sit amet">Inline</a></li>
<li><a class="fancybox fancybox.ajax" href="ajax.txt">Ajax</a></li>
<li><a class="fancybox fancybox.iframe" href="iframe.html">Iframe</a></li>
<li><a class="fancybox" href="http://www.adobe.com/jp/events/cs3_web_edition_tour/swfs/perform.swf">Swf</a></li>
</ul>
<div id="inline1" style="width:400px;display: none;">
<h3>Etiam quis mi eu elit</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis mi eu elit tempor facilisis id et neque. Nulla sit amet sem sapien. Vestibulum imperdiet porta ante ac ornare. Nulla et lorem eu nibh adipiscing ultricies nec at lacus. Cras laoreet ultricies sem, at blandit mi eleifend aliquam. Nunc enim ipsum, vehicula non pretium varius, cursus ac tortor. Vivamus fringilla congue laoreet. Quisque ultrices sodales orci, quis rhoncus justo auctor in. Phasellus dui eros, bibendum eu feugiat ornare, faucibus eu mi. Nunc aliquet tempus sem, id aliquam diam varius ac. Maecenas nisl nunc, molestie vitae eleifend vel, iaculis sed magna. Aenean tempus lacus vitae orci posuere porttitor eget non felis. Donec lectus elit, aliquam nec eleifend sit amet, vestibulum sed nunc.
</p>
</div>
<p>
Ajax example will not run from your local computer and requires a server to run.
</p>
<h3>Button helper</h3>
<p>
<a class="fancybox-buttons" data-fancybox-group="button" href="1_b.jpg"><img src="1_s.jpg" alt="" /></a>
<a class="fancybox-buttons" data-fancybox-group="button" href="2_b.jpg"><img src="2_s.jpg" alt="" /></a>
<a class="fancybox-buttons" data-fancybox-group="button" href="3_b.jpg"><img src="3_s.jpg" alt="" /></a>
<a class="fancybox-buttons" data-fancybox-group="button" href="4_b.jpg"><img src="4_s.jpg" alt="" /></a>
</p>
<h3>Thumbnail helper</h3>
<p>
<a class="fancybox-thumbs" data-fancybox-group="thumb" href="4_b.jpg"><img src="4_s.jpg" alt="" /></a>
<a class="fancybox-thumbs" data-fancybox-group="thumb" href="3_b.jpg"><img src="3_s.jpg" alt="" /></a>
<a class="fancybox-thumbs" data-fancybox-group="thumb" href="2_b.jpg"><img src="2_s.jpg" alt="" /></a>
<a class="fancybox-thumbs" data-fancybox-group="thumb" href="1_b.jpg"><img src="1_s.jpg" alt="" /></a>
</p>
<h3>Media helper</h3>
<p>
Will not run from your local computer, requires a server to run.
</p>
<ul>
<li><a class="fancybox-media" href="http://www.youtube.com/watch?v=opj24KnzrWo">Youtube</a></li>
<li><a class="fancybox-media" href="http://vimeo.com/47480346">Vimeo</a></li>
<li><a class="fancybox-media" href="http://www.metacafe.com/watch/7635964/">Metacafe</a></li>
<li><a class="fancybox-media" href="http://www.dailymotion.com/video/xoeylt_electric-guest-this-head-i-hold_music">Dailymotion</a></li>
<li><a class="fancybox-media" href="http://twitvid.com/QY7MD">Twitvid</a></li>
<li><a class="fancybox-media" href="http://twitpic.com/7p93st">Twitpic</a></li>
<li><a class="fancybox-media" href="http://instagr.am/p/IejkuUGxQn">Instagram</a></li>
</ul>
<h3>Open manually</h3>
<ul>
<li><a id="fancybox-manual-a" href="javascript:;">Open single item</a></li>
<li><a id="fancybox-manual-b" href="javascript:;">Open single item, custom options</a></li>
<li><a id="fancybox-manual-c" href="javascript:;">Open gallery</a></li>
</ul>
<p>
Photo Credit: Instagrammer @whitjohns
</p>
</body>
</html>

6
3rdparty/fancyapps/lib/jquery-1.10.1.min.js vendored Executable file

File diff suppressed because one or more lines are too long

4
3rdparty/fancyapps/lib/jquery-1.9.0.min.js vendored Executable file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,13 @@
/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
* Thanks to: Seamus Leahy for adding deltaX and deltaY
*
* Version: 3.0.6
*
* Requires: 1.2.2+
*/
(function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);b.wheelDeltaY!==void 0&&(g=b.wheelDeltaY/120);b.wheelDeltaX!==void 0&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]=
d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);

BIN
3rdparty/fancyapps/source/blank.gif vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

BIN
3rdparty/fancyapps/source/fancybox_loading.gif vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
3rdparty/fancyapps/source/fancybox_overlay.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1003 B

BIN
3rdparty/fancyapps/source/fancybox_sprite.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,97 @@
#fancybox-buttons {
position: fixed;
left: 0;
width: 100%;
z-index: 8050;
}
#fancybox-buttons.top {
top: 10px;
}
#fancybox-buttons.bottom {
bottom: 10px;
}
#fancybox-buttons ul {
display: block;
width: 166px;
height: 30px;
margin: 0 auto;
padding: 0;
list-style: none;
border: 1px solid #111;
border-radius: 3px;
-webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
-moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
background: rgb(50,50,50);
background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51)));
background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 );
}
#fancybox-buttons ul li {
float: left;
margin: 0;
padding: 0;
}
#fancybox-buttons a {
display: block;
width: 30px;
height: 30px;
text-indent: -9999px;
background-color: transparent;
background-image: url('fancybox_buttons.png');
background-repeat: no-repeat;
outline: none;
opacity: 0.8;
}
#fancybox-buttons a:hover {
opacity: 1;
}
#fancybox-buttons a.btnPrev {
background-position: 5px 0;
}
#fancybox-buttons a.btnNext {
background-position: -33px 0;
border-right: 1px solid #3e3e3e;
}
#fancybox-buttons a.btnPlay {
background-position: 0 -30px;
}
#fancybox-buttons a.btnPlayOn {
background-position: -30px -30px;
}
#fancybox-buttons a.btnToggle {
background-position: 3px -60px;
border-left: 1px solid #111;
border-right: 1px solid #3e3e3e;
width: 35px
}
#fancybox-buttons a.btnToggleOn {
background-position: -27px -60px;
}
#fancybox-buttons a.btnClose {
border-left: 1px solid #111;
width: 35px;
background-position: -56px 0px;
}
#fancybox-buttons a.btnDisabled {
opacity : 0.4;
cursor: default;
}

View File

@@ -0,0 +1,122 @@
/*!
* Buttons helper for fancyBox
* version: 1.0.5 (Mon, 15 Oct 2012)
* @requires fancyBox v2.0 or later
*
* Usage:
* $(".fancybox").fancybox({
* helpers : {
* buttons: {
* position : 'top'
* }
* }
* });
*
*/
(function ($) {
//Shortcut for fancyBox object
var F = $.fancybox;
//Add helper object
F.helpers.buttons = {
defaults : {
skipSingle : false, // disables if gallery contains single image
position : 'top', // 'top' or 'bottom'
tpl : '<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:;"></a></li></ul></div>'
},
list : null,
buttons: null,
beforeLoad: function (opts, obj) {
//Remove self if gallery do not have at least two items
if (opts.skipSingle && obj.group.length < 2) {
obj.helpers.buttons = false;
obj.closeBtn = true;
return;
}
//Increase top margin to give space for buttons
obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30;
},
onPlayStart: function () {
if (this.buttons) {
this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn');
}
},
onPlayEnd: function () {
if (this.buttons) {
this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn');
}
},
afterShow: function (opts, obj) {
var buttons = this.buttons;
if (!buttons) {
this.list = $(opts.tpl).addClass(opts.position).appendTo('body');
buttons = {
prev : this.list.find('.btnPrev').click( F.prev ),
next : this.list.find('.btnNext').click( F.next ),
play : this.list.find('.btnPlay').click( F.play ),
toggle : this.list.find('.btnToggle').click( F.toggle ),
close : this.list.find('.btnClose').click( F.close )
}
}
//Prev
if (obj.index > 0 || obj.loop) {
buttons.prev.removeClass('btnDisabled');
} else {
buttons.prev.addClass('btnDisabled');
}
//Next / Play
if (obj.loop || obj.index < obj.group.length - 1) {
buttons.next.removeClass('btnDisabled');
buttons.play.removeClass('btnDisabled');
} else {
buttons.next.addClass('btnDisabled');
buttons.play.addClass('btnDisabled');
}
this.buttons = buttons;
this.onUpdate(opts, obj);
},
onUpdate: function (opts, obj) {
var toggle;
if (!this.buttons) {
return;
}
toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn');
//Size toggle button
if (obj.canShrink) {
toggle.addClass('btnToggleOn');
} else if (!obj.canExpand) {
toggle.addClass('btnDisabled');
}
},
beforeClose: function () {
if (this.list) {
this.list.remove();
}
this.list = null;
this.buttons = null;
}
};
}(jQuery));

View File

@@ -0,0 +1,199 @@
/*!
* Media helper for fancyBox
* version: 1.0.6 (Fri, 14 Jun 2013)
* @requires fancyBox v2.0 or later
*
* Usage:
* $(".fancybox").fancybox({
* helpers : {
* media: true
* }
* });
*
* Set custom URL parameters:
* $(".fancybox").fancybox({
* helpers : {
* media: {
* youtube : {
* params : {
* autoplay : 0
* }
* }
* }
* }
* });
*
* Or:
* $(".fancybox").fancybox({,
* helpers : {
* media: true
* },
* youtube : {
* autoplay: 0
* }
* });
*
* Supports:
*
* Youtube
* http://www.youtube.com/watch?v=opj24KnzrWo
* http://www.youtube.com/embed/opj24KnzrWo
* http://youtu.be/opj24KnzrWo
* http://www.youtube-nocookie.com/embed/opj24KnzrWo
* Vimeo
* http://vimeo.com/40648169
* http://vimeo.com/channels/staffpicks/38843628
* http://vimeo.com/groups/surrealism/videos/36516384
* http://player.vimeo.com/video/45074303
* Metacafe
* http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/
* http://www.metacafe.com/watch/7635964/
* Dailymotion
* http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people
* Twitvid
* http://twitvid.com/QY7MD
* Twitpic
* http://twitpic.com/7p93st
* Instagram
* http://instagr.am/p/IejkuUGxQn/
* http://instagram.com/p/IejkuUGxQn/
* Google maps
* http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17
* http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16
* http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56
*/
(function ($) {
"use strict";
//Shortcut for fancyBox object
var F = $.fancybox,
format = function( url, rez, params ) {
params = params || '';
if ( $.type( params ) === "object" ) {
params = $.param(params, true);
}
$.each(rez, function(key, value) {
url = url.replace( '$' + key, value || '' );
});
if (params.length) {
url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params;
}
return url;
};
//Add helper object
F.helpers.media = {
defaults : {
youtube : {
matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i,
params : {
autoplay : 1,
autohide : 1,
fs : 1,
rel : 0,
hd : 1,
wmode : 'opaque',
enablejsapi : 1
},
type : 'iframe',
url : '//www.youtube.com/embed/$3'
},
vimeo : {
matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,
params : {
autoplay : 1,
hd : 1,
show_title : 1,
show_byline : 1,
show_portrait : 0,
fullscreen : 1
},
type : 'iframe',
url : '//player.vimeo.com/video/$1'
},
metacafe : {
matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/,
params : {
autoPlay : 'yes'
},
type : 'swf',
url : function( rez, params, obj ) {
obj.swf.flashVars = 'playerVars=' + $.param( params, true );
return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf';
}
},
dailymotion : {
matcher : /dailymotion.com\/video\/(.*)\/?(.*)/,
params : {
additionalInfos : 0,
autoStart : 1
},
type : 'swf',
url : '//www.dailymotion.com/swf/video/$1'
},
twitvid : {
matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i,
params : {
autoplay : 0
},
type : 'iframe',
url : '//www.twitvid.com/embed.php?guid=$1'
},
twitpic : {
matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i,
type : 'image',
url : '//twitpic.com/show/full/$1/'
},
instagram : {
matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,
type : 'image',
url : '//$1/p/$2/media/?size=l'
},
google_maps : {
matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i,
type : 'iframe',
url : function( rez ) {
return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed');
}
}
},
beforeLoad : function(opts, obj) {
var url = obj.href || '',
type = false,
what,
item,
rez,
params;
for (what in opts) {
if (opts.hasOwnProperty(what)) {
item = opts[ what ];
rez = url.match( item.matcher );
if (rez) {
type = item.type;
params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null));
url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params );
break;
}
}
}
if (type) {
obj.href = url;
obj.type = type;
obj.autoHeight = false;
}
}
};
}(jQuery));

View File

@@ -0,0 +1,55 @@
#fancybox-thumbs {
position: fixed;
left: 0;
width: 100%;
overflow: hidden;
z-index: 8050;
}
#fancybox-thumbs.bottom {
bottom: 2px;
}
#fancybox-thumbs.top {
top: 2px;
}
#fancybox-thumbs ul {
position: relative;
list-style: none;
margin: 0;
padding: 0;
}
#fancybox-thumbs ul li {
float: left;
padding: 1px;
opacity: 0.5;
}
#fancybox-thumbs ul li.active {
opacity: 0.75;
padding: 0;
border: 1px solid #fff;
}
#fancybox-thumbs ul li:hover {
opacity: 1;
}
#fancybox-thumbs ul li a {
display: block;
position: relative;
overflow: hidden;
border: 1px solid #222;
background: #111;
outline: none;
}
#fancybox-thumbs ul li img {
display: block;
position: relative;
border: 0;
padding: 0;
max-width: none;
}

View File

@@ -0,0 +1,162 @@
/*!
* Thumbnail helper for fancyBox
* version: 1.0.7 (Mon, 01 Oct 2012)
* @requires fancyBox v2.0 or later
*
* Usage:
* $(".fancybox").fancybox({
* helpers : {
* thumbs: {
* width : 50,
* height : 50
* }
* }
* });
*
*/
(function ($) {
//Shortcut for fancyBox object
var F = $.fancybox;
//Add helper object
F.helpers.thumbs = {
defaults : {
width : 50, // thumbnail width
height : 50, // thumbnail height
position : 'bottom', // 'top' or 'bottom'
source : function ( item ) { // function to obtain the URL of the thumbnail image
var href;
if (item.element) {
href = $(item.element).find('img').attr('src');
}
if (!href && item.type === 'image' && item.href) {
href = item.href;
}
return href;
}
},
wrap : null,
list : null,
width : 0,
init: function (opts, obj) {
var that = this,
list,
thumbWidth = opts.width,
thumbHeight = opts.height,
thumbSource = opts.source;
//Build list structure
list = '';
for (var n = 0; n < obj.group.length; n++) {
list += '<li><a style="width:' + thumbWidth + 'px;height:' + thumbHeight + 'px;" href="javascript:jQuery.fancybox.jumpto(' + n + ');"></a></li>';
}
this.wrap = $('<div id="fancybox-thumbs"></div>').addClass(opts.position).appendTo('body');
this.list = $('<ul>' + list + '</ul>').appendTo(this.wrap);
//Load each thumbnail
$.each(obj.group, function (i) {
var href = thumbSource( obj.group[ i ] );
if (!href) {
return;
}
$("<img />").load(function () {
var width = this.width,
height = this.height,
widthRatio, heightRatio, parent;
if (!that.list || !width || !height) {
return;
}
//Calculate thumbnail width/height and center it
widthRatio = width / thumbWidth;
heightRatio = height / thumbHeight;
parent = that.list.children().eq(i).find('a');
if (widthRatio >= 1 && heightRatio >= 1) {
if (widthRatio > heightRatio) {
width = Math.floor(width / heightRatio);
height = thumbHeight;
} else {
width = thumbWidth;
height = Math.floor(height / widthRatio);
}
}
$(this).css({
width : width,
height : height,
top : Math.floor(thumbHeight / 2 - height / 2),
left : Math.floor(thumbWidth / 2 - width / 2)
});
parent.width(thumbWidth).height(thumbHeight);
$(this).hide().appendTo(parent).fadeIn(300);
}).attr('src', href);
});
//Set initial width
this.width = this.list.children().eq(0).outerWidth(true);
this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)));
},
beforeLoad: function (opts, obj) {
//Remove self if gallery do not have at least two items
if (obj.group.length < 2) {
obj.helpers.thumbs = false;
return;
}
//Increase bottom margin to give space for thumbs
obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15);
},
afterShow: function (opts, obj) {
//Check if exists and create or update list
if (this.list) {
this.onUpdate(opts, obj);
} else {
this.init(opts, obj);
}
//Set active element
this.list.children().removeClass('active').eq(obj.index).addClass('active');
},
//Center list
onUpdate: function (opts, obj) {
if (this.list) {
this.list.stop(true).animate({
'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))
}, 150);
}
},
beforeClose: function () {
if (this.wrap) {
this.wrap.remove();
}
this.wrap = null;
this.list = null;
this.width = 0;
}
}
}(jQuery));

View File

@@ -0,0 +1 @@
/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ .fancybox-wrap, .fancybox-skin, .fancybox-outer, .fancybox-inner, .fancybox-image, .fancybox-wrap iframe, .fancybox-wrap object, .fancybox-nav, .fancybox-nav span, .fancybox-tmp { padding: 0;margin: 0;border: 0;outline: none;vertical-align: top;} .fancybox-wrap { position: absolute;top: 0;left: 0;z-index: 8020;} .fancybox-skin { position: relative;background: #f9f9f9;color: #444;text-shadow: none;-webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px;} .fancybox-opened { z-index: 8030;} .fancybox-opened .fancybox-skin { -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);} .fancybox-outer, .fancybox-inner { position: relative;} .fancybox-inner { overflow: hidden;} .fancybox-type-iframe .fancybox-inner { -webkit-overflow-scrolling: touch;} .fancybox-error { color: #444;font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;margin: 0;padding: 15px;white-space: nowrap;} .fancybox-image, .fancybox-iframe { display: block;width: 100%;height: 100%;} .fancybox-image { max-width: 100%;max-height: 100%;} #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { background-image: url('fancybox_sprite.png');} #fancybox-loading { position: fixed;top: 50%;left: 50%;margin-top: -22px;margin-left: -22px;background-position: 0 -108px;opacity: 0.8;cursor: pointer;z-index: 8060;} #fancybox-loading div { width: 44px;height: 44px;background: url('fancybox_loading.gif') center center no-repeat;} .fancybox-close { position: absolute;top: -18px;right: -18px;width: 36px;height: 36px;cursor: pointer;z-index: 8040;} .fancybox-nav { position: absolute;top: 0;width: 40%;height: 100%;cursor: pointer;text-decoration: none;background: transparent url('blank.gif');/* helps IE */ -webkit-tap-highlight-color: rgba(0,0,0,0);z-index: 8040;} .fancybox-prev { left: 0;} .fancybox-next { right: 0;} .fancybox-nav span { position: absolute;top: 50%;width: 36px;height: 34px;margin-top: -18px;cursor: pointer;z-index: 8040;visibility: hidden;} .fancybox-prev span { left: 10px;background-position: 0 -36px;} .fancybox-next span { right: 10px;background-position: 0 -72px;} .fancybox-nav:hover span { visibility: visible;} .fancybox-tmp { position: absolute;top: -99999px;left: -99999px;visibility: hidden;max-width: 99999px;max-height: 99999px;overflow: visible !important;} /* Overlay helper */ .fancybox-lock { overflow: hidden !important;width: auto;} .fancybox-lock body { overflow: hidden !important;} .fancybox-lock-test { overflow-y: hidden !important;} .fancybox-overlay { position: absolute;top: 0;left: 0;overflow: hidden;display: none;z-index: 8010;background: url('fancybox_overlay.png');} .fancybox-overlay-fixed { position: fixed;bottom: 0;right: 0;} .fancybox-lock .fancybox-overlay { overflow: auto;overflow-y: scroll;} /* Title helper */ .fancybox-title { visibility: hidden;font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;position: relative;text-shadow: none;z-index: 8050;} .fancybox-opened .fancybox-title { visibility: visible;} .fancybox-title-float-wrap { position: absolute;bottom: 0;right: 50%;margin-bottom: -35px;z-index: 8050;text-align: center;} .fancybox-title-float-wrap .child { display: inline-block;margin-right: -100%;padding: 2px 20px;background: transparent;/* Fallback for web browsers that doesn't support RGBa */ background: rgba(0, 0, 0, 0.8);-webkit-border-radius: 15px;-moz-border-radius: 15px;border-radius: 15px;text-shadow: 0 1px 2px #222;color: #FFF;font-weight: bold;line-height: 24px;white-space: nowrap;} .fancybox-title-outside-wrap { position: relative;margin-top: 10px;color: #fff;} .fancybox-title-inside-wrap { padding-top: 10px;} .fancybox-title-over-wrap { position: absolute;bottom: 0;left: 0;color: #fff;padding: 10px;background: #000;background: rgba(0, 0, 0, .8);} /*Retina graphics!*/ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min--moz-device-pixel-ratio: 1.5), only screen and (min-device-pixel-ratio: 1.5){ #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { background-image: url('fancybox_sprite@2x.png');background-size: 44px 152px;/*The size of the normal image, half the size of the hi-res image*/ } #fancybox-loading div { background-image: url('fancybox_loading@2x.gif');background-size: 24px 24px;/*The size of the normal image, half the size of the hi-res image*/ } }

2020
3rdparty/fancyapps/source/jquery.fancybox.js vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,46 @@
/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,
width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},
keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,
openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,
c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&
k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;
d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=
a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),
b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(),
y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;
if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,
{},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,
mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=
!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");
"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=
this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);
f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,
e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,
outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}",
g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":
"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside?
h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth||
h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&
"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width();
y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&&
!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(),
b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=
a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):
(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===
f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,
{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=
b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=
f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?
b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth),
p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"===
f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=
b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,
e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+
":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20===
d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery);

BIN
3rdparty/fancyapps/sprite.psd vendored Executable file

Binary file not shown.

177
3rdparty/gestionnaire_upload/css/main.css vendored Executable file
View File

@@ -0,0 +1,177 @@
*{
margin:0;
padding:0;
}
body {
background-color:#74b1d1;
color:#fff;
font:14px/1.3 Arial,sans-serif;
}
header {
background-color:#212121;
box-shadow: 0 -1px 2px #111111;
display:block;
height:70px;
position:relative;
width:100%;
z-index:100;
}
header h2{
font-size:22px;
font-weight:normal;
left:50%;
margin-left:-400px;
padding:22px 0;
position:absolute;
width:540px;
}
header a.stuts,a.stuts:visited{
border:none;
text-decoration:none;
color:#fcfcfc;
font-size:14px;
left:50%;
line-height:31px;
margin:23px 0 0 110px;
position:absolute;
top:0;
}
header .stuts span {
font-size:22px;
font-weight:bold;
margin-left:5px;
}
.container {
overflow:hidden;
width:960px;
margin:20px auto;
}
.contr {
background-color:#212121;
padding:10px 0;
text-align:center;
border-radius:10px 10px 0 0;